# # # patch "src/main.cpp" # from [59347d7e681fed811c599bc6624756ffc974be86] # to [bd4675cd7e85e6a2cd1ab348d2aca03fad38d3db] # ============================================================ --- src/main.cpp 59347d7e681fed811c599bc6624756ffc974be86 +++ src/main.cpp bd4675cd7e85e6a2cd1ab348d2aca03fad38d3db @@ -19,20 +19,44 @@ ***************************************************************************/ #include +#include #include #include +#include #include "view/Guitone.h" int main(int argc, char** argv) { QApplication app(argc,argv); +#ifdef Q_WS_MAC + if (QSysInfo::MacintoshVersion < QSysInfo::MV_TIGER) + { + QMessageBox::information( + NULL, + app.translate("main","Unsupported OS"), + app.translate("main","You're running guitone on MacOS X 10.3 or earlier, " + "but we could only test it on MacOS X 10.4. " + "It may run perfectly fine, but it could also crash horribly. " + "Please give us feedback if something goes wrong. Thanks!"), + QMessageBox::Ok + ); + } +#endif + +// somehow loading the translation code leads to crashes on OSX, so we exclude +// this OS for now... +#ifndef Q_WS_MAC // try to find a suitable locale and setup translations QString locale = QLocale::system().name(); QTranslator translator; - translator.load(QString("i18n/guitone_") + locale); - app.installTranslator(&translator); - + QString path = QCoreApplication::applicationDirPath() + "/i18n"; + if (translator.load("guitone_" + locale, path)) + { + app.installTranslator(&translator); + } +#endif + // create and show the main window Guitone *mainWnd = new Guitone(); mainWnd->show();