diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-19 22:09:28 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-19 22:09:28 +0100 |
commit | ae653c8ff92c23c3f9ebbdb753a1e0edea95be7e (patch) | |
tree | a9d3256598d0011aa3dd70c809b373c59e6cbe7c /tools | |
parent | 70f482d84022da55b8cc7580d9993a339165219b (diff) | |
download | qt4-tools-ae653c8ff92c23c3f9ebbdb753a1e0edea95be7e.tar.gz |
don't overwrite explicitly specified CODECFORTR on UTF-16 input
Diffstat (limited to 'tools')
-rw-r--r-- | tools/linguist/lupdate/cpp.cpp | 2 | ||||
-rw-r--r-- | tools/linguist/lupdate/main.cpp | 1 | ||||
-rw-r--r-- | tools/linguist/shared/translator.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp index bd7d4ec35a..7c9b27a068 100644 --- a/tools/linguist/lupdate/cpp.cpp +++ b/tools/linguist/lupdate/cpp.cpp @@ -2151,7 +2151,7 @@ void loadCPP(Translator &translator, const QStringList &filenames, ConversionDat ts.setCodec(codec); ts.setAutoDetectUnicode(true); parser.setInput(ts, filename); - if (ts.codec()->name() == "UTF-16") + if (cd.m_outputCodec.isEmpty() && ts.codec()->name() == "UTF-16") translator.setCodecName("System"); Translator *tor = new Translator; tor->setCodecName(translator.codecName()); diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index bdaec4f59b..7defee07eb 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -494,6 +494,7 @@ int main(int argc, char **argv) if (!tmp.isEmpty() && !tmp.first().isEmpty()) { codecForTr = tmp.first().toLatin1(); fetchedTor.setCodecName(codecForTr); + cd.m_outputCodec = codecForTr; } tmp = variables.value("CODECFORSRC"); if (!tmp.isEmpty() && !tmp.first().isEmpty()) { diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h index f29317b65e..e36f822e3f 100644 --- a/tools/linguist/shared/translator.h +++ b/tools/linguist/shared/translator.h @@ -97,7 +97,7 @@ public: public: QString m_defaultContext; QByteArray m_codecForSource; // CPP, PO & QM specific - QByteArray m_outputCodec; // PO specific + QByteArray m_outputCodec; // CPP & PO specific QString m_unTrPrefix; // QM specific QString m_sourceFileName; QString m_targetFileName; |