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/client | |
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/client')
-rw-r--r-- | src/client/clientapp/clientapp.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/client/clientapp/clientapp.cpp b/src/client/clientapp/clientapp.cpp index 962ec42..2447526 100644 --- a/src/client/clientapp/clientapp.cpp +++ b/src/client/clientapp/clientapp.cpp @@ -22,12 +22,18 @@ ClientApp::ClientApp(int& argc, char** argv) /* set translator */ // 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() << "Could not load system string translations"; + } else { + installTranslator(qtTranslator); + } // App specific QTranslator *translator = new QTranslator(this); - translator->load(QLocale::system(), ":", "l_"); - installTranslator(translator); + if (!translator->load(QLocale::system(), ":", "l_")) { + qDebug() << "Could not load app translations"; + } else { + installTranslator(translator); + } readIsManagerPc(); |