Skip to content
Permalink
Browse files

another atempt to get it working on Windows

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13058 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 15, 2010
1 parent 1b10a89 commit 0967dcaf58b8a8c9f630856a03da5bbd654db0a7
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/plugins/grass/qgis.g.browser.cpp
@@ -18,11 +18,15 @@ int main( int argc, char **argv )
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

0 comments on commit 0967dca

Please sign in to comment.
You can’t perform that action at this time.