diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2011-01-17 01:04:51 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2011-01-17 01:10:42 (GMT) |
commit | 62087b2ec0afad240d61a61c7a2972d021e01695 (patch) | |
tree | 44da0444f18543fa9c016ea236f63ba5e8355039 /tools/qml/main.cpp | |
parent | 0dbb193973aa25f61bc541f4e7938deeaade2e75 (diff) | |
download | Qt-62087b2ec0afad240d61a61c7a2972d021e01695.zip Qt-62087b2ec0afad240d61a61c7a2972d021e01695.tar.gz Qt-62087b2ec0afad240d61a61c7a2972d021e01695.tar.bz2 |
Add a warning when translating QML application in qmlviewer fails
Task-number:
Reviewed-by: Martin Jones
Diffstat (limited to 'tools/qml/main.cpp')
-rw-r--r-- | tools/qml/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index b5a4fd0..89f2f5e 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -550,8 +550,11 @@ int main(int argc, char ** argv) QTranslator qmlTranslator; if (!opts.translationFile.isEmpty()) { - qmlTranslator.load(opts.translationFile); - app.installTranslator(&qmlTranslator); + if (qmlTranslator.load(opts.translationFile)) { + app.installTranslator(&qmlTranslator); + } else { + qWarning() << "Could not load the translation file" << opts.translationFile; + } } if (opts.fullScreen && opts.maximized) |