summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-11 03:39:44 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-11 03:39:44 (GMT)
commit2aa21ab606a14ba63acb8f42fe4eb9f99ddad277 (patch)
tree11ba4ec8982856a92ecd789eb8db7d8e9ab72710 /tools/linguist
parenteabde99a0e9e4c5e49a05187530cf643258d5719 (diff)
parent68ca68ad38d27b9dd9e9fa2094bb50a1a70daaeb (diff)
downloadQt-2aa21ab606a14ba63acb8f42fe4eb9f99ddad277.zip
Qt-2aa21ab606a14ba63acb8f42fe4eb9f99ddad277.tar.gz
Qt-2aa21ab606a14ba63acb8f42fe4eb9f99ddad277.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: refuse to open empty translation files
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/linguist/messagemodel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/linguist/linguist/messagemodel.cpp b/tools/linguist/linguist/messagemodel.cpp
index 39ba9fd..c2edc75 100644
--- a/tools/linguist/linguist/messagemodel.cpp
+++ b/tools/linguist/linguist/messagemodel.cpp
@@ -209,6 +209,13 @@ bool DataModel::load(const QString &fileName, bool *langGuessed, QWidget *parent
return false;
}
+ if (!tor.messageCount()) {
+ QMessageBox::warning(parent, QObject::tr("Qt Linguist"),
+ tr("The translation file '%1' will not be loaded because it is empty.")
+ .arg(Qt::escape(fileName)));
+ return false;
+ }
+
Translator::Duplicates dupes = tor.resolveDuplicates();
if (!dupes.byId.isEmpty() || !dupes.byContents.isEmpty()) {
QString err = tr("<qt>Duplicate messages found in '%1':").arg(Qt::escape(fileName));