diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-06 20:07:15 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-06 21:58:00 (GMT) |
commit | 92e9a481518d1c13df32bc2f1a9c8a0ba0b8961a (patch) | |
tree | 6e33c6b689330ffe8a2d64443643318882b12d52 /tools/linguist/lupdate | |
parent | 60acaf5ec7edcd1baf4dd8f80cf93b3e2cb520e4 (diff) | |
download | Qt-92e9a481518d1c13df32bc2f1a9c8a0ba0b8961a.zip Qt-92e9a481518d1c13df32bc2f1a9c8a0ba0b8961a.tar.gz Qt-92e9a481518d1c13df32bc2f1a9c8a0ba0b8961a.tar.bz2 |
eliminate Translator::replace()
Diffstat (limited to 'tools/linguist/lupdate')
-rw-r--r-- | tools/linguist/lupdate/merge.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tools/linguist/lupdate/merge.cpp b/tools/linguist/lupdate/merge.cpp index 1ae4cfb..6b8d4bb 100644 --- a/tools/linguist/lupdate/merge.cpp +++ b/tools/linguist/lupdate/merge.cpp @@ -247,10 +247,8 @@ int applyNumberHeuristic(Translator &tor) t = translated.find(zeroKey((*u).sourceText())); if (t != translated.end() && !t.key().isEmpty() && t->sourceText() != u->sourceText()) { - TranslatorMessage m = *u; - m.setTranslation(translationAttempt(t->translation(), t->sourceText(), - u->sourceText())); - tor.replace(m); + u->setTranslation(translationAttempt(t->translation(), t->sourceText(), + u->sourceText())); inserted++; } } @@ -305,9 +303,7 @@ int applySameTextHeuristic(Translator &tor) QString key = u->sourceText(); t = translated.find(key); if (t != translated.end()) { - TranslatorMessage m = *u; - m.setTranslations(t->translations()); - tor.replace(m); + u->setTranslations(t->translations()); ++inserted; } } |