We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b10a89 commit 0967dcaCopy full SHA for 0967dca
src/plugins/grass/qgis.g.browser.cpp
@@ -18,11 +18,15 @@ int main( int argc, char **argv )
18
fprintf( stderr, "URL argument missing\n" );
19
exit( 1 );
20
}
21
- QUrl url ( argv[1] );
+ QString urlStr ( argv[1] );
22
+ QUrl url ( urlStr );
23
#ifdef Q_OS_WIN
24
// openUrl on windows fails to open 'file://c:...' it must be 'file:///c:...' (3 slashes)
25
if ( url.scheme() == "file" ) {
- 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 );
30
std::cout << "path reset to: " << qPrintable(url.path()) << std::endl;
31
32
#endif
0 commit comments