summaryrefslogtreecommitdiffstats
path: root/src/linguist/shared/translator.cpp
diff options
context:
space:
mode:
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;