Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2019-04-20 19:00:45 +0300
committerJanek Bevendorff <janek@jbev.net>2019-04-20 19:00:45 +0300
commitbbe7e8a45a463adbd210856bd18b50604869bf5e (patch)
treed1fa43ed7f588ae0f9e8d654b6ec1e425025753c /src/core/Translator.h
parentacd6847cd4d6c53b1034e6c018c2e2b7f2399ff6 (diff)
Use QLocale for translation search instead of custom method (#3035)
Use built-in facilities of Qt to traverse QLocale::uiLanguages() to find a valid "most preferred" language, but still respect user's choice in the application settings. Fixes #3030. Fixes #1924.
Diffstat (limited to 'src/core/Translator.h')
-rw-r--r--src/core/Translator.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/Translator.h b/src/core/Translator.h
index cf62f48e4..cfc49d710 100644
--- a/src/core/Translator.h
+++ b/src/core/Translator.h
@@ -20,6 +20,7 @@
#include <QPair>
#include <QString>
+#include <QLocale>
class Translator
{
@@ -28,8 +29,8 @@ public:
static QList<QPair<QString, QString>> availableLanguages();
private:
- static bool installTranslator(const QString& language, const QString& path);
- static bool installQtTranslator(const QString& language, const QString& path);
+ static bool installTranslator(const QLocale& locale, const QString& path);
+ static bool installQtTranslator(const QLocale& locale, const QString& path);
};
#endif // KEEPASSX_TRANSLATOR_H