Skip to content

Commit 4276b81

Browse files
author
timlinux
committed
Fix compile issue on mac
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5800 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent ce82286 commit 4276b81

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/mapserver_export/qgsmapserverexport.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ email : sherman at mrcc.com
2828
#include <qregexp.h>
2929
#include <qstring.h>
3030
#include <QWidget>
31+
#include <QApplication>
3132
#include "qgsmapserverexport.h"
3233

3334

@@ -109,7 +110,12 @@ void QgsMapserverExport::on_buttonOk_clicked()
109110
//TODO Need to append the path to the qgis python files using the path to the
110111
// Python files in the QGIS install directory
111112
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
112117
QString dataPath ( PKGDATAPATH );
118+
#endif
113119
dataPath = dataPath.trimmed();
114120
QString scriptDir = dataPath + QDir::separator() + "python";
115121
qDebug(scriptDir);

0 commit comments

Comments
 (0)