modernize: Prefer default member init over ctor init
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 6 Sep 2018 20:43:39 +0000 (22:43 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 18 Nov 2018 10:06:43 +0000 (11:06 +0100)
Where appropriate, initialize class members in the header rather
than in the constructor.

79 files changed:
src/client/bufferviewoverlay.cpp
src/client/bufferviewoverlay.h
src/client/client.cpp
src/client/client.h
src/client/clientbacklogmanager.cpp
src/client/clientbacklogmanager.h
src/client/clientidentity.cpp
src/client/clientidentity.h
src/client/clientsettings.cpp
src/client/coreconnection.cpp
src/client/coreconnection.h
src/client/selectionmodelsynchronizer.cpp
src/client/selectionmodelsynchronizer.h
src/common/authhandler.cpp
src/common/authhandler.h
src/common/basichandler.cpp
src/common/basichandler.h
src/common/bufferinfo.cpp
src/common/bufferinfo.h
src/common/event.cpp
src/common/event.h
src/common/network.h
src/common/networkconfig.cpp
src/common/networkconfig.h
src/common/signalproxy.cpp
src/common/signalproxy.h
src/common/syncableobject.cpp
src/common/syncableobject.h
src/core/abstractsqlstorage.cpp
src/core/abstractsqlstorage.h
src/core/ctcpparser.h
src/core/oidentdconfiggenerator.cpp
src/core/oidentdconfiggenerator.h
src/core/postgresqlstorage.cpp
src/core/postgresqlstorage.h
src/core/sqlitestorage.cpp
src/core/sqlitestorage.h
src/core/sslserver.cpp
src/core/sslserver.h
src/qtui/channellistdlg.cpp
src/qtui/channellistdlg.h
src/qtui/chatscene.h
src/qtui/chatviewsearchcontroller.cpp
src/qtui/chatviewsearchcontroller.h
src/qtui/dockmanagernotificationbackend.cpp
src/qtui/dockmanagernotificationbackend.h
src/qtui/inputwidget.h
src/qtui/ircconnectionwizard.cpp
src/qtui/ircconnectionwizard.h
src/qtui/mainwin.cpp
src/qtui/mainwin.h
src/qtui/settingsdlg.cpp
src/qtui/settingsdlg.h
src/qtui/settingspages/aliasesmodel.cpp
src/qtui/settingspages/aliasesmodel.h
src/qtui/settingspages/bufferviewsettingspage.cpp
src/qtui/settingspages/bufferviewsettingspage.h
src/qtui/settingspages/coreaccountsettingspage.cpp
src/qtui/settingspages/coreaccountsettingspage.h
src/qtui/settingspages/identitiessettingspage.cpp
src/qtui/settingspages/identitiessettingspage.h
src/qtui/settingspages/ignorelistmodel.cpp
src/qtui/settingspages/ignorelistmodel.h
src/qtui/settingspages/keysequencewidget.cpp
src/qtui/settingspages/keysequencewidget.h
src/qtui/settingspages/networkssettingspage.cpp
src/qtui/settingspages/networkssettingspage.h
src/qtui/settingspages/notificationssettingspage.cpp
src/qtui/settingspages/notificationssettingspage.h
src/qtui/systraynotificationbackend.cpp
src/qtui/systraynotificationbackend.h
src/uisupport/flatproxymodel.cpp
src/uisupport/flatproxymodel.h
src/uisupport/multilineedit.cpp
src/uisupport/multilineedit.h
src/uisupport/networkmodelcontroller.cpp
src/uisupport/networkmodelcontroller.h
src/uisupport/styledlabel.cpp
src/uisupport/styledlabel.h

index d63a26d..20d33f8 100644 (file)
 const int BufferViewOverlay::_updateEventId = QEvent::registerEventType();
 
 BufferViewOverlay::BufferViewOverlay(QObject *parent)
 const int BufferViewOverlay::_updateEventId = QEvent::registerEventType();
 
 BufferViewOverlay::BufferViewOverlay(QObject *parent)
-    : QObject(parent),
-    _aboutToUpdate(false),
-    _uninitializedViewCount(0),
-    _allowedBufferTypes(0),
-    _minimumActivity(0)
+    : QObject(parent)
 {
 }
 
 {
 }
 
index a476434..4f3ab46 100644 (file)
@@ -75,14 +75,14 @@ private:
     void updateHelper();
     QSet<BufferId> filterBuffersByConfig(const QList<BufferId> &buffers, const BufferViewConfig *config);
 
     void updateHelper();
     QSet<BufferId> filterBuffersByConfig(const QList<BufferId> &buffers, const BufferViewConfig *config);
 
-    bool _aboutToUpdate;
+    bool _aboutToUpdate{false};
 
     QSet<int> _bufferViewIds;
 
     QSet<int> _bufferViewIds;
-    int _uninitializedViewCount;
+    int _uninitializedViewCount{0};
 
     QSet<NetworkId> _networkIds;
 
     QSet<NetworkId> _networkIds;
-    int _allowedBufferTypes;
-    int _minimumActivity;
+    int _allowedBufferTypes{0};
+    int _minimumActivity{0};
 
     QSet<BufferId> _buffers;
     QSet<BufferId> _removedBuffers;
 
     QSet<BufferId> _buffers;
     QSet<BufferId> _removedBuffers;
index 84e03c7..3c455ae 100644 (file)
@@ -61,25 +61,16 @@ Client::Client(std::unique_ptr<AbstractUi> ui, QObject *parent)
     _mainUi(std::move(ui)),
     _networkModel(new NetworkModel(this)),
     _bufferModel(new BufferModel(_networkModel)),
     _mainUi(std::move(ui)),
     _networkModel(new NetworkModel(this)),
     _bufferModel(new BufferModel(_networkModel)),
-    _bufferSyncer(nullptr),
-    _aliasManager(nullptr),
     _backlogManager(new ClientBacklogManager(this)),
     _backlogManager(new ClientBacklogManager(this)),
-    _bufferViewManager(nullptr),
     _bufferViewOverlay(new BufferViewOverlay(this)),
     _coreInfo(new CoreInfo(this)),
     _bufferViewOverlay(new BufferViewOverlay(this)),
     _coreInfo(new CoreInfo(this)),
-    _dccConfig(nullptr),
     _ircListHelper(new ClientIrcListHelper(this)),
     _inputHandler(new ClientUserInputHandler(this)),
     _ircListHelper(new ClientIrcListHelper(this)),
     _inputHandler(new ClientUserInputHandler(this)),
-    _networkConfig(nullptr),
-    _ignoreListManager(nullptr),
-    _highlightRuleManager(nullptr),
-    _transferManager(nullptr),
     _transferModel(new TransferModel(this)),
     _messageModel(_mainUi->createMessageModel(this)),
     _messageProcessor(_mainUi->createMessageProcessor(this)),
     _coreAccountModel(new CoreAccountModel(this)),
     _transferModel(new TransferModel(this)),
     _messageModel(_mainUi->createMessageModel(this)),
     _messageProcessor(_mainUi->createMessageProcessor(this)),
     _coreAccountModel(new CoreAccountModel(this)),
-    _coreConnection(new CoreConnection(this)),
-    _connected(false)
+    _coreConnection(new CoreConnection(this))
 {
 #ifdef EMBED_DATA
     Q_INIT_RESOURCE(data);
 {
 #ifdef EMBED_DATA
     Q_INIT_RESOURCE(data);
index 7642c3e..dd76191 100644 (file)
@@ -311,37 +311,37 @@ private:
 
     static void addNetwork(Network *);
 
 
     static void addNetwork(Network *);
 
-    SignalProxy *_signalProxy;
+    SignalProxy *_signalProxy{nullptr};
     std::unique_ptr<AbstractUi> _mainUi;
     std::unique_ptr<AbstractUi> _mainUi;
-    NetworkModel *_networkModel;
-    BufferModel *_bufferModel;
-    BufferSyncer *_bufferSyncer;
-    ClientAliasManager *_aliasManager;
-    ClientBacklogManager *_backlogManager;
-    ClientBufferViewManager *_bufferViewManager;
-    BufferViewOverlay *_bufferViewOverlay;
-    CoreInfo *_coreInfo;
-    DccConfig *_dccConfig;
-    ClientIrcListHelper *_ircListHelper;
-    ClientUserInputHandler *_inputHandler;
-    NetworkConfig *_networkConfig;
-    ClientIgnoreListManager *_ignoreListManager;
-    HighlightRuleManager *_highlightRuleManager;
-    ClientTransferManager *_transferManager;
-    TransferModel *_transferModel;
-
-    MessageModel *_messageModel;
-    AbstractMessageProcessor *_messageProcessor;
-
-    CoreAccountModel *_coreAccountModel;
-    CoreConnection *_coreConnection;
-
-    ClientMode clientMode;
+    NetworkModel *_networkModel{nullptr};
+    BufferModel *_bufferModel{nullptr};
+    BufferSyncer *_bufferSyncer{nullptr};
+    ClientAliasManager *_aliasManager{nullptr};
+    ClientBacklogManager *_backlogManager{nullptr};
+    ClientBufferViewManager *_bufferViewManager{nullptr};
+    BufferViewOverlay *_bufferViewOverlay{nullptr};
+    CoreInfo *_coreInfo{nullptr};
+    DccConfig *_dccConfig{nullptr};
+    ClientIrcListHelper *_ircListHelper{nullptr};
+    ClientUserInputHandler *_inputHandler{nullptr};
+    NetworkConfig *_networkConfig{nullptr};
+    ClientIgnoreListManager *_ignoreListManager{nullptr};
+    HighlightRuleManager *_highlightRuleManager{nullptr};
+    ClientTransferManager *_transferManager{nullptr};
+    TransferModel *_transferModel{nullptr};
+
+    MessageModel *_messageModel{nullptr};
+    AbstractMessageProcessor *_messageProcessor{nullptr};
+
+    CoreAccountModel *_coreAccountModel{nullptr};
+    CoreConnection *_coreConnection{nullptr};
+
+    ClientMode clientMode{};
 
     QHash<NetworkId, Network *> _networks;
     QHash<IdentityId, Identity *> _identities;
 
 
     QHash<NetworkId, Network *> _networks;
     QHash<IdentityId, Identity *> _identities;
 
-    bool _connected;
+    bool _connected{false};
 
     QList<QPair<BufferInfo, QString> > _userInputBuffer;
 
 
     QList<QPair<BufferInfo, QString> > _userInputBuffer;
 
index afb9faa..03f851b 100644 (file)
@@ -30,9 +30,7 @@
 #include <QDebug>
 
 ClientBacklogManager::ClientBacklogManager(QObject *parent)
 #include <QDebug>
 
 ClientBacklogManager::ClientBacklogManager(QObject *parent)
-    : BacklogManager(parent),
-    _requester(nullptr),
-    _initBacklogRequested(false)
+    : BacklogManager(parent)
 {
 }
 
 {
 }
 
index 1f71027..aa58a4d 100644 (file)
@@ -62,8 +62,8 @@ private:
 
     void dispatchMessages(const MessageList &messages, bool sort = false);
 
 
     void dispatchMessages(const MessageList &messages, bool sort = false);
 
-    BacklogRequester *_requester;
-    bool _initBacklogRequested;
+    BacklogRequester *_requester{nullptr};
+    bool _initBacklogRequested{false};
     QSet<BufferId> _buffersRequested;
 };
 
     QSet<BufferId> _buffersRequested;
 };
 
index 16e1c42..dc6ebe5 100644 (file)
 
 CertIdentity::CertIdentity(IdentityId id, QObject *parent)
     : Identity(id, parent)
 
 CertIdentity::CertIdentity(IdentityId id, QObject *parent)
     : Identity(id, parent)
-#ifdef HAVE_SSL
-    ,  _certManager(nullptr),
-    _isDirty(false)
-#endif
 {
 }
 
 
 CertIdentity::CertIdentity(const Identity &other, QObject *parent)
     : Identity(other, parent)
 {
 }
 
 
 CertIdentity::CertIdentity(const Identity &other, QObject *parent)
     : Identity(other, parent)
-#ifdef HAVE_SSL
-    , _certManager(nullptr),
-    _isDirty(false)
-#endif
 {
 }
 
 {
 }
 
@@ -46,10 +38,9 @@ CertIdentity::CertIdentity(const Identity &other, QObject *parent)
 CertIdentity::CertIdentity(const CertIdentity &other, QObject *parent)
     : Identity(other, parent)
 #ifdef HAVE_SSL
 CertIdentity::CertIdentity(const CertIdentity &other, QObject *parent)
     : Identity(other, parent)
 #ifdef HAVE_SSL
-    , _certManager(nullptr),
-    _isDirty(other._isDirty),
-    _sslKey(other._sslKey),
-    _sslCert(other._sslCert)
+    , _isDirty(other._isDirty)
+    , _sslKey(other._sslKey)
+    , _sslCert(other._sslCert)
 #endif
 {
 }
 #endif
 {
 }
index 4aa81c8..fb35aca 100644 (file)
@@ -59,8 +59,8 @@ private slots:
     void markClean();
 
 private:
     void markClean();
 
 private:
-    ClientCertManager *_certManager;
-    bool _isDirty;
+    ClientCertManager *_certManager{nullptr};
+    bool _isDirty{false};
     QSslKey _sslKey;
     QSslCertificate _sslCert;
 #endif //HAVE_SSL
     QSslKey _sslKey;
     QSslCertificate _sslCert;
 #endif //HAVE_SSL
index 171d7fe..cf0cb8d 100644 (file)
@@ -18,6 +18,8 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
+#include <utility>
+
 #include <QStringList>
 
 #include "clientsettings.h"
 #include <QStringList>
 
 #include "clientsettings.h"
@@ -25,7 +27,6 @@
 #include <QHostAddress>
 #ifdef HAVE_SSL
 #include <QSslSocket>
 #include <QHostAddress>
 #ifdef HAVE_SSL
 #include <QSslSocket>
-#include <utility>
 #endif
 
 #include "client.h"
 #endif
 
 #include "client.h"
index 90e0289..d333b53 100644 (file)
 
 CoreConnection::CoreConnection(QObject *parent)
     : QObject(parent),
 
 CoreConnection::CoreConnection(QObject *parent)
     : QObject(parent),
-    _authHandler(nullptr),
-    _state(Disconnected),
-    _wantReconnect(false),
-    _wasReconnect(false),
-    _progressMinimum(0),
-    _progressMaximum(-1),
-    _progressValue(-1),
-    _resetting(false)
+    _authHandler(nullptr)
 {
     qRegisterMetaType<ConnectionState>("CoreConnection::ConnectionState");
 }
 {
     qRegisterMetaType<ConnectionState>("CoreConnection::ConnectionState");
 }
index 56a5a29..7902022 100644 (file)
@@ -152,18 +152,18 @@ private slots:
 private:
     QPointer<ClientAuthHandler> _authHandler;
     QPointer<Peer> _peer;
 private:
     QPointer<ClientAuthHandler> _authHandler;
     QPointer<Peer> _peer;
-    ConnectionState _state;
+    ConnectionState _state{Disconnected};
 
     QTimer _reconnectTimer;
 
     QTimer _reconnectTimer;
-    bool _wantReconnect;
-    bool _wasReconnect;
+    bool _wantReconnect{false};
+    bool _wasReconnect{false};
 
     QSet<QObject *> _netsToSync;
     int _numNetsToSync;
 
     QSet<QObject *> _netsToSync;
     int _numNetsToSync;
-    int _progressMinimum, _progressMaximum, _progressValue;
+    int _progressMinimum{0}, _progressMaximum{-1}, _progressValue{-1};
     QString _progressText;
 
     QString _progressText;
 
-    bool _resetting;
+    bool _resetting{false};
 
     CoreAccount _account;
     CoreAccountModel *accountModel() const;
 
     CoreAccount _account;
     CoreAccountModel *accountModel() const;
index 6329572..717ef4e 100644 (file)
@@ -28,9 +28,7 @@
 SelectionModelSynchronizer::SelectionModelSynchronizer(QAbstractItemModel *parent)
     : QObject(parent),
     _model(parent),
 SelectionModelSynchronizer::SelectionModelSynchronizer(QAbstractItemModel *parent)
     : QObject(parent),
     _model(parent),
-    _selectionModel(parent),
-    _changeCurrentEnabled(true),
-    _changeSelectionEnabled(true)
+    _selectionModel(parent)
 {
     connect(&_selectionModel, SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
         this, SLOT(currentChanged(const QModelIndex &, const QModelIndex &)));
 {
     connect(&_selectionModel, SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
         this, SLOT(currentChanged(const QModelIndex &, const QModelIndex &)));
index cad7edf..b830d31 100644 (file)
@@ -57,8 +57,8 @@ private slots:
 private:
     QAbstractItemModel *_model;
     QItemSelectionModel _selectionModel;
 private:
     QAbstractItemModel *_model;
     QItemSelectionModel _selectionModel;
-    bool _changeCurrentEnabled;
-    bool _changeSelectionEnabled;
+    bool _changeCurrentEnabled{true};
+    bool _changeSelectionEnabled{true};
 
     bool checkBaseModel(QItemSelectionModel *model);
     QModelIndex mapFromSource(const QModelIndex &sourceIndex, const QItemSelectionModel *selectionModel);
 
     bool checkBaseModel(QItemSelectionModel *model);
     QModelIndex mapFromSource(const QModelIndex &sourceIndex, const QItemSelectionModel *selectionModel);
index b87400b..6794730 100644 (file)
@@ -23,9 +23,7 @@
 #include "authhandler.h"
 
 AuthHandler::AuthHandler(QObject *parent)
 #include "authhandler.h"
 
 AuthHandler::AuthHandler(QObject *parent)
-    : QObject(parent),
-    _socket(nullptr),
-    _disconnectedSent(false)
+    : QObject(parent)
 {
 
 }
 {
 
 }
index d5c5471..0d30e66 100644 (file)
@@ -71,6 +71,6 @@ protected slots:
 private:
     void invalidMessage();
 
 private:
     void invalidMessage();
 
-    QTcpSocket *_socket; // FIXME: should be a QSharedPointer? -> premature disconnect before the peer has taken over
-    bool _disconnectedSent;
+    QTcpSocket *_socket{nullptr}; // FIXME: should be a QSharedPointer? -> premature disconnect before the peer has taken over
+    bool _disconnectedSent{false};
 };
 };
index 5c3140f..906e82e 100644 (file)
@@ -26,8 +26,6 @@
 
 BasicHandler::BasicHandler(QObject *parent)
     : QObject(parent),
 
 BasicHandler::BasicHandler(QObject *parent)
     : QObject(parent),
-    _defaultHandler(-1),
-    _initDone(false),
     _methodPrefix("handle")
 {
 }
     _methodPrefix("handle")
 {
 }
@@ -35,8 +33,6 @@ BasicHandler::BasicHandler(QObject *parent)
 
 BasicHandler::BasicHandler(QString methodPrefix, QObject *parent)
     : QObject(parent),
 
 BasicHandler::BasicHandler(QString methodPrefix, QObject *parent)
     : QObject(parent),
-    _defaultHandler(-1),
-    _initDone(false),
     _methodPrefix(std::move(methodPrefix))
 {
 }
     _methodPrefix(std::move(methodPrefix))
 {
 }
index 8b63374..d2a3ef2 100644 (file)
@@ -48,7 +48,7 @@ protected:
 private:
     const QHash<QString, int> &handlerHash();
     QHash<QString, int> _handlerHash;
 private:
     const QHash<QString, int> &handlerHash();
     QHash<QString, int> _handlerHash;
-    int _defaultHandler;
-    bool _initDone;
+    int _defaultHandler{-1};
+    bool _initDone{false};
     QString _methodPrefix;
 };
     QString _methodPrefix;
 };
