summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-04-01 09:38:50 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-04-02 17:27:25 (GMT)
commit2fb02e7b4a7937b8b215012790766078bf581e7c (patch)
tree29e12163a864f49ae0916f2a9fcf63c2c259f3a7 /tools/linguist
parent87d9469e428296a2fb8d0f266900cdfe816eaf0a (diff)
downloadQt-2fb02e7b4a7937b8b215012790766078bf581e7c.zip
Qt-2fb02e7b4a7937b8b215012790766078bf581e7c.tar.gz
Qt-2fb02e7b4a7937b8b215012790766078bf581e7c.tar.bz2
don't lose codecForTr in c++ parser
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/lupdate/cpp.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index 31f1361..42aa2f0 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -1800,7 +1800,9 @@ void loadCPP(Translator &translator, const QStringList &filenames, ConversionDat
if (ts.codec()->name() == "UTF-16")
translator.setCodecName("System");
parser.setInput(ts, filename);
- parser.setTranslator(new Translator);
+ Translator *tor = new Translator;
+ tor->setCodecName(translator.codecName());
+ parser.setTranslator(tor);
QSet<QString> inclusions;
parser.parse(cd.m_defaultContext, cd, inclusions);
CppFiles::setResults(filename, parser.getResults());