[QGIS Commit] r13058 - trunk/qgis/src/plugins/grass
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Mar 15 15:05:14 EDT 2010
Author: rblazek
Date: 2010-03-15 15:05:11 -0400 (Mon, 15 Mar 2010)
New Revision: 13058
Modified:
trunk/qgis/src/plugins/grass/qgis.g.browser.cpp
Log:
another atempt to get it working on Windows
Modified: trunk/qgis/src/plugins/grass/qgis.g.browser.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgis.g.browser.cpp 2010-03-15 17:59:53 UTC (rev 13057)
+++ trunk/qgis/src/plugins/grass/qgis.g.browser.cpp 2010-03-15 19:05:11 UTC (rev 13058)
@@ -18,11 +18,15 @@
fprintf( stderr, "URL argument missing\n" );
exit( 1 );
}
- QUrl url ( argv[1] );
+ QString urlStr ( argv[1] );
+ QUrl url ( urlStr );
#ifdef Q_OS_WIN
// openUrl on windows fails to open 'file://c:...' it must be 'file:///c:...' (3 slashes)
if ( url.scheme() == "file" ) {
- url.setPath ( "/" + url.path() );
+ // this does not work, the drive was already removed by QT:
+ //url.setPath ( "/" + url.path() );
+ urlStr.replace ( "file://", "file:///" );
+ url.setUrl ( urlStr );
std::cout << "path reset to: " << qPrintable(url.path()) << std::endl;
}
#endif
More information about the QGIS-commit
mailing list