diff options
Diffstat (limited to 'tools/linguist/shared/translator.h')
-rw-r--r-- | tools/linguist/shared/translator.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h index ef81d2a..eec704a 100644 --- a/tools/linguist/shared/translator.h +++ b/tools/linguist/shared/translator.h @@ -113,18 +113,13 @@ public: bool save(const QString &filename, ConversionData &err, const QString &format /*= "auto"*/) const; bool release(QFile *iod, ConversionData &cd) const; - bool contains(const QString &context, const QString &sourceText, - const QString &comment) const; - TranslatorMessage find(const QString &context, - const QString &sourceText, const QString &comment) const; - + int find(const TranslatorMessage &msg) const; TranslatorMessage find(const QString &context, const QString &comment, const TranslatorMessage::References &refs) const; bool contains(const QString &context) const; TranslatorMessage find(const QString &context) const; - void replace(const TranslatorMessage &msg); void replaceSorted(const TranslatorMessage &msg); void extend(const TranslatorMessage &msg); // Only for single-location messages void append(const TranslatorMessage &msg); @@ -138,9 +133,10 @@ public: void dropTranslations(); void dropUiLines(); void makeFileNamesAbsolute(const QDir &originalPath); - QSet<TranslatorMessagePtr> resolveDuplicates(); - static void reportDuplicates(const QSet<TranslatorMessagePtr> &dupes, - const QString &fileName, bool verbose); + + struct Duplicates { QSet<int> byId, byContents; }; + Duplicates resolveDuplicates(); + void reportDuplicates(const Duplicates &dupes, const QString &fileName, bool verbose); void setCodecName(const QByteArray &name); QByteArray codecName() const { return m_codecName; } |