$END_LICENSE */
#include <QtGui>
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#endif
#include <qtsingleapplication.h>
#include "constants.h"
#include "mainwindow.h"
#ifdef APP_EXTRA
#include "extra.h"
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include "mac_startup.h"
#endif
int main(int argc, char **argv) {
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
mac::MacMain();
+ // https://bugreports.qt-project.org/browse/QTBUG-32789
+ QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
#endif
QtSingleApplication app(argc, argv);
#else
QString dataDir = "";
#endif
+#ifdef APP_MAC
+ QString localeDir = qApp->applicationDirPath() + "/../Resources/locale";
+#else
QString localeDir = qApp->applicationDirPath() + "/locale";
+#endif
if (!QDir(localeDir).exists()) {
localeDir = dataDir + "/locale";
}
QTranslator translator;
translator.load(QLocale::system(), QString(), QString(), localeDir);
app.installTranslator(&translator);
+#if QT_VERSION < 0x050000
QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
+#endif
MainWindow mainWin;
mainWin.show();