summaryrefslogtreecommitdiffstats
path: root/tools/linguist/shared
diff options
context:
space:
mode:
Diffstat (limited to 'tools/linguist/shared')
-rw-r--r--tools/linguist/shared/qm.cpp2
-rw-r--r--tools/linguist/shared/translator.cpp10
-rw-r--r--tools/linguist/shared/translator.h3
3 files changed, 3 insertions, 12 deletions
diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp
index b8cfeca..06603fe 100644
--- a/tools/linguist/shared/qm.cpp
+++ b/tools/linguist/shared/qm.cpp
@@ -697,7 +697,7 @@ static bool containsStripped(const Translator &translator, const TranslatorMessa
return false;
}
-static bool saveQM(const Translator &translator, QIODevice &dev, ConversionData &cd)
+bool saveQM(const Translator &translator, QIODevice &dev, ConversionData &cd)
{
Releaser releaser;
QLocale::Language l;
diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp
index a29372a..2a15fe7 100644
--- a/tools/linguist/shared/translator.cpp
+++ b/tools/linguist/shared/translator.cpp
@@ -329,16 +329,6 @@ void Translator::languageAndCountry(const QString &languageCode,
}
}
-bool Translator::release(QFile *iod, ConversionData &cd) const
-{
- foreach (const FileFormat &format, registeredFileFormats()) {
- if (format.extension == QLatin1String("qm"))
- return (*format.saver)(*this, *iod, cd);
- }
- cd.appendError(QLatin1String("No .qm saver available."));
- return false;
-}
-
int Translator::find(const TranslatorMessage &msg) const
{
for (int i = 0; i < m_messages.count(); ++i) {
diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h
index fb9bd2d..b9bc94c 100644
--- a/tools/linguist/shared/translator.h
+++ b/tools/linguist/shared/translator.h
@@ -125,7 +125,6 @@ public:
bool load(const QString &filename, ConversionData &err, const QString &format /* = "auto" */);
bool save(const QString &filename, ConversionData &err, const QString &format /* = "auto" */) const;
- bool release(QFile *iod, ConversionData &cd) const;
int find(const TranslatorMessage &msg) const;
TranslatorMessage find(const QString &context,
@@ -235,6 +234,8 @@ private:
bool getNumerusInfo(QLocale::Language language, QLocale::Country country,
QByteArray *rules, QStringList *forms, const char **gettextRules);
+bool saveQM(const Translator &translator, QIODevice &dev, ConversionData &cd);
+
/*
This is a quick hack. The proper way to handle this would be
to extend Translator's interface.