summaryrefslogtreecommitdiffstats
path: root/tools/linguist/shared/ts.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-03-25 19:33:07 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-03-27 11:08:32 (GMT)
commit811eb47c3501479033ac3a484beeb896b6c0753f (patch)
tree6d631c9dfe0e0056b8e16ce5d23a8992f41decd5 /tools/linguist/shared/ts.cpp
parent6ac130466400197b8977f60d14ed96abfb0d2172 (diff)
downloadQt-811eb47c3501479033ac3a484beeb896b6c0753f.zip
Qt-811eb47c3501479033ac3a484beeb896b6c0753f.tar.gz
Qt-811eb47c3501479033ac3a484beeb896b6c0753f.tar.bz2
avoid empty codec name
Diffstat (limited to 'tools/linguist/shared/ts.cpp')
-rw-r--r--tools/linguist/shared/ts.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/linguist/shared/ts.cpp b/tools/linguist/shared/ts.cpp
index d454e4e..3af9e59 100644
--- a/tools/linguist/shared/ts.cpp
+++ b/tools/linguist/shared/ts.cpp
@@ -277,7 +277,9 @@ bool TSReader::read(Translator &translator)
// ignore these, just whitespace
} else if (elementStarts(strdefaultcodec)) {
// <defaultcodec>
- translator.setCodecName(readElementText().toLatin1());
+ const QString &codec = readElementText();
+ if (!codec.isEmpty())
+ translator.setCodecName(codec.toLatin1());
// </defaultcodec>
} else if (isStartElement()
&& name().toString().startsWith(strextrans)) {