index 8ac1f4b..2eaa2ed 100644 (file)
@@ -31,8 +31,6 @@
 BufferInfo::BufferInfo()
     : _bufferId(0),
     _netid(0),
 BufferInfo::BufferInfo()
     : _bufferId(0),
     _netid(0),
-    _type(InvalidBuffer),
-    _groupId(0),
     _bufferName(QString())
 {
 }
     _bufferName(QString())
 {
 }
index 6e77e63..e20ce9b 100644 (file)
@@ -67,8 +67,8 @@ public:
 private:
     BufferId _bufferId;
     NetworkId _netid;
 private:
     BufferId _bufferId;
     NetworkId _netid;
-    Type _type;
-    uint _groupId;
+    Type _type{InvalidBuffer};
+    uint _groupId{0};
     QString _bufferName;
 
     friend uint qHash(const BufferInfo &);
     QString _bufferName;
 
     friend uint qHash(const BufferInfo &);
index 4d9a6de..4bb0221 100644 (file)
 
 Event::Event(EventManager::EventType type)
     : _type(type)
 
 Event::Event(EventManager::EventType type)
     : _type(type)
-    , _valid(true)
 {
 }
 
 
 Event::Event(EventManager::EventType type, QVariantMap &map)
     : _type(type)
 {
 }
 
 
 Event::Event(EventManager::EventType type, QVariantMap &map)
     : _type(type)
