#5627 Enable encryption for Pro users

This commit is contained in:
Andrew Nelless 2016-09-30 17:01:43 +01:00 committed by Andrew Nelless
parent 2809530793
commit d6b7d8e357
4 changed files with 14 additions and 7 deletions

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>368</width>
<height>380</height>
<height>470</height>
</rect>
</property>
<property name="windowTitle">
@ -176,8 +176,11 @@
</property>
<item row="0" column="0">
<widget class="QCheckBox" name="m_pCheckBoxEnableCrypto">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Use &amp;SSL encryption (unique certificate)</string>
<string>Use &amp;SSL encryption</string>
</property>
</widget>
</item>

View File

@ -159,7 +159,7 @@ void AppConfig::loadSettings()
m_AutoConfigPrompted = settings().value("autoConfigPrompted", false).toBool();
m_Edition = settings().value("edition", Unregistered).toInt();
m_ActivateEmail = settings().value("activateEmail", "").toString();
m_CryptoEnabled = settings().value("cryptoEnabled", false).toBool();
m_CryptoEnabled = settings().value("cryptoEnabled", true).toBool();
m_AutoHide = settings().value("autoHide", false).toBool();
m_Serialkey = settings().value("serialKey", "").toString();
m_LastExpiringWarningTime = settings().value("lastExpiringWarningTime", 0).toInt();
@ -239,7 +239,7 @@ void AppConfig::setAutoConfigPrompted(bool prompted)
void AppConfig::setEdition(int e) { m_Edition = e; }
int AppConfig::edition() { return m_Edition; }
int AppConfig::edition() const { return m_Edition; }
bool AppConfig::setActivateEmail(QString e) {
m_ActivateEmail = e;
@ -279,7 +279,9 @@ ElevateMode AppConfig::elevateMode()
void AppConfig::setCryptoEnabled(bool e) { m_CryptoEnabled = e; }
bool AppConfig::getCryptoEnabled() { return m_CryptoEnabled; }
bool AppConfig::getCryptoEnabled() const {
return (edition() == Pro) && m_CryptoEnabled;
}
void AppConfig::setAutoHide(bool b) { m_AutoHide = b; }

View File

@ -75,7 +75,7 @@ class AppConfig
bool autoConfigPrompted();
void setAutoConfigPrompted(bool prompted);
void setEdition(int e);
int edition();
int edition() const;
bool setActivateEmail(QString e);
QString activateEmail();
bool setSerialKey(QString serial, QString& error);
@ -94,7 +94,7 @@ class AppConfig
ElevateMode elevateMode();
void setCryptoEnabled(bool e);
bool getCryptoEnabled();
bool getCryptoEnabled() const;
void setAutoHide(bool b);
bool getAutoHide();

View File

@ -23,6 +23,7 @@
#include "QSynergyApplication.h"
#include "QUtility.h"
#include "AppConfig.h"
#include "EditionType.h"
#include <QtCore>
#include <QtGui>
@ -61,6 +62,7 @@ SettingsDialog::SettingsDialog(QWidget* parent, AppConfig& config) :
#endif
m_pCheckBoxEnableCrypto->setChecked(m_AppConfig.getCryptoEnabled());
m_pCheckBoxEnableCrypto->setEnabled(m_AppConfig.edition() == Pro);
}
void SettingsDialog::accept()