summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/client/clientapp/clientapp.cpp14
-rw-r--r--src/server/serverapp/serverapp.cpp14
2 files changed, 20 insertions, 8 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();
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/");