-    , _valid(true)
 {
     if (!map.contains("flags") || !map.contains("timestamp")) {
         qWarning() << "Received invalid serialized event:" << map;
 {
     if (!map.contains("flags") || !map.contains("timestamp")) {
         qWarning() << "Received invalid serialized event:" << map;
index 10bfdab..02caa83 100644 (file)
@@ -72,7 +72,7 @@ private:
     EventManager::EventType _type;
     EventManager::EventFlags _flags;
     QDateTime _timestamp;
     EventManager::EventType _type;
     EventManager::EventFlags _flags;
     QDateTime _timestamp;
-    bool _valid;
+    bool _valid{true};
 
     friend COMMON_EXPORT QDebug operator<<(QDebug dbg, Event *e);
 };
 
     friend COMMON_EXPORT QDebug operator<<(QDebug dbg, Event *e);
 };
index 9e50e4a..1275436 100644 (file)
@@ -117,28 +117,27 @@ public :
 
     struct Server {
         QString host;
 
     struct Server {
         QString host;
-        uint port;
+        uint port{6667};
         QString password;
         QString password;
-        bool useSsl;
-        bool sslVerify;     /// If true, validate SSL certificates
-        int sslVersion;
+        bool useSsl{false};
+        bool sslVerify{true};     /// If true, validate SSL certificates
+        int sslVersion{0};
 
 
-        bool useProxy;
-        int proxyType;
+        bool useProxy{false};
+        int proxyType{QNetworkProxy::Socks5Proxy};
         QString proxyHost;
         QString proxyHost;
-        uint proxyPort;
+        uint proxyPort{8080};
         QString proxyUser;
         QString proxyPass;
 
         // sslVerify only applies when useSsl is true.  sslVerify should be enabled by default,
         // so enabling useSsl offers a more secure default.
         QString proxyUser;
         QString proxyPass;
 
         // sslVerify only applies when useSsl is true.  sslVerify should be enabled by default,
         // so enabling useSsl offers a more secure default.
-        Server() : port(6667), useSsl(false), sslVerify(true), sslVersion(0), useProxy(false),
-            proxyType(QNetworkProxy::Socks5Proxy), proxyHost("localhost"), proxyPort(8080) {}
+        Server() :  proxyHost("localhost") {}
 
         Server(QString host, uint port, QString password, bool useSsl,
                bool sslVerify)
             : host(std::move(host)), port(port), password(std::move(password)), useSsl(useSsl), sslVerify(sslVerify),
 
         Server(QString host, uint port, QString password, bool useSsl,
                bool sslVerify)
             : host(std::move(host)), port(port), password(std::move(password)), useSsl(useSsl), sslVerify(sslVerify),
-              sslVersion(0), useProxy(false), proxyType(QNetworkProxy::Socks5Proxy),
+               proxyType(QNetworkProxy::Socks5Proxy),
               proxyHost("localhost"), proxyPort(8080) {}
 
         bool operator==(const Server &other) const;
               proxyHost("localhost"), proxyPort(8080) {}
 
         bool operator==(const Server &other) const;
index b8170cb..1c0eb37 100644 (file)
 #include "networkconfig.h"
 
 NetworkConfig::NetworkConfig(const QString &objectName, QObject *parent)
 #include "networkconfig.h"
 
 NetworkConfig::NetworkConfig(const QString &objectName, QObject *parent)
-    : SyncableObject(objectName, parent),
-    _pingTimeoutEnabled(true),
-    _pingInterval(30),
-    _maxPingCount(6),
-    _autoWhoEnabled(true),
-    _autoWhoInterval(90),
-    _autoWhoNickLimit(200),
-    _autoWhoDelay(5),
-    _standardCtcp(false)
+    : SyncableObject(objectName, parent)
 {
 }
 
 {
 }
 
index 83574f9..d1d10b9 100644 (file)
@@ -93,14 +93,14 @@ signals:
 //   void setAutoWhoDelayRequested(int);
 
 private:
 //   void setAutoWhoDelayRequested(int);
 
 private:
-    bool _pingTimeoutEnabled;
-    int _pingInterval;
-    int _maxPingCount;
+    bool _pingTimeoutEnabled{true};
+    int _pingInterval{30};
+    int _maxPingCount{6};
 
 
-    bool _autoWhoEnabled;
-    int _autoWhoInterval;
-    int _autoWhoNickLimit;
-    int _autoWhoDelay;
+    bool _autoWhoEnabled{true};
+    int _autoWhoInterval{90};
+    int _autoWhoNickLimit{200};
+    int _autoWhoDelay{5};
 
 
-    bool _standardCtcp;
+    bool _standardCtcp{false};
 };
 };
index 7bd8751..0cc7994 100644 (file)
@@ -68,11 +68,11 @@ public:
 
 private:
     struct Signal {
 
 private:
     struct Signal {
-        QObject *sender;
-        int signalId;
+        QObject *sender{nullptr};
+        int signalId{-1};
         QByteArray signature;
         Signal(QObject *sender, int sigId, QByteArray signature) : sender(sender), signalId(sigId), signature(std::move(signature)) {}
         QByteArray signature;
         Signal(QObject *sender, int sigId, QByteArray signature) : sender(sender), signalId(sigId), signature(std::move(signature)) {}
-        Signal() : sender(nullptr), signalId(-1) {}
+        Signal()  {}
     };
 
     SignalProxy *_proxy;
     };
 
     SignalProxy *_proxy;
index e6f594d..a948617 100644 (file)
@@ -232,7 +232,7 @@ class SignalProxy::ExtendedMetaObject
     {
     public:
         MethodDescriptor(const QMetaMethod &method);
     {
     public:
         MethodDescriptor(const QMetaMethod &method);
-        MethodDescriptor() : _returnType(-1), _minArgCount(-1), _receiverMode(SignalProxy::Client) {}
+        MethodDescriptor()  {}
 
         inline const QByteArray &methodName() const { return _methodName; }
         inline const QList<int> &argTypes() const { return _argTypes; }
 
         inline const QByteArray &methodName() const { return _methodName; }
         inline const QList<int> &argTypes() const { return _argTypes; }
@@ -243,9 +243,9 @@ class SignalProxy::ExtendedMetaObject
     private:
         QByteArray _methodName;
         QList<int> _argTypes;
     private:
         QByteArray _methodName;
         QList<int> _argTypes;
-        int _returnType;
-        int _minArgCount;
-        SignalProxy::ProxyMode _receiverMode; // Only acceptable as a Sync Call if the receiving SignalProxy is in this mode.
+        int _returnType{-1};
+        int _minArgCount{-1};
+        SignalProxy::ProxyMode _receiverMode{SignalProxy::Client}; // Only acceptable as a Sync Call if the receiving SignalProxy is in this mode.
     };
 
 
     };
 
 
index 2c42ea4..f43a155 100644 (file)
 #include "util.h"
 
 SyncableObject::SyncableObject(QObject *parent)
 #include "util.h"
 
 SyncableObject::SyncableObject(QObject *parent)
-    : QObject(parent),
-    _initialized(false),
-    _allowClientUpdates(false)
+    : QObject(parent)
 {
 }
 
 
 SyncableObject::SyncableObject(const QString &objectName, QObject *parent)
 {
 }
 
 
 SyncableObject::SyncableObject(const QString &objectName, QObject *parent)
-    : QObject(parent),
-    _initialized(false),
-    _allowClientUpdates(false)
+    : QObject(parent)
 {
     setObjectName(objectName);
 }
 {
     setObjectName(objectName);
 }
index 7b08043..9031f13 100644 (file)
@@ -109,8 +109,8 @@ private:
 
     bool setInitValue(const QString &property, const QVariant &value);
 
 
     bool setInitValue(const QString &property, const QVariant &value);
 
-    bool _initialized;
-    bool _allowClientUpdates;
+    bool _initialized{false};
+    bool _allowClientUpdates{false};
 
     QList<SignalProxy *> _signalProxies;
 
 
     QList<SignalProxy *> _signalProxies;
 
index 7f5d115..10c0f50 100644 (file)
@@ -31,8 +31,7 @@
 
 int AbstractSqlStorage::_nextConnectionId = 0;
 AbstractSqlStorage::AbstractSqlStorage(QObject *parent)
 
 int AbstractSqlStorage::_nextConnectionId = 0;
 AbstractSqlStorage::AbstractSqlStorage(QObject *parent)
-    : Storage(parent),
-    _schemaVersion(0)
+    : Storage(parent)
 {
 }
 
 {
 }
 
@@ -402,7 +401,6 @@ AbstractSqlStorage::Connection::~Connection()
 //  AbstractSqlMigrator
 // ========================================
 AbstractSqlMigrator::AbstractSqlMigrator()
 //  AbstractSqlMigrator
 // ========================================
 AbstractSqlMigrator::AbstractSqlMigrator()
-    : _query(nullptr)
 {
 }
 
 {
 }
 
@@ -489,8 +487,7 @@ void AbstractSqlMigrator::dumpStatus()
 //  AbstractSqlMigrationReader
 // ========================================
 AbstractSqlMigrationReader::AbstractSqlMigrationReader()
 //  AbstractSqlMigrationReader
 // ========================================
 AbstractSqlMigrationReader::AbstractSqlMigrationReader()
-    : AbstractSqlMigrator(),
-    _writer(nullptr)
+    : AbstractSqlMigrator()
 {
 }
 
 {
 }
 
index d4670e7..2224d5c 100644 (file)
@@ -112,7 +112,7 @@ private:
     void addConnectionToPool();
     void dbConnect(QSqlDatabase &db);
 
     void addConnectionToPool();
     void dbConnect(QSqlDatabase &db);
 
-    int _schemaVersion;
+    int _schemaVersion{0};
     bool _debug;
 
     static int _nextConnectionId;
     bool _debug;
 
     static int _nextConnectionId;
@@ -167,11 +167,11 @@ public:
     };
 
     struct SenderMO {
     };
 
     struct SenderMO {
-        qint64 senderId;
+        qint64 senderId{0};
         QString sender;
         QString realname;
         QString avatarurl;
         QString sender;
         QString realname;
         QString avatarurl;
-        SenderMO() : senderId(0) {}
+        SenderMO()  {}
     };
 
     struct IdentityMO {
     };
 
     struct IdentityMO {
@@ -332,7 +332,7 @@ protected:
     virtual bool commit() = 0;
 
 private:
     virtual bool commit() = 0;
 
 private:
-    QSqlQuery *_query;
+    QSqlQuery *_query{nullptr};
 };
 
 
 };
 
 
