Skip to content

Commit

Permalink
workaround for what seems to be a Qt problem with file:// urls on win…
Browse files Browse the repository at this point in the history
…dows

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8349 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 14, 2008
1 parent 05c8c1e commit 37cb859
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -178,6 +178,10 @@
#include <dlfcn.h>
#endif

#ifdef WIN32
#include <windows.h>
#endif

using namespace std;
class QTreeWidgetItem;

Expand Down Expand Up @@ -3783,7 +3787,6 @@ void QgisApp::zoomToLayerExtent()
mMapLegend->legendLayerZoom();
}


void QgisApp::showPluginManager()
{
QgsPluginManager *pm = new QgsPluginManager(this);
Expand Down Expand Up @@ -4293,6 +4296,11 @@ void QgisApp::openURL(QString url, bool useQgisDocDirectory)
OSStatus status = LSOpenCFURLRef(urlRef, NULL);
status = 0; //avoid compiler warning
CFRelease(urlRef);
#elif defined(WIN32)
if(url.startsWith("file://", Qt::CaseInsensitive))
ShellExecute(0, 0, url.mid(7).toLocal8Bit().constData(), 0, 0, SW_SHOWNORMAL);
else
QDesktopServices::openUrl(url);
#else
QDesktopServices::openUrl(url);
#endif
Expand Down

0 comments on commit 37cb859

Please sign in to comment.