[welcome] Use about-message from Config
- for QML, this is the easiest way to factor out the message (no convenient access to free functions, unless I bung the message into e.g. Branding where I don't think it fits very well).
This commit is contained in:
parent
f9f18e5d3b
commit
7e4fc3e4c7
@ -10,6 +10,7 @@
|
||||
#include "Config.h"
|
||||
|
||||
#include "Branding.h"
|
||||
#include "CalamaresAbout.h"
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
#include "Settings.h"
|
||||
@ -247,6 +248,13 @@ Config::setSupportUrl( const QString& url )
|
||||
emit supportUrlChanged();
|
||||
}
|
||||
|
||||
QString
|
||||
Config::aboutMessage() const
|
||||
{
|
||||
return Calamares::aboutString();
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
Config::genericWelcomeMessage() const
|
||||
{
|
||||
|
@ -52,6 +52,7 @@ class Config : public QObject
|
||||
Q_PROPERTY( QString countryCode MEMBER m_countryCode NOTIFY countryCodeChanged FINAL )
|
||||
Q_PROPERTY( int localeIndex READ localeIndex WRITE setLocaleIndex NOTIFY localeIndexChanged )
|
||||
|
||||
Q_PROPERTY( QString aboutMessage READ aboutMessage CONSTANT FINAL )
|
||||
Q_PROPERTY( QString genericWelcomeMessage MEMBER m_genericWelcomeMessage NOTIFY genericWelcomeMessageChanged FINAL )
|
||||
Q_PROPERTY( QString warningMessage READ warningMessage NOTIFY warningMessageChanged FINAL )
|
||||
|
||||
@ -89,6 +90,7 @@ public:
|
||||
QString donateUrl() const { return m_donateUrl; }
|
||||
void setDonateUrl( const QString& url );
|
||||
|
||||
QString aboutMessage() const;
|
||||
QString genericWelcomeMessage() const;
|
||||
QString warningMessage() const;
|
||||
|
||||
|
@ -223,7 +223,7 @@ WelcomePage::showAboutBox()
|
||||
= Calamares::Settings::instance()->isSetupMode() ? tr( "About %1 setup" ) : tr( "About %1 installer" );
|
||||
QMessageBox mb( QMessageBox::Information,
|
||||
title.arg( CALAMARES_APPLICATION_NAME ),
|
||||
Calamares::aboutString().arg( Calamares::Branding::instance()->versionedName() ),
|
||||
m_conf->aboutMessage().arg( Calamares::Branding::instance()->versionedName() ),
|
||||
QMessageBox::Ok,
|
||||
this );
|
||||
Calamares::fixButtonLabels( &mb );
|
||||
|
@ -18,9 +18,6 @@ Item {
|
||||
height: parent.height
|
||||
focus: true
|
||||
|
||||
property var appName: "Calamares"
|
||||
property var appVersion: "3.2.24"
|
||||
|
||||
Rectangle {
|
||||
id: textArea
|
||||
x: 28
|
||||
@ -44,21 +41,7 @@ Item {
|
||||
width: 400
|
||||
height: 250
|
||||
anchors.centerIn: parent
|
||||
text: qsTr("<h1>%1</h1><br/>
|
||||
<strong>%2<br/>
|
||||
for %3</strong><br/><br/>
|
||||
Copyright 2014-2017 Teo Mrnjavac <teo@kde.org><br/>
|
||||
Copyright 2017-2020 Adriaan de Groot <groot@kde.org><br/>
|
||||
Thanks to <a href='https://calamares.io/team/'>the Calamares team</a>
|
||||
and the <a href='https://www.transifex.com/calamares/calamares/'>Calamares
|
||||
translators team</a>.<br/><br/>
|
||||
<a href='https://calamares.io/'>Calamares</a>
|
||||
development is sponsored by <br/>
|
||||
<a href='http://www.blue-systems.com/'>Blue Systems</a> -
|
||||
Liberating Software." )
|
||||
.arg(appName)
|
||||
.arg(appVersion)
|
||||
.arg(Branding.string(Branding.VersionedName))
|
||||
text: config.aboutMessage.arg(Branding.string(Branding.VersionedName))
|
||||
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user