@@ -360,7 +360,7 @@ private:
 
     template<typename T> bool transferMo(MigrationObject moType, T &mo);
 
 
     template<typename T> bool transferMo(MigrationObject moType, T &mo);
 
-    AbstractSqlMigrationWriter *_writer;
+    AbstractSqlMigrationWriter *_writer{nullptr};
 };
 
 
 };
 
 
index 9630f6c..7fd2a83 100644 (file)
@@ -85,11 +85,11 @@ private:
     CoreSession *_coreSession;
 
     struct CtcpReply {
     CoreSession *_coreSession;
 
     struct CtcpReply {
-        CoreNetwork *network;
+        CoreNetwork *network{nullptr};
         QString bufferName;
         QList<QByteArray> replies;
 
         QString bufferName;
         QList<QByteArray> replies;
 
-        CtcpReply() : network(nullptr) {}
+        CtcpReply()  {}
         CtcpReply(CoreNetwork *net, QString buf) : network(net), bufferName(std::move(buf)) {}
     };
 
         CtcpReply(CoreNetwork *net, QString buf) : network(net), bufferName(std::move(buf)) {}
     };
 
index ecb69b4..08b7636 100644 (file)
@@ -29,8 +29,7 @@
 #include "oidentdconfiggenerator.h"
 
 OidentdConfigGenerator::OidentdConfigGenerator(QObject *parent) :
 #include "oidentdconfiggenerator.h"
 
 OidentdConfigGenerator::OidentdConfigGenerator(QObject *parent) :
