mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
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
This commit is contained in:
parent
06d8dd39bd
commit
f361879a99
@ -178,6 +178,10 @@
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
class QTreeWidgetItem;
|
||||
|
||||
@ -3783,7 +3787,6 @@ void QgisApp::zoomToLayerExtent()
|
||||
mMapLegend->legendLayerZoom();
|
||||
}
|
||||
|
||||
|
||||
void QgisApp::showPluginManager()
|
||||
{
|
||||
QgsPluginManager *pm = new QgsPluginManager(this);
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user