2011-03-29 01:36:26 +02:00
|
|
|
#include <QApplication>
|
2011-05-03 15:09:21 +02:00
|
|
|
#include <QDir>
|
2011-05-10 22:47:08 +02:00
|
|
|
#include <QFile>
|
2011-03-29 01:36:26 +02:00
|
|
|
|
2011-04-07 23:57:03 +02:00
|
|
|
#include "maindialog.hpp"
|
2011-03-29 01:36:26 +02:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
|
2011-05-03 15:09:21 +02:00
|
|
|
// Now we make sure the current dir is set to application path
|
|
|
|
QDir dir(QCoreApplication::applicationDirPath());
|
2011-05-10 22:47:08 +02:00
|
|
|
|
2012-10-23 01:47:07 +02:00
|
|
|
#ifdef Q_OS_MAC
|
2011-05-10 22:47:08 +02:00
|
|
|
if (dir.dirName() == "MacOS") {
|
2011-05-03 15:09:21 +02:00
|
|
|
dir.cdUp();
|
|
|
|
dir.cdUp();
|
|
|
|
dir.cdUp();
|
|
|
|
}
|
2012-02-15 11:27:51 +04:00
|
|
|
|
2012-02-15 11:30:35 +04:00
|
|
|
// force Qt to load only LOCAL plugins, don't touch system Qt installation
|
2012-02-15 11:27:51 +04:00
|
|
|
QDir pluginsPath(QCoreApplication::applicationDirPath());
|
|
|
|
pluginsPath.cdUp();
|
|
|
|
pluginsPath.cd("Plugins");
|
|
|
|
|
|
|
|
QStringList libraryPaths;
|
|
|
|
libraryPaths << pluginsPath.path() << QCoreApplication::applicationDirPath();
|
|
|
|
app.setLibraryPaths(libraryPaths);
|
2011-05-10 22:47:08 +02:00
|
|
|
#endif
|
2011-05-03 15:09:21 +02:00
|
|
|
|
|
|
|
QDir::setCurrent(dir.absolutePath());
|
2011-05-10 22:47:08 +02:00
|
|
|
|
2012-06-20 02:28:49 +02:00
|
|
|
MainDialog mainWin;
|
|
|
|
|
2012-06-20 20:43:51 +02:00
|
|
|
if (mainWin.setup()) {
|
2011-03-29 01:36:26 +02:00
|
|
|
|
2012-06-20 20:43:51 +02:00
|
|
|
mainWin.show();
|
|
|
|
return app.exec();
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
2011-03-29 01:36:26 +02:00
|
|
|
}
|
|
|
|
|