Skip to content

Commit f361879

Browse files
author
jef
committedApr 14, 2008
workaround for what seems to be a Qt problem with file:// urls on windows
git-svn-id: http://svn.osgeo.org/qgis/trunk@8349 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 06d8dd3 commit f361879

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@
178178
#include <dlfcn.h>
179179
#endif
180180

181+
#ifdef WIN32
182+
#include <windows.h>
183+
#endif
184+
181185
using namespace std;
182186
class QTreeWidgetItem;
183187

@@ -3783,7 +3787,6 @@ void QgisApp::zoomToLayerExtent()
37833787
mMapLegend->legendLayerZoom();
37843788
}
37853789

3786-
37873790
void QgisApp::showPluginManager()
37883791
{
37893792
QgsPluginManager *pm = new QgsPluginManager(this);
@@ -4293,6 +4296,11 @@ void QgisApp::openURL(QString url, bool useQgisDocDirectory)
42934296
OSStatus status = LSOpenCFURLRef(urlRef, NULL);
42944297
status = 0; //avoid compiler warning
42954298
CFRelease(urlRef);
4299+
#elif defined(WIN32)
4300+
if(url.startsWith("file://", Qt::CaseInsensitive))
4301+
ShellExecute(0, 0, url.mid(7).toLocal8Bit().constData(), 0, 0, SW_SHOWNORMAL);
4302+
else
4303+
QDesktopServices::openUrl(url);
42964304
#else
42974305
QDesktopServices::openUrl(url);
42984306
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.