-    QObject(parent),
-    _initialized(false)
+    QObject(parent)
 {
     if (!_initialized)
         init();
 {
     if (!_initialized)
         init();
index fc022fe..ee3e53c 100644 (file)
@@ -72,7 +72,7 @@ private:
     bool parseConfig(bool readQuasselStanzas = false);
     bool lineByUs(const QByteArray &line);
 
     bool parseConfig(bool readQuasselStanzas = false);
     bool lineByUs(const QByteArray &line);
 
-    bool _initialized;
+    bool _initialized{false};
     bool _strict;
     QDateTime _lastSync;
     QFile *_configFile;
     bool _strict;
     QDateTime _lastSync;
     QFile *_configFile;
index 5e6517c..6b2642b 100644 (file)
@@ -27,8 +27,7 @@
 #include "quassel.h"
 
 PostgreSqlStorage::PostgreSqlStorage(QObject *parent)
 #include "quassel.h"
 
 PostgreSqlStorage::PostgreSqlStorage(QObject *parent)
-    : AbstractSqlStorage(parent),
-    _port(-1)
+    : AbstractSqlStorage(parent)
 {
 }
 
 {
 }
 
index 3643ecc..599bb54 100644 (file)
@@ -155,7 +155,7 @@ private:
     QSqlQuery prepareAndExecuteQuery(const QString &queryname, QSqlDatabase &db) { return prepareAndExecuteQuery(queryname, QString(), db); }
 
     QString _hostName;
     QSqlQuery prepareAndExecuteQuery(const QString &queryname, QSqlDatabase &db) { return prepareAndExecuteQuery(queryname, QString(), db); }
 
     QString _hostName;
-    int _port;
+    int _port{-1};
     QString _databaseName;
     QString _userName;
     QString _password;
     QString _databaseName;
     QString _userName;
     QString _password;
index bf6f3f7..b555173 100644 (file)
@@ -2209,8 +2209,7 @@ bool SqliteStorage::safeExec(QSqlQuery &query, int retryCount)
 //  SqliteMigration
 // ========================================
 SqliteMigrationReader::SqliteMigrationReader()
 //  SqliteMigration
 // ========================================
 SqliteMigrationReader::SqliteMigrationReader()
-    : SqliteStorage(),
-    _maxId(0)
+    : SqliteStorage()
 {
 }
 
 {
 }
 
index ab4c826..c88a3c6 100644 (file)
@@ -183,7 +183,7 @@ protected:
 
 private:
     void setMaxId(MigrationObject mo);
 
 private:
     void setMaxId(MigrationObject mo);
-    qint64 _maxId;
+    qint64 _maxId{0};
 };
 
 
 };
 
 
index 83d7e60..1d5a103 100644 (file)
@@ -32,8 +32,7 @@
 #ifdef HAVE_SSL
 
 SslServer::SslServer(QObject *parent)
 #ifdef HAVE_SSL
 
 SslServer::SslServer(QObject *parent)
-    : QTcpServer(parent),
-    _isCertValid(false)
+    : QTcpServer(parent)
 {
     // Keep track if the SSL warning has been mentioned at least once before
     static bool sslWarningShown = false;
 {
     // Keep track if the SSL warning has been mentioned at least once before
     static bool sslWarningShown = false;
index 2e18aa1..6ca1b91 100644 (file)
@@ -73,7 +73,7 @@ private:
     QSslCertificate _cert;
     QSslKey _key;
     QList<QSslCertificate> _ca;
     QSslCertificate _cert;
     QSslKey _key;
     QList<QSslCertificate> _ca;
-    bool _isCertValid;
+    bool _isCertValid{false};
 
     // Used when reloading certificates later
     QString _sslCertPath; /// Path to the certificate file
 
     // Used when reloading certificates later
     QString _sslCertPath; /// Path to the certificate file
index 204590e..de872a7 100644 (file)
 
 ChannelListDlg::ChannelListDlg(QWidget *parent)
     : QDialog(parent),
 
 ChannelListDlg::ChannelListDlg(QWidget *parent)
     : QDialog(parent),
-    _listFinished(true),
     _ircListModel(this),
     _ircListModel(this),
-    _sortFilter(this),
-    _simpleModeSpacer(nullptr),
-    _advancedMode(false)
+    _sortFilter(this)
 {
     _sortFilter.setSourceModel(&_ircListModel);
     _sortFilter.setFilterCaseSensitivity(Qt::CaseInsensitive);
 {
     _sortFilter.setSourceModel(&_ircListModel);
     _sortFilter.setFilterCaseSensitivity(Qt::CaseInsensitive);
index 5136ef3..cfa45a3 100644 (file)
@@ -78,12 +78,12 @@ private:
 
     Ui::ChannelListDlg ui;
 
 
     Ui::ChannelListDlg ui;
 
-    bool _listFinished;
+    bool _listFinished{true};
     NetworkId _netId;
     IrcListModel _ircListModel;
     QSortFilterProxyModel _sortFilter;
     NetworkId _netId;
     IrcListModel _ircListModel;
     QSortFilterProxyModel _sortFilter;
-    QSpacerItem *_simpleModeSpacer;
-    bool _advancedMode;
+    QSpacerItem *_simpleModeSpacer{nullptr};
+    bool _advancedMode{false};
 };
 
 
 };
 
 
index ed27be7..29e3d9e 100644 (file)
@@ -286,13 +286,13 @@ private:
             ShowPreview,
             HidePreview
         };
             ShowPreview,
             HidePreview
         };
-        ChatItem *parentItem;
-        QGraphicsItem *previewItem;
+        ChatItem *parentItem{nullptr};
+        QGraphicsItem *previewItem{nullptr};
         QUrl url;
         QRectF urlRect;
         QUrl url;
         QRectF urlRect;
-        PreviewState previewState;
+        PreviewState previewState{NoPreview};
         QTimer timer;
         QTimer timer;
-        WebPreview() : parentItem(nullptr), previewItem(nullptr), previewState(NoPreview) {}
+        WebPreview()  {}
     };
     WebPreview webPreview;
 #endif // HAVE_WEBKIT || HAVE_WEBENGINE
     };
     WebPreview webPreview;
 #endif // HAVE_WEBKIT || HAVE_WEBENGINE
index bb6dc36..930aea5 100644 (file)
 #include "messagemodel.h"
 
 ChatViewSearchController::ChatViewSearchController(QObject *parent)
 #include "messagemodel.h"
 
 ChatViewSearchController::ChatViewSearchController(QObject *parent)
-    : QObject(parent),
-    _scene(nullptr),
-    _currentHighlight(0),
-    _caseSensitive(false),
-    _searchSenders(false),
-    _searchMsgs(true),
-    _searchOnlyRegularMsgs(true)
+    : QObject(parent)
 {
 }
 
 {
 }
 
index ce2c49f..8e9c8d6 100644 (file)
@@ -67,14 +67,14 @@ signals:
 
 private:
     QString _searchString;
 
 private:
     QString _searchString;
-    ChatScene *_scene;
+    ChatScene *_scene{nullptr};
     QList<SearchHighlightItem *> _highlightItems;
     QList<SearchHighlightItem *> _highlightItems;
-    int _currentHighlight;
+    int _currentHighlight{0};
 
 
-    bool _caseSensitive;
-    bool _searchSenders;
-    bool _searchMsgs;
-    bool _searchOnlyRegularMsgs;
+    bool _caseSensitive{false};
+    bool _searchSenders{false};
+    bool _searchMsgs{true};
+    bool _searchOnlyRegularMsgs{true};
 
     inline Qt::CaseSensitivity caseSensitive() const { return _caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive; }
 
 
     inline Qt::CaseSensitivity caseSensitive() const { return _caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive; }
 
index bbeeff4..510abd2 100644 (file)
@@ -30,7 +30,7 @@
 #include "clientbacklogmanager.h"
 
 DockManagerNotificationBackend::DockManagerNotificationBackend(QObject *parent)
 #include "clientbacklogmanager.h"
 
 DockManagerNotificationBackend::DockManagerNotificationBackend(QObject *parent)
-    : AbstractNotificationBackend(parent), _bus(QDBusConnection::sessionBus()), _dock(nullptr), _item(nullptr), _count(0)
+    : AbstractNotificationBackend(parent), _bus(QDBusConnection::sessionBus())
 {
     NotificationSettings notificationSettings;
     _enabled = notificationSettings.value("DockManager/Enabled", false).toBool();
 {
     NotificationSettings notificationSettings;
     _enabled = notificationSettings.value("DockManager/Enabled", false).toBool();
index e3a2ca0..a32e4c6 100644 (file)
@@ -52,9 +52,9 @@ private:
     bool _enabled;
     bool _available;
     QDBusConnection _bus;
     bool _enabled;
     bool _available;
     QDBusConnection _bus;
-    QDBusInterface *_dock;
-    QDBusInterface *_item;
-    int _count;
+    QDBusInterface *_dock{nullptr};
+    QDBusInterface *_item{nullptr};
+    int _count{0};
 };
 
 
 };
 
 
