summaryrefslogtreecommitdiffstats
path: root/tools/linguist/shared
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-05 14:19:02 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-06 21:58:01 (GMT)
commit0a1db39ba70060f305e5694d1a12dd3c2e5bca4c (patch)
tree0e5786d7497ac56e2ef0ba2a665c7b0d642a4c62 /tools/linguist/shared
parenta66698f947e8ded2e020defa626b154aca1fde9f (diff)
downloadQt-0a1db39ba70060f305e5694d1a12dd3c2e5bca4c.zip
Qt-0a1db39ba70060f305e5694d1a12dd3c2e5bca4c.tar.gz
Qt-0a1db39ba70060f305e5694d1a12dd3c2e5bca4c.tar.bz2
record id-based messages even if they have an empty source
this makes sense if one uses lupdate only for validation purposes, i.e. to find out if the code uses only ids which are defined in some external specification.
Diffstat (limited to 'tools/linguist/shared')
-rw-r--r--tools/linguist/shared/translator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp
index 77faabd..bc27daf 100644
--- a/tools/linguist/shared/translator.cpp
+++ b/tools/linguist/shared/translator.cpp
@@ -337,7 +337,7 @@ TranslatorMessage Translator::find(const QString &context,
bool Translator::contains(const QString &context) const
{
foreach (const TranslatorMessage &msg, m_messages)
- if (msg.context() == context && msg.sourceText().isEmpty())
+ if (msg.context() == context && msg.sourceText().isEmpty() && msg.id().isEmpty())
return true;
return false;
}
@@ -345,7 +345,7 @@ bool Translator::contains(const QString &context) const
TranslatorMessage Translator::find(const QString &context) const
{
foreach (const TranslatorMessage &msg, m_messages)
- if (msg.context() == context && msg.sourceText().isEmpty())
+ if (msg.context() == context && msg.sourceText().isEmpty() && msg.id().isEmpty())
return msg;
return TranslatorMessage();
}