diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-06 15:37:33 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-11-11 17:21:18 (GMT) |
commit | 0cd7680b6fc0ccc602e1928122ce0b9a37d4864c (patch) | |
tree | b9b422d6d7479e5e0f4c54699a8e2b81f2cf09ae | |
parent | 5ca3d99ef2c5dc8e28528e747ffe114aeb3a5939 (diff) | |
download | Qt-0cd7680b6fc0ccc602e1928122ce0b9a37d4864c.zip Qt-0cd7680b6fc0ccc602e1928122ce0b9a37d4864c.tar.gz Qt-0cd7680b6fc0ccc602e1928122ce0b9a37d4864c.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.cpp | 4 |
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()); } |