modernize: Prefer default member init over ctor init
[quassel.git] / src / client / clientidentity.h
index 8338b40..fb35aca 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2016 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef CLIENTIDENTITY_H
-#define CLIENTIDENTITY_H
+#pragma once
+
+#include "client-export.h"
 
 #include "identity.h"
 
 class ClientCertManager;
 
-class CertIdentity : public Identity
+class CLIENT_EXPORT CertIdentity : public Identity
 {
-    SYNCABLE_OBJECT
-        Q_OBJECT
+    Q_OBJECT
 
 public:
-    CertIdentity(IdentityId id = 0, QObject *parent = 0);
-    CertIdentity(const Identity &other, QObject *parent = 0);
-    CertIdentity(const CertIdentity &other, QObject *parent = 0);
+    CertIdentity(IdentityId id = 0, QObject *parent = nullptr);
+    CertIdentity(const Identity &other, QObject *parent = nullptr);
+    CertIdentity(const CertIdentity &other, QObject *parent = nullptr);
 
 #ifdef HAVE_SSL
     inline bool isDirty() const { return _isDirty; }
@@ -59,8 +59,8 @@ private slots:
     void markClean();
 
 private:
-    ClientCertManager *_certManager;
-    bool _isDirty;
+    ClientCertManager *_certManager{nullptr};
+    bool _isDirty{false};
     QSslKey _sslKey;
     QSslCertificate _sslCert;
 #endif //HAVE_SSL
@@ -71,6 +71,7 @@ private:
 //  ClientCertManager
 // ========================================
 #ifdef HAVE_SSL
+
 class ClientCertManager : public CertManager
 {
     Q_OBJECT
@@ -78,18 +79,15 @@ class ClientCertManager : public CertManager
 public:
     ClientCertManager(IdentityId id, CertIdentity *parent) : CertManager(id, parent), _certIdentity(parent) {}
 
-    virtual inline const QSslKey &sslKey() const { return _certIdentity->sslKey(); }
-    virtual inline const QSslCertificate &sslCert() const { return _certIdentity->sslCert(); }
+    inline const QSslKey &sslKey() const override { return _certIdentity->sslKey(); }
+    inline const QSslCertificate &sslCert() const override { return _certIdentity->sslCert(); }
 
 public slots:
-    virtual void setSslKey(const QByteArray &encoded);
-    virtual void setSslCert(const QByteArray &encoded);
+    void setSslKey(const QByteArray &encoded) override;
+    void setSslCert(const QByteArray &encoded) override;
 
 private:
     CertIdentity *_certIdentity;
 };
 
-
 #endif //HAVE_SSL
-
-#endif //CLIENTIDENTITY_H