#5629 Trigger activation dialog if previously unseen
This commit is contained in:
parent
02d75cd370
commit
bcf2d5de0d
|
@ -163,6 +163,7 @@ void AppConfig::loadSettings()
|
|||
m_AutoHide = settings().value("autoHide", false).toBool();
|
||||
m_Serialkey = settings().value("serialKey", "").toString();
|
||||
m_LastExpiringWarningTime = settings().value("lastExpiringWarningTime", 0).toInt();
|
||||
m_ActivationHasRun = settings().value("activationHasRun", false).toBool();
|
||||
}
|
||||
|
||||
void AppConfig::saveSettings()
|
||||
|
@ -188,6 +189,18 @@ void AppConfig::saveSettings()
|
|||
settings().setValue("autoHide", m_AutoHide);
|
||||
settings().setValue("serialKey", m_Serialkey);
|
||||
settings().setValue("lastExpiringWarningTime", m_LastExpiringWarningTime);
|
||||
settings().setValue("activationHasRun", m_ActivationHasRun);
|
||||
}
|
||||
|
||||
bool AppConfig::activationHasRun() const
|
||||
{
|
||||
return m_ActivationHasRun;
|
||||
}
|
||||
|
||||
AppConfig& AppConfig::activationHasRun(bool value)
|
||||
{
|
||||
m_ActivationHasRun = value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
QSettings &AppConfig::settings() { return *m_pSettings; }
|
||||
|
|
|
@ -100,6 +100,9 @@ class AppConfig
|
|||
|
||||
void saveSettings();
|
||||
|
||||
bool activationHasRun() const;
|
||||
AppConfig& activationHasRun(bool value);
|
||||
|
||||
protected:
|
||||
QSettings& settings();
|
||||
void setScreenName(const QString& s);
|
||||
|
@ -136,6 +139,7 @@ class AppConfig
|
|||
bool m_AutoHide;
|
||||
QString m_Serialkey;
|
||||
int m_LastExpiringWarningTime;
|
||||
bool m_ActivationHasRun;
|
||||
|
||||
static const char m_SynergysName[];
|
||||
static const char m_SynergycName[];
|
||||
|
|
|
@ -139,6 +139,12 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
|
|||
m_pLabelPadlock->hide();
|
||||
|
||||
updateLocalFingerprint();
|
||||
|
||||
if (!appConfig.activationHasRun() && (appConfig.edition() == Unregistered)) {
|
||||
ActivationDialog activationDialog (this, appConfig);
|
||||
activationDialog.exec();
|
||||
appConfig.activationHasRun(true);
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
|
Loading…
Reference in New Issue