telwertowski 8ed5d7baae Add HAVE_QTMAC conditional to configure. Use it to suppress compile-time
paths which cause errors when building with Qt/Mac which obtains paths
from qApp->applicationDirPath() at runtime.


git-svn-id: http://svn.osgeo.org/qgis/trunk@3142 c8812cc2-4d05-0410-92ff-de0c093fc19c
2005-04-13 07:16:57 +00:00

33 lines
684 B
C++

#ifdef HAVE_CONFIG_H
#include <qgsconfig.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include "plugingui.h"
#include <qapplication.h>
#include <qtextcodec.h>
#include <qtranslator.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
#if defined(Q_OS_MACX) || defined(WIN32)
QString PKGDATAPATH = qApp->applicationDirPath() + "/share/qgis";
#endif
/* Load translationfile */
QTranslator tor(0);
tor.load(QString("qgis_") + QTextCodec::locale(), QString(PKGDATAPATH) + "/i18n");
a.installTranslator(&tor);
PluginGui *myPluginGui=new PluginGui();
a.setMainWidget(myPluginGui);
myPluginGui->show();
return a.exec();
return EXIT_SUCCESS;
}