1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Properly handle return values

This commit is contained in:
Martin Tůma 2020-12-27 00:00:59 +01:00
parent a17110782a
commit 4f22c50510

View File

@ -30,18 +30,18 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
setApplicationVersion(APP_VERSION); setApplicationVersion(APP_VERSION);
QTranslator *gpxsee = new QTranslator(this); QTranslator *gpxsee = new QTranslator(this);
gpxsee->load(QLocale::system(), "gpxsee", "_", if (gpxsee->load(QLocale::system(), "gpxsee", "_",
ProgramPaths::translationsDir()); ProgramPaths::translationsDir()))
installTranslator(gpxsee); installTranslator(gpxsee);
QTranslator *qt = new QTranslator(this); QTranslator *qt = new QTranslator(this);
#if defined(Q_OS_WIN32) || defined(Q_OS_MAC) #if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
qt->load(QLocale::system(), "qt", "_", ProgramPaths::translationsDir()); if (qt->load(QLocale::system(), "qt", "_", ProgramPaths::translationsDir()))
#else // Q_OS_WIN32 || Q_OS_MAC #else // Q_OS_WIN32 || Q_OS_MAC
qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location( if (qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
QLibraryInfo::TranslationsPath)); QLibraryInfo::TranslationsPath)))
#endif // Q_OS_WIN32 || Q_OS_MAC #endif // Q_OS_WIN32 || Q_OS_MAC
installTranslator(qt); installTranslator(qt);
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
setAttribute(Qt::AA_DontShowIconsInMenus); setAttribute(Qt::AA_DontShowIconsInMenus);