Commit 79f50ec5 authored by Luigi Toscano's avatar Luigi Toscano

Properly initialize the localization in the KF5 world

- initialize the QApplication instance as early as possible;
- set the translation domain in the way meant for applications,
  not in the way meant for libraries.

Now the about dialog shows the Translation tab.
parent 33b875ee
......@@ -6,8 +6,6 @@ set(QT_MIN_VERSION "5.2.0")
find_package(ECM 1.3.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
add_definitions(-DTRANSLATION_DOMAIN="kmag")
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
......
......@@ -37,6 +37,9 @@ KmagApp *kmagapp;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
KLocalizedString::setApplicationDomain("kmag");
// about the application
KAboutData aboutData(QStringLiteral("kmag"), i18n("KMagnifier"), QStringLiteral(KMAG_VERSION),
i18n("Screen magnifier for the K Desktop Environment (KDE)"),
......@@ -55,7 +58,6 @@ int main(int argc, char *argv[])
aboutData.addCredit(i18n("Sebastian Sauer"), i18n("Focus tracking"), QStringLiteral("sebsauer@kdab.com"));
aboutData.addCredit(i18n("Claudiu Costin"), i18n("Some tips"), QStringLiteral("claudiuc@work.ro"), QStringLiteral("http://www.ro.kde.org"));
QApplication app(argc, argv);
KAboutData::setApplicationData(aboutData);
if (app.isSessionRestored())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment