summaryrefslogtreecommitdiff
path: root/src/linguist/shared/translator.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-01-04 12:11:11 +0100
committerLiang Qi <liang.qi@qt.io>2019-01-04 13:03:26 +0100
commit7b23692538f55d499bf094a750311e1e4cd13ec6 (patch)
tree7e85cdabe0e069ee8fcbc3da3764327b4f8e2ba2 /src/linguist/shared/translator.cpp
parentaa316d1d463777612db4b144d945bbaf67481494 (diff)
parent32897fd0b98966d22ecbd475a0e6a77ca8b1108d (diff)
downloadqttools-7b23692538f55d499bf094a750311e1e4cd13ec6.tar.gz
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: src/qdoc/htmlgenerator.cpp src/qtattributionsscanner/qdocgenerator.cpp Done-With: Martin Smith <martin.smith@qt.io> Change-Id: I56a23175579a1a699939179da2f35bbcd6c73367
Diffstat (limited to 'src/linguist/shared/translator.cpp')
-rw-r--r--src/linguist/shared/translator.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/linguist/shared/translator.cpp b/src/linguist/shared/translator.cpp
index 5b0538d4e..af669e235 100644
--- a/src/linguist/shared/translator.cpp
+++ b/src/linguist/shared/translator.cpp
@@ -384,11 +384,14 @@ int Translator::find(const QString &context,
{
if (!refs.isEmpty()) {
for (TMM::ConstIterator it = m_messages.constBegin(); it != m_messages.constEnd(); ++it) {
- if (it->context() == context && it->comment() == comment)
- foreach (const TranslatorMessage::Reference &itref, it->allReferences())
- foreach (const TranslatorMessage::Reference &ref, refs)
+ if (it->context() == context && it->comment() == comment) {
+ foreach (const TranslatorMessage::Reference &itref, it->allReferences()) {
+ foreach (const TranslatorMessage::Reference &ref, refs) {
if (itref == ref)
return it - m_messages.constBegin();
+ }
+ }
+ }
}
}
return -1;