summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2021-09-23 12:58:24 +0300
committerKatja Marttila <katja.marttila@qt.io>2021-09-24 10:29:21 +0300
commit6d426d0648333a60a52388258464eb200f519605 (patch)
treea368a33c45bc0e28e3cdd974d4ba8b74231ee3e8 /src
parent736a5e2bc01a20eb628f459f252e12fe25d00749 (diff)
Emit translationLoaded -signal after productkeycheck initHEADmaster
Productkeycheck needs the information about loaded language, send the signal after it is initialized. Change-Id: If85d5127c80ae0d5f2caa62c731c8669e8d6df7e Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/sdk/sdkapp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h
index 7573241cf..1e6580fef 100644
--- a/src/sdk/sdkapp.h
+++ b/src/sdk/sdkapp.h
@@ -196,6 +196,7 @@ public:
QInstaller::Protocol::Mode::Production, userArgs, isCommandLineInterface);
}
+ QLocale::Language lang = QLocale::AnyLanguage;
#ifndef IFW_DISABLE_TRANSLATIONS
if (!isCommandLineInterface) {
const QString directory = QLatin1String(":/translations");
@@ -226,7 +227,7 @@ public:
// To stop loading other translations it's sufficient that
// qt was loaded successfully or we hit English as system language
- emit m_core->defaultTranslationsLoadedForLanguage(locale.language());
+ lang = locale.language();
break;
}
}
@@ -236,6 +237,8 @@ public:
if (translator->load(translation, QLatin1String(":/translations")))
QCoreApplication::instance()->installTranslator(translator.take());
}
+ QLocale currentLocale(translations.at(0).section(QLatin1Char('_'), 1));
+ lang = currentLocale.language();
}
}
#endif
@@ -394,6 +397,8 @@ public:
errorMessage = e.message();
return false;
}
+ if (lang != QLocale::AnyLanguage)
+ emit m_core->defaultTranslationsLoadedForLanguage(lang);
ProductKeyCheck::instance()->addPackagesFromXml(QLatin1String(":/metadata/Updates.xml"));
return true;