X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclientidentity.cpp;h=8e561688b11104a02375df7bef72b2bcb2e51da8;hp=3507a10b7d5b3efd3e6d20ff5b80ec9f70692258;hb=8f2ee00f4edef1693628d3af0bdee84d725eb754;hpb=0dbec2cfc937857d66a9645249f876f1e6b3f05e diff --git a/src/client/clientidentity.cpp b/src/client/clientidentity.cpp index 3507a10b..8e561688 100644 --- a/src/client/clientidentity.cpp +++ b/src/client/clientidentity.cpp @@ -23,23 +23,14 @@ #include "client.h" #include "signalproxy.h" -INIT_SYNCABLE_OBJECT(CertIdentity) CertIdentity::CertIdentity(IdentityId id, QObject *parent) : Identity(id, parent) -#ifdef HAVE_SSL - , _certManager(0), - _isDirty(false) -#endif { } CertIdentity::CertIdentity(const Identity &other, QObject *parent) : Identity(other, parent) -#ifdef HAVE_SSL - , _certManager(0), - _isDirty(false) -#endif { } @@ -47,10 +38,9 @@ CertIdentity::CertIdentity(const Identity &other, QObject *parent) CertIdentity::CertIdentity(const CertIdentity &other, QObject *parent) : Identity(other, parent) #ifdef HAVE_SSL - , _certManager(0), - _isDirty(other._isDirty), - _sslKey(other._sslKey), - _sslCert(other._sslCert) + , _isDirty(other._isDirty) + , _sslKey(other._sslKey) + , _sslCert(other._sslCert) #endif { } @@ -65,8 +55,8 @@ void CertIdentity::enableEditSsl(bool enable) _certManager = new ClientCertManager(id(), this); if (isValid()) { // this means we are not a newly created Identity but have a proper Id Client::signalProxy()->synchronize(_certManager); - connect(_certManager, SIGNAL(updated()), this, SLOT(markClean())); - connect(_certManager, SIGNAL(initDone()), this, SLOT(markClean())); + connect(_certManager, &SyncableObject::updated, this, &CertIdentity::markClean); + connect(_certManager, &SyncableObject::initDone, this, &CertIdentity::markClean); } } @@ -111,10 +101,8 @@ void CertIdentity::markClean() void ClientCertManager::setSslKey(const QByteArray &encoded) { QSslKey key(encoded, QSsl::Rsa); -#if QT_VERSION >= 0x050500 if (key.isNull() && Client::isCoreFeatureEnabled(Quassel::Feature::EcdsaCertfpKeys)) key = QSslKey(encoded, QSsl::Ec); -#endif if (key.isNull()) key = QSslKey(encoded, QSsl::Dsa); _certIdentity->setSslKey(key); @@ -126,5 +114,4 @@ void ClientCertManager::setSslCert(const QByteArray &encoded) _certIdentity->setSslCert(QSslCertificate(encoded)); } - #endif // HAVE_SSL