summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-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());