summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-06 15:37:33 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-06 21:58:00 (GMT)
commit60b6fcdd18c4a21df086a0965bd2d536a39d2094 (patch)
tree200406b3b0c5b9e28ad862aac22e0bf6b2878f89
parentcfb02f6e1434b0d9ebf9d65cc5048036418bb64d (diff)
downloadQt-60b6fcdd18c4a21df086a0965bd2d536a39d2094.zip
Qt-60b6fcdd18c4a21df086a0965bd2d536a39d2094.tar.gz
Qt-60b6fcdd18c4a21df086a0965bd2d536a39d2094.tar.bz2
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<QString,...> lookups.
-rw-r--r--tools/linguist/shared/translatormessage.cpp4
1 files changed, 0 insertions, 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());
}