From 60b6fcdd18c4a21df086a0965bd2d536a39d2094 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 6 Nov 2009 16:37:33 +0100 Subject: do not consider plural source in comparisons two messages with identical singular but different plural sources simply make no sense. this should be quite a bit faster, as it saves lots of QHash lookups. --- tools/linguist/shared/translatormessage.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/linguist/shared/translatormessage.cpp b/tools/linguist/shared/translatormessage.cpp index 0e7cb18..876b129 100644 --- a/tools/linguist/shared/translatormessage.cpp +++ b/tools/linguist/shared/translatormessage.cpp @@ -145,12 +145,9 @@ bool TranslatorMessage::needs8Bit() const bool TranslatorMessage::operator==(const TranslatorMessage& m) const { - static QString msgIdPlural = QLatin1String("po-msgid_plural"); - // Special treatment for context comments (empty source). return (m_context == m.m_context) && m_sourcetext == m.m_sourcetext - && m_extra[msgIdPlural] == m.m_extra[msgIdPlural] && m_id == m.m_id && (m_sourcetext.isEmpty() || m_comment == m.m_comment); } @@ -161,7 +158,6 @@ int qHash(const TranslatorMessage &msg) return qHash(msg.context()) ^ qHash(msg.sourceText()) ^ - qHash(msg.extra(QLatin1String("po-msgid_plural"))) ^ qHash(msg.comment()) ^ qHash(msg.id()); } -- cgit v0.12