forked from qt-creator/qt-creator
QmlDesigner: prepand license type to about information
Task-number: QDS-12849 Change-Id: Ied891021c412af0941f6575a1b2d994ace2345ce Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -294,6 +294,7 @@ public:
|
||||
|
||||
MainWindow *m_mainwindow = nullptr;
|
||||
QTimer m_trimTimer;
|
||||
QString m_prependAboutInformation;
|
||||
QStringList m_aboutInformation;
|
||||
Context m_highPrioAdditionalContexts;
|
||||
Context m_lowPrioAdditionalContexts{Constants::C_GLOBAL};
|
||||
@@ -1215,7 +1216,9 @@ void ICore::saveSettings(SaveSettingsReason reason)
|
||||
*/
|
||||
QStringList ICore::additionalAboutInformation()
|
||||
{
|
||||
return d->m_aboutInformation;
|
||||
auto aboutInformation = d->m_aboutInformation;
|
||||
aboutInformation.prepend(d->m_prependAboutInformation);
|
||||
return aboutInformation;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -1226,6 +1229,14 @@ void ICore::clearAboutInformation()
|
||||
d->m_aboutInformation.clear();
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
void ICore::setPrependAboutInformation(const QString &line)
|
||||
{
|
||||
d->m_prependAboutInformation = line;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
@@ -142,6 +142,7 @@ public:
|
||||
static Utils::FilePath pathRelativeToActiveProject(const Utils::FilePath &path);
|
||||
static QStringList additionalAboutInformation();
|
||||
static void clearAboutInformation();
|
||||
static void setPrependAboutInformation(const QString &line);
|
||||
static void appendAboutInformation(const QString &line);
|
||||
static QString aboutInformationCompact();
|
||||
static QString aboutInformationHtml();
|
||||
|
@@ -665,12 +665,11 @@ void QmlDesignerPlugin::enforceDelayedInitialize()
|
||||
|
||||
FoundLicense license = checkLicense();
|
||||
if (license == FoundLicense::enterprise)
|
||||
Core::ICore::appendAboutInformation(tr("License: Enterprise"));
|
||||
Core::ICore::setPrependAboutInformation("License: Enterprise");
|
||||
else if (license == FoundLicense::professional)
|
||||
Core::ICore::appendAboutInformation(tr("License: Professional"));
|
||||
|
||||
if (!licensee().isEmpty())
|
||||
Core::ICore::appendAboutInformation(tr("Licensee: %1").arg(licensee()));
|
||||
Core::ICore::setPrependAboutInformation("License: Professional");
|
||||
else if (license == FoundLicense::community)
|
||||
Core::ICore::setPrependAboutInformation("License: Community");
|
||||
}
|
||||
|
||||
m_delayedInitialized = true;
|
||||
|
Reference in New Issue
Block a user