diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-04-15 20:12:18 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-04-15 20:16:33 (GMT) |
commit | b7e6c2835ad7b5f5564290c1140c1db59869d54e (patch) | |
tree | b2fa4c3177ae967de277c4544cf38a41a3514c4a | |
parent | d758d652e1b3950f9df6aa4c1bdef67ba9b88b15 (diff) | |
download | Qt-b7e6c2835ad7b5f5564290c1140c1db59869d54e.zip Qt-b7e6c2835ad7b5f5564290c1140c1db59869d54e.tar.gz Qt-b7e6c2835ad7b5f5564290c1140c1db59869d54e.tar.bz2 |
create magic comment messages in "finished" state
there is really no point in marking them "unfinished". later file
rewrites would reset the state anyway.
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result | 2 | ||||
-rw-r--r-- | tools/linguist/lupdate/cpp.cpp | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result index 2f21de2..53d7a25 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result @@ -98,7 +98,7 @@ <location filename="main.cpp" line="238"/> <source></source> <comment>This is a comment to the translator.</comment> - <translation type="unfinished"></translation> + <translation></translation> </message> </context> <context> diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp index 4791450..db4bbca 100644 --- a/tools/linguist/lupdate/cpp.cpp +++ b/tools/linguist/lupdate/cpp.cpp @@ -2035,9 +2035,14 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions) } else { context = comment.left(k); comment.remove(0, k + 1); - recordMessage(yyLineNo, context, QString(), comment, extracomment, - QString(), TranslatorMessage::ExtraData(), false, false); + TranslatorMessage msg( + transcode(context, false), QString(), + transcode(comment, false), QString(), + yyFileName, yyLineNo, QStringList(), + TranslatorMessage::Finished, false); + msg.setExtraComment(transcode(extracomment.simplified(), false)); extracomment.clear(); + tor->append(msg); tor->setExtras(extra); extra.clear(); } |