Skip to content

Commit

Permalink
another atempt to get it working on Windows
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13058 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Mar 15, 2010
1 parent 49a6486 commit d769e86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/plugins/grass/qgis.g.browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d769e86

Please sign in to comment.