File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ email : sherman at mrcc.com
28
28
#include < qregexp.h>
29
29
#include < qstring.h>
30
30
#include < QWidget>
31
+ #include < QApplication>
31
32
#include " qgsmapserverexport.h"
32
33
33
34
@@ -109,7 +110,12 @@ void QgsMapserverExport::on_buttonOk_clicked()
109
110
// TODO Need to append the path to the qgis python files using the path to the
110
111
// Python files in the QGIS install directory
111
112
PyRun_SimpleString (" import sys" );
113
+ #if defined(Q_WS_MACX) || defined(Q_WS_WIN32)
114
+ QString prefixPath = QApplication::applicationDirPath ();
115
+ QString dataPath = prefixPath + QString (" /share/qgis" );
116
+ #else
112
117
QString dataPath ( PKGDATAPATH );
118
+ #endif
113
119
dataPath = dataPath.trimmed ();
114
120
QString scriptDir = dataPath + QDir::separator () + " python" ;
115
121
qDebug (scriptDir);
You can’t perform that action at this time.
0 commit comments