Recommend using serial key when online activation fails #5020
This commit is contained in:
parent
98385c06e9
commit
75adb5aa8d
|
@ -28,7 +28,8 @@
|
||||||
SetupWizard::SetupWizard(MainWindow& mainWindow, bool startMain) :
|
SetupWizard::SetupWizard(MainWindow& mainWindow, bool startMain) :
|
||||||
m_MainWindow(mainWindow),
|
m_MainWindow(mainWindow),
|
||||||
m_StartMain(startMain),
|
m_StartMain(startMain),
|
||||||
m_Edition(Unknown)
|
m_Edition(Unknown),
|
||||||
|
m_LoginAttemps(0)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
m_pPluginPage = new PluginWizardPage(mainWindow);
|
m_pPluginPage = new PluginWizardPage(mainWindow);
|
||||||
|
@ -94,6 +95,21 @@ bool SetupWizard::validateCurrentPage()
|
||||||
this);
|
this);
|
||||||
|
|
||||||
if (m_Edition == Unknown) {
|
if (m_Edition == Unknown) {
|
||||||
|
m_LoginAttemps++;
|
||||||
|
if (m_LoginAttemps == kMaximiumLoginAttemps) {
|
||||||
|
m_LoginAttemps = 0;
|
||||||
|
|
||||||
|
QMessageBox::StandardButton reply =
|
||||||
|
QMessageBox::information(
|
||||||
|
this, tr("Setup Synergy"),
|
||||||
|
tr("Would you like to use serial key to activate?"),
|
||||||
|
QMessageBox::Yes | QMessageBox::No);
|
||||||
|
|
||||||
|
if (reply == QMessageBox::Yes) {
|
||||||
|
m_pRadioButtonSubscription->setChecked(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -29,6 +29,11 @@ class MainWindow;
|
||||||
class SetupWizard : public QWizard, public Ui::SetupWizardBase
|
class SetupWizard : public QWizard, public Ui::SetupWizardBase
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
enum {
|
||||||
|
kMaximiumLoginAttemps = 3
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SetupWizard(MainWindow& mainWindow, bool startMain);
|
SetupWizard(MainWindow& mainWindow, bool startMain);
|
||||||
virtual ~SetupWizard();
|
virtual ~SetupWizard();
|
||||||
|
@ -45,6 +50,7 @@ private:
|
||||||
SynergyLocale m_Locale;
|
SynergyLocale m_Locale;
|
||||||
int m_Edition;
|
int m_Edition;
|
||||||
PluginWizardPage* m_pPluginPage;
|
PluginWizardPage* m_pPluginPage;
|
||||||
|
int m_LoginAttemps;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_m_pRadioButtonSubscription_toggled(bool checked);
|
void on_m_pRadioButtonSubscription_toggled(bool checked);
|
||||||
|
|
Loading…
Reference in New Issue