summaryrefslogtreecommitdiffstats
path: root/tools/linguist/shared/translator.h
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-06-01 16:19:57 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-06-01 19:34:43 (GMT)
commita107d3e22e128ec343d82f902de4c6ee0e33435f (patch)
tree6dde67241aa06190ce3353d6dccef50c37ec1245 /tools/linguist/shared/translator.h
parentad23439b7e112aa8a36f34e7b16224dcab742147 (diff)
downloadQt-a107d3e22e128ec343d82f902de4c6ee0e33435f.zip
Qt-a107d3e22e128ec343d82f902de4c6ee0e33435f.tar.gz
Qt-a107d3e22e128ec343d82f902de4c6ee0e33435f.tar.bz2
optimization: make the Translator::find() api index-based
Diffstat (limited to 'tools/linguist/shared/translator.h')
-rw-r--r--tools/linguist/shared/translator.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h
index b9bc94c..41f0396 100644
--- a/tools/linguist/shared/translator.h
+++ b/tools/linguist/shared/translator.h
@@ -127,11 +127,11 @@ public:
bool save(const QString &filename, ConversionData &err, const QString &format /* = "auto" */) const;
int find(const TranslatorMessage &msg) const;
- TranslatorMessage find(const QString &context,
+ int find(const QString &context,
const QString &comment, const TranslatorMessage::References &refs) const;
bool contains(const QString &context) const;
- TranslatorMessage find(const QString &context) const;
+ int find(const QString &context) const;
void replaceSorted(const TranslatorMessage &msg);
void extend(const TranslatorMessage &msg); // Only for single-location messages
@@ -178,6 +178,7 @@ public:
int messageCount() const { return m_messages.size(); }
TranslatorMessage &message(int i) { return m_messages[i]; }
const TranslatorMessage &message(int i) const { return m_messages.at(i); }
+ const TranslatorMessage &constMessage(int i) const { return m_messages.at(i); }
void dump() const;
// additional file format specific data