|
|
@ -153,27 +153,28 @@ Branding::Branding( const QString& brandingFilePath,
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_KOSRelease
|
|
|
|
#ifdef WITH_KOSRelease
|
|
|
|
KOSRelease relInfo;
|
|
|
|
KOSRelease relInfo;
|
|
|
|
QHash<QString, QString> relMap;
|
|
|
|
|
|
|
|
relMap << "NAME" << relInfo.name()
|
|
|
|
QHash< QString, QString > relMap{
|
|
|
|
<< "VERSION" << relInfo.version()
|
|
|
|
std::initializer_list< std::pair< QString, QString > > {
|
|
|
|
<< "ID" << relInfo.id()
|
|
|
|
{ QStringLiteral( "NAME" ), relInfo.name() },
|
|
|
|
<< "ID_LIKE" << relInfo.idLike()
|
|
|
|
{ QStringLiteral( "VERSION" ), relInfo.version() },
|
|
|
|
<< "VERSION_CODENAME" << relInfo.versionCodename()
|
|
|
|
{ QStringLiteral( "ID" ), relInfo.id() },
|
|
|
|
<< "VERSION_ID" << relInfo.versionId()
|
|
|
|
{ QStringLiteral( "ID_LIKE" ), relInfo.idLike().join( ' ' ) },
|
|
|
|
<< "PRETTY_NAME" << relInfo.prettyName()
|
|
|
|
{ QStringLiteral( "VERSION_CODENAME" ), relInfo.versionCodename() },
|
|
|
|
<< "HOME_URL" << relInfo.homeUrl()
|
|
|
|
{ QStringLiteral( "VERSION_ID" ), relInfo.versionId() },
|
|
|
|
<< "DOCUMENTATION_URL" << relInfo.documentationUrl()
|
|
|
|
{ QStringLiteral( "PRETTY_NAME" ), relInfo.prettyName() },
|
|
|
|
<< "SUPPORT_URL" << relInfo.supportUrl()
|
|
|
|
{ QStringLiteral( "HOME_URL" ), relInfo.homeUrl() },
|
|
|
|
<< "BUG_REPORT_URL" << relInfo.bugReportUrl()
|
|
|
|
{ QStringLiteral( "DOCUMENTATION_URL" ), relInfo.documentationUrl() },
|
|
|
|
<< "PRIVACY_POLICY_URL" << relInfo.privacyPolicyUrl()
|
|
|
|
{ QStringLiteral( "SUPPORT_URL" ), relInfo.supportUrl() },
|
|
|
|
<< "BUILD_ID" << relInfo.buildId()
|
|
|
|
{ QStringLiteral( "BUG_REPORT_URL" ), relInfo.bugReportUrl() },
|
|
|
|
<< "VARIANT" << relInfo.variant()
|
|
|
|
{ QStringLiteral( "PRIVACY_POLICY_URL" ), relInfo.privacyPolicyUrl() },
|
|
|
|
<< "VARIANT_ID" << relInfo.variantId()
|
|
|
|
{ QStringLiteral( "BUILD_ID" ), relInfo.buildId() },
|
|
|
|
<< "LOGO" << relInfo.logo();
|
|
|
|
{ QStringLiteral( "VARIANT" ), relInfo.variant() },
|
|
|
|
|
|
|
|
{ QStringLiteral( "VARIANT_ID" ), relInfo.variantId() },
|
|
|
|
|
|
|
|
{ QStringLiteral( "LOGO" ), relInfo.logo() }
|
|
|
|
|
|
|
|
} };
|
|
|
|
loadStrings( m_strings, doc, "strings",
|
|
|
|
loadStrings( m_strings, doc, "strings",
|
|
|
|
[&]( const QString& s ) -> QString { return KMacroExpander::expandMacros{ s, relMap, '@' ); }
|
|
|
|
[&]( const QString& s ) -> QString { return KMacroExpander::expandMacros( s, relMap, QLatin1Char( '@' ) ); }
|
|
|
|
);
|
|
|
|
);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
// No support for substituting in os-release values.
|
|
|
|
// No support for substituting in os-release values.
|
|
|
|