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