summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/linguist/lupdate/merge.cpp2
-rw-r--r--src/linguist/shared/translator.cpp8
-rw-r--r--src/linguist/shared/translator.h1
3 files changed, 1 insertions, 10 deletions
diff --git a/src/linguist/lupdate/merge.cpp b/src/linguist/lupdate/merge.cpp
index 1c992c38f..8b6624dcc 100644
--- a/src/linguist/lupdate/merge.cpp
+++ b/src/linguist/lupdate/merge.cpp
@@ -454,7 +454,7 @@ Translator merge(const Translator &tor, const Translator &virginTor,
*/
foreach (const TranslatorMessage &mv, virginTor.messages()) {
if (mv.sourceText().isEmpty() && mv.id().isEmpty()) {
- if (tor.contains(mv.context()))
+ if (tor.find(mv.context()) >= 0)
continue;
} else {
if (tor.find(mv) >= 0)
diff --git a/src/linguist/shared/translator.cpp b/src/linguist/shared/translator.cpp
index 91a5a26ac..0c2678d8c 100644
--- a/src/linguist/shared/translator.cpp
+++ b/src/linguist/shared/translator.cpp
@@ -361,14 +361,6 @@ int Translator::find(const QString &context,
return -1;
}
-bool Translator::contains(const QString &context) const
-{
- foreach (const TranslatorMessage &msg, m_messages)
- if (msg.context() == context && msg.sourceText().isEmpty() && msg.id().isEmpty())
- return true;
- return false;
-}
-
int Translator::find(const QString &context) const
{
for (TMM::ConstIterator it = m_messages.constBegin(); it != m_messages.constEnd(); ++it)
diff --git a/src/linguist/shared/translator.h b/src/linguist/shared/translator.h
index 41f0396e8..bb147b8f5 100644
--- a/src/linguist/shared/translator.h
+++ b/src/linguist/shared/translator.h
@@ -130,7 +130,6 @@ public:
int find(const QString &context,
const QString &comment, const TranslatorMessage::References &refs) const;
- bool contains(const QString &context) const;
int find(const QString &context) const;
void replaceSorted(const TranslatorMessage &msg);