Skip to content

Commit 0967dca

Browse files
author
rblazek
committed
another atempt to get it working on Windows
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13058 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 1b10a89 commit 0967dca

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/plugins/grass/qgis.g.browser.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ int main( int argc, char **argv )
1818
fprintf( stderr, "URL argument missing\n" );
1919
exit( 1 );
2020
}
21-
QUrl url ( argv[1] );
21+
QString urlStr ( argv[1] );
22+
QUrl url ( urlStr );
2223
#ifdef Q_OS_WIN
2324
// openUrl on windows fails to open 'file://c:...' it must be 'file:///c:...' (3 slashes)
2425
if ( url.scheme() == "file" ) {
25-
url.setPath ( "/" + url.path() );
26+
// this does not work, the drive was already removed by QT:
27+
//url.setPath ( "/" + url.path() );
28+
urlStr.replace ( "file://", "file:///" );
29+
url.setUrl ( urlStr );
2630
std::cout << "path reset to: " << qPrintable(url.path()) << std::endl;
2731
}
2832
#endif

0 commit comments

Comments
 (0)