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