modernize: Prefer default member init over ctor init
[quassel.git] / src / core / oidentdconfiggenerator.h
index f4128d6..ee3e53c 100644 (file)
 #include <QMutex>
 #include <QByteArray>
 
-#ifdef HAVE_UMASK
-#  include <sys/types.h>
-#  include <sys/stat.h>
-#endif /* HAVE_UMASK */
-
 #include "quassel.h"
 #include "coreidentity.h"
 
@@ -59,25 +54,25 @@ class OidentdConfigGenerator : public QObject
 {
     Q_OBJECT
 public:
-    /**
-     * @param strict If false, any identity a user chooses is reported to servers as authoritative.
-     *               If true, the user's quassel username is always reported.
-     */
-    explicit OidentdConfigGenerator(bool strict = false, QObject *parent = 0);
-    ~OidentdConfigGenerator();
+    explicit OidentdConfigGenerator(QObject *parent = nullptr);
+    ~OidentdConfigGenerator() override;
 
 public slots:
-    bool addSocket(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort);
-    bool removeSocket(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort);
+    bool addSocket(const CoreIdentity *identity, const QHostAddress &localAddress,
+                   quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort,
+                   qint64 socketId);
+    bool removeSocket(const CoreIdentity *identity, const QHostAddress &localAddress,
+                      quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort,
+                      qint64 socketId);
 
 private:
-    const QString sysidentForIdentity(const CoreIdentity *identity);
+    QString sysIdentForIdentity(const CoreIdentity *identity) const;
     bool init();
     bool writeConfig();
     bool parseConfig(bool readQuasselStanzas = false);
     bool lineByUs(const QByteArray &line);
 
-    bool _initialized;
+    bool _initialized{false};
     bool _strict;
     QDateTime _lastSync;
     QFile *_configFile;