mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Properly handle return values
This commit is contained in:
parent
a17110782a
commit
4f22c50510
@ -30,18 +30,18 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
|
||||
setApplicationVersion(APP_VERSION);
|
||||
|
||||
QTranslator *gpxsee = new QTranslator(this);
|
||||
gpxsee->load(QLocale::system(), "gpxsee", "_",
|
||||
ProgramPaths::translationsDir());
|
||||
installTranslator(gpxsee);
|
||||
if (gpxsee->load(QLocale::system(), "gpxsee", "_",
|
||||
ProgramPaths::translationsDir()))
|
||||
installTranslator(gpxsee);
|
||||
|
||||
QTranslator *qt = new QTranslator(this);
|
||||
#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
|
||||
qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
|
||||
QLibraryInfo::TranslationsPath));
|
||||
if (qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
|
||||
QLibraryInfo::TranslationsPath)))
|
||||
#endif // Q_OS_WIN32 || Q_OS_MAC
|
||||
installTranslator(qt);
|
||||
installTranslator(qt);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||
|
Loading…
Reference in New Issue
Block a user