diff options
author | Simon Rettberg | 2018-09-03 11:24:55 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-09-03 11:24:55 +0200 |
commit | 1b854f59cecbea99fc379f9ff72e494848a13928 (patch) | |
tree | 7d5707a77499a2a7a3cc958e04a84d4c3a5aeb86 /src/server | |
parent | [client] Switch back to first desktop when hiding manager toggle button (diff) | |
download | pvs2-1b854f59cecbea99fc379f9ff72e494848a13928.tar.gz pvs2-1b854f59cecbea99fc379f9ff72e494848a13928.tar.xz pvs2-1b854f59cecbea99fc379f9ff72e494848a13928.zip |
[*] Add log message if loading translations fails
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/serverapp/serverapp.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/server/serverapp/serverapp.cpp b/src/server/serverapp/serverapp.cpp index f680f89..2cc237a 100644 --- a/src/server/serverapp/serverapp.cpp +++ b/src/server/serverapp/serverapp.cpp @@ -28,12 +28,18 @@ ServerApp::ServerApp(int& argc, char** argv) // System strings QTranslator *qtTranslator = new QTranslator(this); - qtTranslator->load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath)); - installTranslator(qtTranslator); + if (!qtTranslator->load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { + qDebug() << "Loading system translations failed" << QLibraryInfo::location(QLibraryInfo::TranslationsPath); + } else { + installTranslator(qtTranslator); + } // App specific QTranslator *translator = new QTranslator(this); - translator->load(QLocale::system(), ":", "l_"); - installTranslator(translator); + if (!translator->load(QLocale::system(), ":", "l_")) { + qDebug() << "Loading app translations failed"; + } else { + installTranslator(translator); + } /* Set the global path of the settings */ QSettings::setPath(QSettings::IniFormat, QSettings::SystemScope, "/opt/"); |