index fb68753..7ac1d4b 100644 (file)
@@ -183,9 +183,9 @@ private:
     struct HistoryState {
         QStringList history;
         QHash<int, QString> tempHistory;
     struct HistoryState {
         QStringList history;
         QHash<int, QString> tempHistory;
-        qint32 idx;
+        qint32 idx{0};
         QString inputLine;
         QString inputLine;
-        inline HistoryState() : idx(0) {};
+        inline HistoryState()  {};
     };
 
     QMap<BufferId, HistoryState> historyMap;
     };
 
     QMap<BufferId, HistoryState> historyMap;
index d7e8658..756caf8 100644 (file)
 #include <QVBoxLayout>
 
 IrcConnectionWizard::IrcConnectionWizard(QWidget *parent, Qt::WindowFlags flags)
 #include <QVBoxLayout>
 
 IrcConnectionWizard::IrcConnectionWizard(QWidget *parent, Qt::WindowFlags flags)
-    : QWizard(parent, flags),
-    _introductionPage(nullptr),
-    _identityPage(nullptr),
-    _networkPage(nullptr)
+    : QWizard(parent, flags)
 {
     _introductionPage = createIntroductionPage(this);
     _identityPage = new IdentityPage(this);
 {
     _introductionPage = createIntroductionPage(this);
     _identityPage = new IdentityPage(this);
@@ -110,8 +107,7 @@ void IrcConnectionWizard::networkReady(NetworkId id)
 // Identity Page
 IdentityPage::IdentityPage(QWidget *parent)
     : QWizardPage(parent),
 // Identity Page
 IdentityPage::IdentityPage(QWidget *parent)
     : QWizardPage(parent),
-    _identityEditWidget(new IdentityEditWidget(this)),
-    _identity(nullptr)
+    _identityEditWidget(new IdentityEditWidget(this))
 {
     setTitle(tr("Setup Identity"));
 
 {
     setTitle(tr("Setup Identity"));
 
index 65509eb..3347f21 100644 (file)
@@ -40,9 +40,9 @@ private slots:
     void networkReady(NetworkId id);
 
 private:
     void networkReady(NetworkId id);
 
 private:
-    QWizardPage *_introductionPage;
-    QWizardPage *_identityPage;
-    QWizardPage *_networkPage;
+    QWizardPage *_introductionPage{nullptr};
+    QWizardPage *_identityPage{nullptr};
+    QWizardPage *_networkPage{nullptr};
 };
 
 
 };
 
 
@@ -66,7 +66,7 @@ public:
 
 private:
     IdentityEditWidget *_identityEditWidget;
 
 private:
     IdentityEditWidget *_identityEditWidget;
-    CertIdentity *_identity;
+    CertIdentity *_identity{nullptr};
 };
 
 
 };
 
 
index fc0e061..e0ef6b9 100644 (file)
@@ -161,11 +161,7 @@ MainWin::MainWin(QWidget *parent)
 #endif
     _msgProcessorStatusWidget(new MsgProcessorStatusWidget(this)),
     _coreConnectionStatusWidget(new CoreConnectionStatusWidget(Client::coreConnection(), this)),
 #endif
     _msgProcessorStatusWidget(new MsgProcessorStatusWidget(this)),
     _coreConnectionStatusWidget(new CoreConnectionStatusWidget(Client::coreConnection(), this)),
-    _titleSetter(this),
-    _awayLog(nullptr),
-    _layoutLoaded(false),
-    _activeBufferViewIndex(-1),
-    _aboutToQuit(false)
+    _titleSetter(this)
 {
     setAttribute(Qt::WA_DeleteOnClose, false); // we delete the mainwin manually
 
 {
     setAttribute(Qt::WA_DeleteOnClose, false); // we delete the mainwin manually
 
index 94a2d4b..bb2972d 100644 (file)
@@ -271,20 +271,20 @@ private:
     QMenu *_toolbarMenu;
     QToolBar *_mainToolBar, *_chatViewToolBar, *_nickToolBar;
 
     QMenu *_toolbarMenu;
     QToolBar *_mainToolBar, *_chatViewToolBar, *_nickToolBar;
 
-    QWidget *_awayLog;
+    QWidget *_awayLog{nullptr};
 
     QMessageBox* _migrationWarning{nullptr};
 
 
     QMessageBox* _migrationWarning{nullptr};
 
-    bool _layoutLoaded;
+    bool _layoutLoaded{false};
 
     QSize _normalSize; //!< Size of the non-maximized window
     QPoint _normalPos; //!< Position of the non-maximized window
 
     BufferHotListFilter *_bufferHotList;
     QHash<int, BufferId> _jumpKeyMap;
 
     QSize _normalSize; //!< Size of the non-maximized window
     QPoint _normalPos; //!< Position of the non-maximized window
 
     BufferHotListFilter *_bufferHotList;
     QHash<int, BufferId> _jumpKeyMap;
-    int _activeBufferViewIndex;
+    int _activeBufferViewIndex{-1};
 
 
-    bool _aboutToQuit; //closeEvent can occur multiple times on OSX
+    bool _aboutToQuit{false}; //closeEvent can occur multiple times on OSX
 
     friend class QtUi;
 };
 
     friend class QtUi;
 };
index 13100af..71db202 100644 (file)
@@ -27,8 +27,7 @@
 #include "icon.h"
 
 SettingsDlg::SettingsDlg(QWidget *parent)
 #include "icon.h"
 
 SettingsDlg::SettingsDlg(QWidget *parent)
-    : QDialog(parent),
-    _currentPage(nullptr)
+    : QDialog(parent)
 {
     ui.setupUi(this);
     setModal(true);
 {
     ui.setupUi(this);
     setModal(true);
index 483855b..210b923 100644 (file)
@@ -55,7 +55,7 @@ private slots:
 private:
     Ui::SettingsDlg ui;
 
 private:
     Ui::SettingsDlg ui;
 
-    SettingsPage *_currentPage;
+    SettingsPage *_currentPage{nullptr};
     QHash<SettingsPage *, bool> pageIsLoaded;
 
     enum {
     QHash<SettingsPage *, bool> pageIsLoaded;
 
     enum {
index 569f56c..39f2877 100644 (file)
@@ -27,9 +27,7 @@
 #include "signalproxy.h"
 
 AliasesModel::AliasesModel(QObject *parent)
 #include "signalproxy.h"
 
 AliasesModel::AliasesModel(QObject *parent)
-    : QAbstractItemModel(parent),
-    _configChanged(false),
-    _modelReady(false)
+    : QAbstractItemModel(parent)
 {
     // we need this signal for future connects to reset the data;
     connect(Client::instance(), SIGNAL(connected()), this, SLOT(clientConnected()));
 {
     // we need this signal for future connects to reset the data;
     connect(Client::instance(), SIGNAL(connected()), this, SLOT(clientConnected()));
index c46ff13..94cf10e 100644 (file)
@@ -63,8 +63,8 @@ signals:
 
 private:
     ClientAliasManager _clonedAliasManager;
 
 private:
     ClientAliasManager _clonedAliasManager;
-    bool _configChanged;
-    bool _modelReady;
+    bool _configChanged{false};
+    bool _modelReady{false};
 
     const AliasManager &aliasManager() const;
     AliasManager &aliasManager();
 
     const AliasManager &aliasManager() const;
     AliasManager &aliasManager();
index 3a4da10..4a77807 100644 (file)
 #include "util.h"
 
 BufferViewSettingsPage::BufferViewSettingsPage(QWidget *parent)
 #include "util.h"
 
 BufferViewSettingsPage::BufferViewSettingsPage(QWidget *parent)
-    : SettingsPage(tr("Interface"), tr("Custom Chat Lists"), parent),
-    _ignoreWidgetChanges(false),
-    _useBufferViewHint(false),
-    _bufferViewHint(0)
+    : SettingsPage(tr("Interface"), tr("Custom Chat Lists"), parent)
 {
     ui.setupUi(this);
     //Hide the hide inactive networks feature on older cores (which won't save the setting)
 {
     ui.setupUi(this);
     //Hide the hide inactive networks feature on older cores (which won't save the setting)
index dbe47d1..f4985d9 100644 (file)
@@ -61,9 +61,9 @@ private slots:
 
 private:
     Ui::BufferViewSettingsPage ui;
 
 private:
     Ui::BufferViewSettingsPage ui;
-    bool _ignoreWidgetChanges;
-    bool _useBufferViewHint;
-    int _bufferViewHint;
+    bool _ignoreWidgetChanges{false};
+    bool _useBufferViewHint{false};
+    int _bufferViewHint{0};
 
     // list of bufferviews to create
     QList<BufferViewConfig *> _newBufferViews;
 
     // list of bufferviews to create
     QList<BufferViewConfig *> _newBufferViews;
index dfb7456..3a6f1cd 100644 (file)
@@ -28,8 +28,7 @@
 CoreAccountSettingsPage::CoreAccountSettingsPage(QWidget *parent)
     : SettingsPage(tr("Remote Cores"), QString(), parent),
     _lastAccountId(0),
 CoreAccountSettingsPage::CoreAccountSettingsPage(QWidget *parent)
     : SettingsPage(tr("Remote Cores"), QString(), parent),
     _lastAccountId(0),
-    _lastAutoConnectId(0),
-    _standalone(false)
+    _lastAutoConnectId(0)
 {
     ui.setupUi(this);
     initAutoWidgets();
 {
     ui.setupUi(this);
     initAutoWidgets();
index ed47e47..ebfed62 100644 (file)
@@ -77,7 +77,7 @@ private:
     inline FilteredCoreAccountModel *filteredModel() const { return _filteredModel; }
 
     AccountId _lastAccountId, _lastAutoConnectId;
     inline FilteredCoreAccountModel *filteredModel() const { return _filteredModel; }
 
     AccountId _lastAccountId, _lastAutoConnectId;
-    bool _standalone;
+    bool _standalone{false};
 
     void editAccount(const QModelIndex &);
 
 
     void editAccount(const QModelIndex &);
 
index 15e584a..1e9244d 100644 (file)
@@ -29,8 +29,7 @@
 #include "signalproxy.h"
 
 IdentitiesSettingsPage::IdentitiesSettingsPage(QWidget *parent)
 #include "signalproxy.h"
 
 IdentitiesSettingsPage::IdentitiesSettingsPage(QWidget *parent)
-    : SettingsPage(tr("IRC"), tr("Identities"), parent),
-    _editSsl(false)
+    : SettingsPage(tr("IRC"), tr("Identities"), parent)
 {
     ui.setupUi(this);
     ui.renameIdentity->setIcon(icon::get("edit-rename"));
 {
     ui.setupUi(this);
     ui.renameIdentity->setIcon(icon::get("edit-rename"));
index 3674c34..4fc9c44 100644 (file)
@@ -73,7 +73,7 @@ private:
     QList<IdentityId> changedIdentities; // for setting the widget changed state
     QList<IdentityId> deletedIdentities;
 
     QList<IdentityId> changedIdentities; // for setting the widget changed state
     QList<IdentityId> deletedIdentities;
 
-    bool _editSsl;
+    bool _editSsl{false};
 
     void insertIdentity(CertIdentity *identity);
     void removeIdentity(Identity *identity);
 
     void insertIdentity(CertIdentity *identity);
     void removeIdentity(Identity *identity);
index 0af0364..d95db34 100644 (file)
@@ -28,9 +28,7 @@
 #include "signalproxy.h"
 
 IgnoreListModel::IgnoreListModel(QObject *parent)
 #include "signalproxy.h"
 
 IgnoreListModel::IgnoreListModel(QObject *parent)
-    : QAbstractItemModel(parent),
-    _configChanged(false),
-    _modelReady(false)
+    : QAbstractItemModel(parent)
 {
     // we need this signal for future connects to reset the data;
     connect(Client::instance(), SIGNAL(connected()), this, SLOT(clientConnected()));
 {
     // we need this signal for future connects to reset the data;
     connect(Client::instance(), SIGNAL(connected()), this, SLOT(clientConnected()));
index 4a9f9c6..fb83fd2 100644 (file)
@@ -67,8 +67,8 @@ signals:
 
 private:
     ClientIgnoreListManager _clonedIgnoreListManager;
 
 private:
     ClientIgnoreListManager _clonedIgnoreListManager;
-    bool _configChanged;
-    bool _modelReady;
+    bool _configChanged{false};
+    bool _modelReady{false};
 
     const IgnoreListManager &ignoreListManager() const;
     IgnoreListManager &ignoreListManager();
 
     const IgnoreListManager &ignoreListManager() const;
     IgnoreListManager &ignoreListManager();
index 9e742c2..4f4afb2 100644 (file)
@@ -162,10 +162,7 @@ void KeySequenceButton::keyReleaseEvent(QKeyEvent *e)
 /******************************************************************************/
 
 KeySequenceWidget::KeySequenceWidget(QWidget *parent)
 /******************************************************************************/
 
 KeySequenceWidget::KeySequenceWidget(QWidget *parent)
-    : QWidget(parent),
-    _shortcutsModel(nullptr),
-    _isRecording(false),
-    _modifierKeys(0)
+    : QWidget(parent)
 {
     QHBoxLayout *layout = new QHBoxLayout(this);
     layout->setMargin(0);
 {
     QHBoxLayout *layout = new QHBoxLayout(this);
     layout->setMargin(0);
index e8cddfd..c1aafd4 100644 (file)
@@ -76,10 +76,10 @@ private:
     bool isShiftAsModifierAllowed(int keyQt) const;
     bool isKeySequenceAvailable(const QKeySequence &seq);
 
     bool isShiftAsModifierAllowed(int keyQt) const;
     bool isKeySequenceAvailable(const QKeySequence &seq);
 
-    ShortcutsModel *_shortcutsModel;
-    bool _isRecording;
+    ShortcutsModel *_shortcutsModel{nullptr};
+    bool _isRecording{false};
     QKeySequence _keySequence, _oldKeySequence;
     QKeySequence _keySequence, _oldKeySequence;
-    uint _modifierKeys;
+    uint _modifierKeys{0};
     QModelIndex _conflictingIndex;
 
     KeySequenceButton *_keyButton;
     QModelIndex _conflictingIndex;
 
     KeySequenceButton *_keyButton;
index afc4698..bd77b35 100644 (file)
@@ -40,9 +40,6 @@
 
 NetworksSettingsPage::NetworksSettingsPage(QWidget *parent)
     : SettingsPage(tr("IRC"), tr("Networks"), parent)
 
 NetworksSettingsPage::NetworksSettingsPage(QWidget *parent)
     : SettingsPage(tr("IRC"), tr("Networks"), parent)
-#ifdef HAVE_SSL
-      , _cid(nullptr)
-#endif
 {
     ui.setupUi(this);
 
 {
     ui.setupUi(this);
 
index 461c3e0..965540e 100644 (file)
@@ -134,7 +134,7 @@ private:
     QHash<NetworkId, NetworkInfo> networkInfos;
     bool _ignoreWidgetChanges;
 #ifdef HAVE_SSL
     QHash<NetworkId, NetworkInfo> networkInfos;
     bool _ignoreWidgetChanges;
 #ifdef HAVE_SSL
-    CertIdentity *_cid;
+    CertIdentity *_cid{nullptr};
 #endif
 
     QIcon connectedIcon, connectingIcon, disconnectedIcon;
 #endif
 
     QIcon connectedIcon, connectingIcon, disconnectedIcon;
index bd184d7..2c164bc 100644 (file)
@@ -25,8 +25,7 @@
 #include "qtui.h"
 
 NotificationsSettingsPage::NotificationsSettingsPage(QWidget *parent)
 #include "qtui.h"
 
 NotificationsSettingsPage::NotificationsSettingsPage(QWidget *parent)
-    : SettingsPage(tr("Interface"), tr("Notifications"), parent),
-    _hasDefaults(false)
+    : SettingsPage(tr("Interface"), tr("Notifications"), parent)
 {
     QVBoxLayout *layout = new QVBoxLayout(this);
     foreach(AbstractNotificationBackend *backend, QtUi::notificationBackends()) {
 {
     QVBoxLayout *layout = new QVBoxLayout(this);
     foreach(AbstractNotificationBackend *backend, QtUi::notificationBackends()) {
index 3b7fc44..9e49840 100644 (file)
@@ -48,5 +48,5 @@ private slots:
 
 private:
     QList<SettingsPage *> _configWidgets;
 
 private:
     QList<SettingsPage *> _configWidgets;
-    bool _hasDefaults;
+    bool _hasDefaults{false};
 };
 };
index deb4927..17778b7 100644 (file)
@@ -34,8 +34,7 @@
 #include "systemtray.h"
 
 SystrayNotificationBackend::SystrayNotificationBackend(QObject *parent)
 #include "systemtray.h"
 
 SystrayNotificationBackend::SystrayNotificationBackend(QObject *parent)
-    : AbstractNotificationBackend(parent),
-    _blockActivation(false)
+    : AbstractNotificationBackend(parent)
 {
     NotificationSettings notificationSettings;
     notificationSettings.initAndNotify("Systray/ShowBubble", this, SLOT(showBubbleChanged(QVariant)), true);
 {
     NotificationSettings notificationSettings;
     notificationSettings.initAndNotify("Systray/ShowBubble", this, SLOT(showBubbleChanged(QVariant)), true);
index 82425c3..d8af7e3 100644 (file)
@@ -52,7 +52,7 @@ private:
 
     bool _showBubble;
     QList<Notification> _notifications;
 
     bool _showBubble;
     QList<Notification> _notifications;
-    bool _blockActivation;
+    bool _blockActivation{false};
 };
 
 
 };
 
 
index aef7b1b..8088c13 100644 (file)
@@ -24,8 +24,7 @@
 #include <QDebug>
 
 FlatProxyModel::FlatProxyModel(QObject *parent)
 #include <QDebug>
 
 FlatProxyModel::FlatProxyModel(QObject *parent)
-    : QAbstractProxyModel(parent),
-    _rootSourceItem(nullptr)
+    : QAbstractProxyModel(parent)
 {
 }
 
 {
 }
 
@@ -683,9 +682,7 @@ void FlatProxyModel::checkChildCount(const QModelIndex &index, const SourceItem
 //  SourceItem
 // ========================================
 FlatProxyModel::SourceItem::SourceItem(int row, SourceItem *parent)
 //  SourceItem
 // ========================================
 FlatProxyModel::SourceItem::SourceItem(int row, SourceItem *parent)
-    : _parent(parent),
-    _pos(-1),
-    _next(nullptr)
+    : _parent(parent)
 {
     if (parent) {
         parent->_childs.insert(row, this);
 {
     if (parent) {
         parent->_childs.insert(row, this);
index 17eb680..84fb779 100644 (file)
@@ -73,7 +73,7 @@ private:
     QList<int> _childCount;
 
     class SourceItem;
     QList<int> _childCount;
 
     class SourceItem;
-    SourceItem *_rootSourceItem;
+    SourceItem *_rootSourceItem{nullptr};
 
     void insertSubTree(const QModelIndex &source_idx, bool emitInsert = true);
     SourceItem *insertSubTreeHelper(SourceItem *parentItem, SourceItem *lastItem_, const QModelIndex &source_idx);
 
     void insertSubTree(const QModelIndex &source_idx, bool emitInsert = true);
     SourceItem *insertSubTreeHelper(SourceItem *parentItem, SourceItem *lastItem_, const QModelIndex &source_idx);
@@ -117,8 +117,8 @@ private:
 
     SourceItem *_parent;
     QList<SourceItem *> _childs;
 
     SourceItem *_parent;
     QList<SourceItem *> _childs;
-    int _pos;
-    SourceItem *_next;
+    int _pos{-1};
+    SourceItem *_next{nullptr};
 
     friend class FlatProxyModel;
 };
 
     friend class FlatProxyModel;
 };
index 2c9d594..876f0b9 100644 (file)
 const int leftMargin = 3;
 
 MultiLineEdit::MultiLineEdit(QWidget *parent)
 const int leftMargin = 3;
 
 MultiLineEdit::MultiLineEdit(QWidget *parent)
-    : MultiLineEditParent(parent),
-    _idx(0),
-    _mode(SingleLine),
-    _singleLine(true),
-    _minHeight(1),
-    _maxHeight(5),
-    _scrollBarsEnabled(true),
-    _pasteProtectionEnabled(true),
-    _emacsMode(false),
-    _completionSpace(0),
-    _lastDocumentHeight(-1)
+    : MultiLineEditParent(parent)
 {
     document()->setDocumentMargin(0);
 
 {
     document()->setDocumentMargin(0);
 
index 61fafa6..a8d2d13 100644 (file)
@@ -128,18 +128,18 @@ private:
 private:
     QStringList _history;
     QHash<int, QString> _tempHistory;
 private:
     QStringList _history;
     QHash<int, QString> _tempHistory;
-    qint32 _idx;
-    Mode _mode;
-    bool _singleLine;
-    int _minHeight;
-    int _maxHeight;
-    bool _scrollBarsEnabled;
-    bool _pasteProtectionEnabled;
-    bool _emacsMode;
-    int _completionSpace;
+    qint32 _idx{0};
+    Mode _mode{SingleLine};
+    bool _singleLine{true};
+    int _minHeight{1};
+    int _maxHeight{5};
+    bool _scrollBarsEnabled{true};
+    bool _pasteProtectionEnabled{true};
+    bool _emacsMode{false};
+    int _completionSpace{0};
 
     QSize _sizeHint;
 
     QSize _sizeHint;
-    qreal _lastDocumentHeight;
+    qreal _lastDocumentHeight{-1};
 
     QMap<QString, QString> _mircColorMap;
 
 
     QMap<QString, QString> _mircColorMap;
 
index 69797bc..d7dc64e 100644 (file)
@@ -41,9 +41,7 @@
 
 NetworkModelController::NetworkModelController(QObject *parent)
     : QObject(parent),
 
 NetworkModelController::NetworkModelController(QObject *parent)
     : QObject(parent),
-    _actionCollection(new ActionCollection(this)),
-    _messageFilter(nullptr),
-    _receiver(nullptr)
+    _actionCollection(new ActionCollection(this))
 {
     connect(_actionCollection, SIGNAL(actionTriggered(QAction *)), SLOT(actionTriggered(QAction *)));
 }
 {
     connect(_actionCollection, SIGNAL(actionTriggered(QAction *)), SLOT(actionTriggered(QAction *)));
 }
index e224b75..0511780 100644 (file)
@@ -185,9 +185,9 @@ private:
     QHash<ActionType, Action *> _actionByType;
 
     QList<QModelIndex> _indexList;
     QHash<ActionType, Action *> _actionByType;
 
     QList<QModelIndex> _indexList;
-    MessageFilter *_messageFilter;
+    MessageFilter *_messageFilter{nullptr};
     QString _contextItem; ///< Channel name or nick to provide context menu for
     QString _contextItem; ///< Channel name or nick to provide context menu for
-    QObject *_receiver;
+    QObject *_receiver{nullptr};
     const char *_method;
 };
 
     const char *_method;
 };
 
index 6e2361b..1d590f2 100644 (file)
 
 StyledLabel::StyledLabel(QWidget *parent)
     : QFrame(parent),
 
 StyledLabel::StyledLabel(QWidget *parent)
     : QFrame(parent),
-    _wrapMode(QTextOption::NoWrap),
-    _alignment(Qt::AlignVCenter|Qt::AlignLeft),
-    _toolTipEnabled(true),
-    _resizeMode(NoResize)
+    _alignment(Qt::AlignVCenter|Qt::AlignLeft)
 {
     setMouseTracking(true);
 
 {
     setMouseTracking(true);
 
index 1a74608..9df5da4 100644 (file)
@@ -73,12 +73,12 @@ protected:
 
 private:
     QSize _sizeHint;
 
 private:
     QSize _sizeHint;
-    QTextOption::WrapMode _wrapMode;
+    QTextOption::WrapMode _wrapMode{QTextOption::NoWrap};
     Qt::Alignment _alignment;
     QTextLayout _layout;
     ClickableList _clickables;
     Qt::Alignment _alignment;
     QTextLayout _layout;
     ClickableList _clickables;
-    bool _toolTipEnabled;
-    ResizeMode _resizeMode;
+    bool _toolTipEnabled{true};
+    ResizeMode _resizeMode{NoResize};
 
     QList<QTextLayout::FormatRange> _layoutList;
     QVector<QTextLayout::FormatRange> _extraLayoutList;
 
     QList<QTextLayout::FormatRange> _layoutList;
     QVector<QTextLayout::FormatRange> _extraLayoutList;