modernize: Use nullptr
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 5 Sep 2018 22:09:45 +0000 (00:09 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 18 Nov 2018 10:06:43 +0000 (11:06 +0100)
Let clang-tidy fix all occurrences where nullptr should be used
instead of 0.

229 files changed:
src/client/abstractui.h
src/client/buffermodel.h
src/client/bufferviewoverlay.cpp
src/client/bufferviewoverlay.h
src/client/client.cpp
src/client/clientaliasmanager.h
src/client/clientauthhandler.cpp
src/client/clientauthhandler.h
src/client/clientbacklogmanager.cpp
src/client/clientbacklogmanager.h
src/client/clientbufferviewconfig.h
src/client/clientbufferviewmanager.h
src/client/clientidentity.cpp
src/client/clientidentity.h
src/client/clientignorelistmanager.h
src/client/clientirclisthelper.h
src/client/clienttransfer.cpp
src/client/clienttransfer.h
src/client/clientuserinputhandler.cpp
src/client/clientuserinputhandler.h
src/client/coreaccountmodel.h
src/client/coreconnection.cpp
src/client/coreconnection.h
src/client/execwrapper.h
src/client/irclistmodel.h
src/client/messagefilter.h
src/client/networkmodel.cpp
src/client/networkmodel.h
src/client/selectionmodelsynchronizer.cpp
src/client/selectionmodelsynchronizer.h
src/client/transfermodel.cpp
src/client/treemodel.cpp
src/client/treemodel.h
src/common/aliasmanager.h
src/common/authhandler.cpp
src/common/authhandler.h
src/common/backlogmanager.h
src/common/basichandler.cpp
src/common/basichandler.h
src/common/bufferviewconfig.h
src/common/bufferviewmanager.cpp
src/common/bufferviewmanager.h
src/common/compressor.cpp
src/common/compressor.h
src/common/ctcpevent.cpp
src/common/event.cpp
src/common/eventmanager.cpp
src/common/eventmanager.h
src/common/identity.h
src/common/ignorelistmanager.h
src/common/ircchannel.cpp
src/common/ircevent.cpp
src/common/irclisthelper.h
src/common/ircuser.cpp
src/common/logbacktrace_unix.cpp
src/common/messageevent.cpp
src/common/network.cpp
src/common/network.h
src/common/networkconfig.h
src/common/networkevent.cpp
src/common/peer.h
src/common/peerfactory.h
src/common/protocols/datastream/datastreampeer.h
src/common/protocols/legacy/legacypeer.h
src/common/remotepeer.cpp
src/common/remotepeer.h
src/common/signalproxy.cpp
src/common/signalproxy.h
src/common/syncableobject.cpp
src/common/syncableobject.h
src/common/transfer.h
src/common/util.h
src/core/abstractsqlstorage.cpp
src/core/abstractsqlstorage.h
src/core/core.cpp
src/core/coreauthhandler.cpp
src/core/coreauthhandler.h
src/core/corebacklogmanager.h
src/core/corebasichandler.h
src/core/corebufferviewconfig.h
src/core/corebufferviewmanager.cpp
src/core/coreidentity.h
src/core/coreircchannel.cpp
src/core/coreircuser.cpp
src/core/corenetwork.cpp
src/core/coresession.cpp
src/core/coresession.h
src/core/coretransfer.cpp
src/core/coretransfer.h
src/core/coreuserinputhandler.h
src/core/ctcpparser.h
src/core/keyevent.cpp
src/core/ldapauthenticator.cpp
src/core/ldapauthenticator.h
src/core/netsplit.h
src/core/oidentdconfiggenerator.h
src/core/postgresqlstorage.cpp
src/core/postgresqlstorage.h
src/core/sessionthread.h
src/core/sqlauthenticator.h
src/core/sqlitestorage.cpp
src/core/sqlitestorage.h
src/core/sslserver.cpp
src/core/sslserver.h
src/core/storage.h
src/qtui/aboutdlg.h
src/qtui/awaylogfilter.h
src/qtui/awaylogview.h
src/qtui/bufferwidget.cpp
src/qtui/bufferwidget.h
src/qtui/channellistdlg.cpp
src/qtui/channellistdlg.h
src/qtui/chatitem.cpp
src/qtui/chatitem.h
src/qtui/chatline.cpp
src/qtui/chatline.h
src/qtui/chatlinemodel.h
src/qtui/chatmonitorfilter.h
src/qtui/chatscene.cpp
src/qtui/chatscene.h
src/qtui/chatview.cpp
src/qtui/chatview.h
src/qtui/chatviewsearchbar.h
src/qtui/chatviewsearchcontroller.cpp
src/qtui/chatviewsearchcontroller.h
src/qtui/columnhandleitem.h
src/qtui/coreconfigwizard.h
src/qtui/coreconnectdlg.h
src/qtui/coreconnectionstatuswidget.h
src/qtui/debugbufferviewoverlay.h
src/qtui/debugconsole.h
src/qtui/debuglogdlg.h
src/qtui/debugmessagemodelfilter.h
src/qtui/dockmanagernotificationbackend.cpp
src/qtui/dockmanagernotificationbackend.h
src/qtui/inputwidget.cpp
src/qtui/inputwidget.h
src/qtui/ircconnectionwizard.cpp
src/qtui/ircconnectionwizard.h
src/qtui/knotificationbackend.h
src/qtui/mainpage.h
src/qtui/mainwin.cpp
src/qtui/mainwin.h
src/qtui/markerlineitem.cpp
src/qtui/markerlineitem.h
src/qtui/msgprocessorstatuswidget.h
src/qtui/nicklistwidget.cpp
src/qtui/nicklistwidget.h
src/qtui/qtmultimedianotificationbackend.h
src/qtui/qtuistyle.h
src/qtui/receivefiledlg.h
src/qtui/settingsdlg.cpp
src/qtui/settingsdlg.h
src/qtui/settingspagedlg.h
src/qtui/settingspages/aliasesmodel.h
src/qtui/settingspages/aliasessettingspage.h
src/qtui/settingspages/appearancesettingspage.h
src/qtui/settingspages/backlogsettingspage.h
src/qtui/settingspages/bufferviewsettingspage.cpp
src/qtui/settingspages/bufferviewsettingspage.h
src/qtui/settingspages/chatmonitorsettingspage.cpp
src/qtui/settingspages/chatmonitorsettingspage.h
src/qtui/settingspages/chatviewcolorsettingspage.h
src/qtui/settingspages/chatviewsettingspage.h
src/qtui/settingspages/connectionsettingspage.h
src/qtui/settingspages/coreaccountsettingspage.h
src/qtui/settingspages/coreconnectionsettingspage.h
src/qtui/settingspages/dccsettingspage.cpp
src/qtui/settingspages/highlightsettingspage.h
src/qtui/settingspages/identitiessettingspage.cpp
src/qtui/settingspages/identitiessettingspage.h
src/qtui/settingspages/identityeditwidget.h
src/qtui/settingspages/ignorelistmodel.h
src/qtui/settingspages/ignorelistsettingspage.h
src/qtui/settingspages/inputwidgetsettingspage.h
src/qtui/settingspages/itemviewsettingspage.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.h
src/qtui/settingspages/previewbufferview.h
src/qtui/settingspages/shortcutsmodel.h
src/qtui/settingspages/shortcutssettingspage.h
src/qtui/settingspages/sonnetsettingspage.h
src/qtui/settingspages/topicwidgetsettingspage.h
src/qtui/simplenetworkeditor.h
src/qtui/sslinfodlg.h
src/qtui/systraynotificationbackend.h
src/qtui/taskbarnotificationbackend.h
src/qtui/topicwidget.h
src/qtui/verticaldock.cpp
src/qtui/verticaldock.h
src/qtui/webpreviewitem.cpp
src/qtui/webpreviewitem.h
src/uisupport/abstractitemview.cpp
src/uisupport/abstractitemview.h
src/uisupport/action.h
src/uisupport/actioncollection.cpp
src/uisupport/actioncollection.h
src/uisupport/bufferhotlistfilter.h
src/uisupport/bufferview.cpp
src/uisupport/bufferview.h
src/uisupport/bufferviewfilter.cpp
src/uisupport/bufferviewfilter.h
src/uisupport/bufferviewoverlayfilter.cpp
src/uisupport/bufferviewoverlayfilter.h
src/uisupport/clearablelineedit.h
src/uisupport/clickablelabel.h
src/uisupport/colorbutton.h
src/uisupport/contextmenuactionprovider.cpp
src/uisupport/contextmenuactionprovider.h
src/uisupport/flatproxymodel.cpp
src/uisupport/flatproxymodel.h
src/uisupport/fontselector.h
src/uisupport/graphicalui.cpp
src/uisupport/graphicalui.h
src/uisupport/multilineedit.h
src/uisupport/networkmodelcontroller.cpp
src/uisupport/networkmodelcontroller.h
src/uisupport/nickview.cpp
src/uisupport/nickview.h
src/uisupport/nickviewfilter.h
src/uisupport/resizingstackedwidget.h
src/uisupport/settingspage.h
src/uisupport/styledlabel.h
src/uisupport/toolbaractionprovider.h
src/uisupport/treeviewtouch.h
src/uisupport/uistyle.h

index 44467fc..ce70d33 100644 (file)
@@ -38,7 +38,7 @@ class CLIENT_EXPORT AbstractUi : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AbstractUi(QObject *parent = 0) : QObject(parent) {}
+    AbstractUi(QObject *parent = nullptr) : QObject(parent) {}
     virtual ~AbstractUi() {}
     virtual void init() = 0; // called after the client is initialized
     virtual MessageModel *createMessageModel(QObject *parent) = 0;
     virtual ~AbstractUi() {}
     virtual void init() = 0; // called after the client is initialized
     virtual MessageModel *createMessageModel(QObject *parent) = 0;
index a8fada2..4201f3d 100644 (file)
@@ -38,7 +38,7 @@ class CLIENT_EXPORT BufferModel : public QSortFilterProxyModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    BufferModel(NetworkModel *parent = 0);
+    BufferModel(NetworkModel *parent = nullptr);
 
     bool filterAcceptsRow(int sourceRow, const QModelIndex &parent) const;
 
 
     bool filterAcceptsRow(int sourceRow, const QModelIndex &parent) const;
 
index f8d6cb8..d63a26d 100644 (file)
@@ -130,7 +130,7 @@ void BufferViewOverlay::removeView(int viewId)
     _bufferViewIds.remove(viewId);
     BufferViewConfig *config = Client::bufferViewManager()->bufferViewConfig(viewId);
     if (config)
     _bufferViewIds.remove(viewId);
     BufferViewConfig *config = Client::bufferViewManager()->bufferViewConfig(viewId);
     if (config)
-        disconnect(config, 0, this, 0);
+        disconnect(config, nullptr, this, nullptr);
 
     // update initialized State:
     bool wasInitialized = isInitialized();
 
     // update initialized State:
     bool wasInitialized = isInitialized();
@@ -209,7 +209,7 @@ void BufferViewOverlay::updateHelper()
     QSet<BufferId> tempRemovedBuffers;
 
     if (Client::bufferViewManager()) {
     QSet<BufferId> tempRemovedBuffers;
 
     if (Client::bufferViewManager()) {
-        BufferViewConfig *config = 0;
+        BufferViewConfig *config = nullptr;
         QSet<int>::const_iterator viewIter;
         for (viewIter = _bufferViewIds.constBegin(); viewIter != _bufferViewIds.constEnd(); ++viewIter) {
             config = Client::bufferViewManager()->bufferViewConfig(*viewIter);
         QSet<int>::const_iterator viewIter;
         for (viewIter = _bufferViewIds.constBegin(); viewIter != _bufferViewIds.constEnd(); ++viewIter) {
             config = Client::bufferViewManager()->bufferViewConfig(*viewIter);
index 24e1101..85b60c4 100644 (file)
@@ -34,7 +34,7 @@ class CLIENT_EXPORT BufferViewOverlay : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    BufferViewOverlay(QObject *parent = 0);
+    BufferViewOverlay(QObject *parent = nullptr);
 
     inline const QSet<int> &bufferViewIds() { return _bufferViewIds; }
     bool allNetworks();
 
     inline const QSet<int> &bufferViewIds() { return _bufferViewIds; }
     bool allNetworks();
index 81a407b..84e03c7 100644 (file)
@@ -61,19 +61,19 @@ 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(0),
-    _aliasManager(0),
+    _bufferSyncer(nullptr),
+    _aliasManager(nullptr),
     _backlogManager(new ClientBacklogManager(this)),
     _backlogManager(new ClientBacklogManager(this)),
-    _bufferViewManager(0),
+    _bufferViewManager(nullptr),
     _bufferViewOverlay(new BufferViewOverlay(this)),
     _coreInfo(new CoreInfo(this)),
     _bufferViewOverlay(new BufferViewOverlay(this)),
     _coreInfo(new CoreInfo(this)),
-    _dccConfig(0),
+    _dccConfig(nullptr),
     _ircListHelper(new ClientIrcListHelper(this)),
     _inputHandler(new ClientUserInputHandler(this)),
     _ircListHelper(new ClientIrcListHelper(this)),
     _inputHandler(new ClientUserInputHandler(this)),
-    _networkConfig(0),
-    _ignoreListManager(0),
-    _highlightRuleManager(0),
-    _transferManager(0),
+    _networkConfig(nullptr),
+    _ignoreListManager(nullptr),
+    _highlightRuleManager(nullptr),
+    _transferManager(nullptr),
     _transferModel(new TransferModel(this)),
     _messageModel(_mainUi->createMessageModel(this)),
     _messageProcessor(_mainUi->createMessageProcessor(this)),
     _transferModel(new TransferModel(this)),
     _messageModel(_mainUi->createMessageModel(this)),
     _messageProcessor(_mainUi->createMessageProcessor(this)),
@@ -187,7 +187,7 @@ QList<NetworkId> Client::networkIds()
 const Network *Client::network(NetworkId networkid)
 {
     if (instance()->_networks.contains(networkid)) return instance()->_networks[networkid];
 const Network *Client::network(NetworkId networkid)
 {
     if (instance()->_networks.contains(networkid)) return instance()->_networks[networkid];
-    else return 0;
+    else return nullptr;
 }
 
 
 }
 
 
@@ -257,7 +257,7 @@ QList<IdentityId> Client::identityIds()
 const Identity *Client::identity(IdentityId id)
 {
     if (instance()->_identities.contains(id)) return instance()->_identities[id];
 const Identity *Client::identity(IdentityId id)
 {
     if (instance()->_identities.contains(id)) return instance()->_identities[id];
-    else return 0;
+    else return nullptr;
 }
 
 
 }
 
 
@@ -492,26 +492,26 @@ void Client::setDisconnectedFromCore()
 
     if (_bufferSyncer) {
         _bufferSyncer->deleteLater();
 
     if (_bufferSyncer) {
         _bufferSyncer->deleteLater();
-        _bufferSyncer = 0;
+        _bufferSyncer = nullptr;
     }
 
     _coreInfo->reset();
 
     if (_bufferViewManager) {
         _bufferViewManager->deleteLater();
     }
 
     _coreInfo->reset();
 
     if (_bufferViewManager) {
         _bufferViewManager->deleteLater();
-        _bufferViewManager = 0;
+        _bufferViewManager = nullptr;
     }
 
     _bufferViewOverlay->reset();
 
     if (_aliasManager) {
         _aliasManager->deleteLater();
     }
 
     _bufferViewOverlay->reset();
 
     if (_aliasManager) {
         _aliasManager->deleteLater();
-        _aliasManager = 0;
+        _aliasManager = nullptr;
     }
 
     if (_ignoreListManager) {
         _ignoreListManager->deleteLater();
     }
 
     if (_ignoreListManager) {
         _ignoreListManager->deleteLater();
-        _ignoreListManager = 0;
+        _ignoreListManager = nullptr;
     }
 
     if (_highlightRuleManager) {
     }
 
     if (_highlightRuleManager) {
@@ -540,7 +540,7 @@ void Client::setDisconnectedFromCore()
     while (netIter != _networks.end()) {
         Network *net = netIter.value();
         emit networkRemoved(net->networkId());
     while (netIter != _networks.end()) {
         Network *net = netIter.value();
         emit networkRemoved(net->networkId());
-        disconnect(net, SIGNAL(destroyed()), this, 0);
+        disconnect(net, SIGNAL(destroyed()), this, nullptr);
         netIter = _networks.erase(netIter);
         net->deleteLater();
     }
         netIter = _networks.erase(netIter);
         net->deleteLater();
     }
@@ -557,7 +557,7 @@ void Client::setDisconnectedFromCore()
 
     if (_networkConfig) {
         _networkConfig->deleteLater();
 
     if (_networkConfig) {
         _networkConfig->deleteLater();
-        _networkConfig = 0;
+        _networkConfig = nullptr;
     }
 }
 
     }
 }
 
index 2f0eda4..fe9a782 100644 (file)
@@ -29,7 +29,7 @@ class CLIENT_EXPORT ClientAliasManager : public AliasManager
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    explicit ClientAliasManager(QObject *parent = 0);
+    explicit ClientAliasManager(QObject *parent = nullptr);
 
 protected:
     const Network *network(NetworkId) const;
 
 protected:
     const Network *network(NetworkId) const;
index a29505f..a3fc870 100644 (file)
@@ -411,10 +411,10 @@ void ClientAuthHandler::handle(const LoginSuccess &msg)
 
 void ClientAuthHandler::handle(const SessionState &msg)
 {
 
 void ClientAuthHandler::handle(const SessionState &msg)
 {
-    disconnect(socket(), 0, this, 0); // this is the last message we shall ever get
+    disconnect(socket(), nullptr, this, nullptr); // this is the last message we shall ever get
 
     // give up ownership of the peer; CoreSession takes responsibility now
 
     // give up ownership of the peer; CoreSession takes responsibility now
-    _peer->setParent(0);
+    _peer->setParent(nullptr);
     emit handshakeComplete(_peer, msg);
 }
 
     emit handshakeComplete(_peer, msg);
 }
 
index a43d9c8..47b42a7 100644 (file)
@@ -39,7 +39,7 @@ public:
         Latest=Sha2_512
     };
 
         Latest=Sha2_512
     };
 
-    ClientAuthHandler(CoreAccount account, QObject *parent = 0);
+    ClientAuthHandler(CoreAccount account, QObject *parent = nullptr);
 
     Peer *peer() const;
 
 
     Peer *peer() const;
 
index c36763d..afb9faa 100644 (file)
@@ -31,7 +31,7 @@
 
 ClientBacklogManager::ClientBacklogManager(QObject *parent)
     : BacklogManager(parent),
 
 ClientBacklogManager::ClientBacklogManager(QObject *parent)
     : BacklogManager(parent),
-    _requester(0),
+    _requester(nullptr),
     _initBacklogRequested(false)
 {
 }
     _initBacklogRequested(false)
 {
 }
@@ -181,7 +181,7 @@ void ClientBacklogManager::dispatchMessages(const MessageList &messages, bool so
 void ClientBacklogManager::reset()
 {
     delete _requester;
 void ClientBacklogManager::reset()
 {
     delete _requester;
-    _requester = 0;
+    _requester = nullptr;
     _initBacklogRequested = false;
     _buffersRequested.clear();
 }
     _initBacklogRequested = false;
     _buffersRequested.clear();
 }
index 77ae36f..3f4814b 100644 (file)
@@ -32,7 +32,7 @@ class CLIENT_EXPORT ClientBacklogManager : public BacklogManager
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ClientBacklogManager(QObject *parent = 0);
+    ClientBacklogManager(QObject *parent = nullptr);
 
     // helper for the backlogRequester, as it isn't a QObject and can't emit itself
     inline void emitMessagesRequested(const QString &msg) const { emit messagesRequested(msg); }
 
     // helper for the backlogRequester, as it isn't a QObject and can't emit itself
     inline void emitMessagesRequested(const QString &msg) const { emit messagesRequested(msg); }
index 5c7d8b7..8205d2b 100644 (file)
@@ -29,7 +29,7 @@ class CLIENT_EXPORT ClientBufferViewConfig : public BufferViewConfig
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ClientBufferViewConfig(int bufferViewId, QObject *parent = 0);
+    ClientBufferViewConfig(int bufferViewId, QObject *parent = nullptr);
 
     inline bool isLocked() { return _locked || sortAlphabetically(); }
     inline void setLocked(bool locked) { _locked = locked; }
 
     inline bool isLocked() { return _locked || sortAlphabetically(); }
     inline void setLocked(bool locked) { _locked = locked; }
index c44b720..f619dfc 100644 (file)
@@ -32,7 +32,7 @@ class CLIENT_EXPORT ClientBufferViewManager : public BufferViewManager
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ClientBufferViewManager(SignalProxy *proxy, QObject *parent = 0);
+    ClientBufferViewManager(SignalProxy *proxy, QObject *parent = nullptr);
 
     QList<ClientBufferViewConfig *> clientBufferViewConfigs() const;
     ClientBufferViewConfig *clientBufferViewConfig(int bufferViewId) const;
 
     QList<ClientBufferViewConfig *> clientBufferViewConfigs() const;
     ClientBufferViewConfig *clientBufferViewConfig(int bufferViewId) const;
index 04b946e..16e1c42 100644 (file)
@@ -26,7 +26,7 @@
 CertIdentity::CertIdentity(IdentityId id, QObject *parent)
     : Identity(id, parent)
 #ifdef HAVE_SSL
 CertIdentity::CertIdentity(IdentityId id, QObject *parent)
     : Identity(id, parent)
 #ifdef HAVE_SSL
-    ,  _certManager(0),
+    ,  _certManager(nullptr),
     _isDirty(false)
 #endif
 {
     _isDirty(false)
 #endif
 {
@@ -36,7 +36,7 @@ CertIdentity::CertIdentity(IdentityId id, QObject *parent)
 CertIdentity::CertIdentity(const Identity &other, QObject *parent)
     : Identity(other, parent)
 #ifdef HAVE_SSL
 CertIdentity::CertIdentity(const Identity &other, QObject *parent)
     : Identity(other, parent)
 #ifdef HAVE_SSL
-    , _certManager(0),
+    , _certManager(nullptr),
     _isDirty(false)
 #endif
 {
     _isDirty(false)
 #endif
 {
@@ -46,7 +46,7 @@ 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(0),
+    , _certManager(nullptr),
     _isDirty(other._isDirty),
     _sslKey(other._sslKey),
     _sslCert(other._sslCert)
     _isDirty(other._isDirty),
     _sslKey(other._sslKey),
     _sslCert(other._sslCert)
index 2ff4cb8..5e58917 100644 (file)
@@ -31,9 +31,9 @@ class CLIENT_EXPORT CertIdentity : public Identity
     Q_OBJECT
 
 public:
     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; }
 
 #ifdef HAVE_SSL
     inline bool isDirty() const { return _isDirty; }
index 36c1b47..797235e 100644 (file)
@@ -30,7 +30,7 @@ class CLIENT_EXPORT ClientIgnoreListManager : public IgnoreListManager
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    explicit ClientIgnoreListManager(QObject *parent = 0);
+    explicit ClientIgnoreListManager(QObject *parent = nullptr);
 
     //! Fetch all matching ignore rules for a given hostmask
     /** \param hostmask The hostmask of the user
 
     //! Fetch all matching ignore rules for a given hostmask
     /** \param hostmask The hostmask of the user
index 47d18d7..385a910 100644 (file)
@@ -27,7 +27,7 @@ class ClientIrcListHelper : public IrcListHelper
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    inline ClientIrcListHelper(QObject *object = 0) : IrcListHelper(object) {};
+    inline ClientIrcListHelper(QObject *object = nullptr) : IrcListHelper(object) {};
 
 public slots:
     virtual QVariantList requestChannelList(const NetworkId &netId, const QStringList &channelFilters);
 
 public slots:
     virtual QVariantList requestChannelList(const NetworkId &netId, const QStringList &channelFilters);
index 1eba778..97bbbc7 100644 (file)
@@ -24,7 +24,7 @@
 
 ClientTransfer::ClientTransfer(const QUuid &uuid, QObject *parent)
     : Transfer(uuid, parent),
 
 ClientTransfer::ClientTransfer(const QUuid &uuid, QObject *parent)
     : Transfer(uuid, parent),
-    _file(0)
+    _file(nullptr)
 {
     connect(this, SIGNAL(statusChanged(Transfer::Status)), SLOT(onStatusChanged(Transfer::Status)));
 }
 {
     connect(this, SIGNAL(statusChanged(Transfer::Status)), SLOT(onStatusChanged(Transfer::Status)));
 }
@@ -44,7 +44,7 @@ void ClientTransfer::cleanUp()
     if (_file) {
         _file->close();
         _file->deleteLater();
     if (_file) {
         _file->close();
         _file->deleteLater();
-        _file = 0;
+        _file = nullptr;
     }
 }
 
     }
 }
 
@@ -58,7 +58,7 @@ QString ClientTransfer::savePath() const
 void ClientTransfer::accept(const QString &savePath) const
 {
     _savePath = savePath;
 void ClientTransfer::accept(const QString &savePath) const
 {
     _savePath = savePath;
-    PeerPtr ptr = 0;
+    PeerPtr ptr = nullptr;
     REQUEST_OTHER(requestAccepted, ARG(ptr));
     emit accepted();
 }
     REQUEST_OTHER(requestAccepted, ARG(ptr));
     emit accepted();
 }
@@ -66,7 +66,7 @@ void ClientTransfer::accept(const QString &savePath) const
 
 void ClientTransfer::reject() const
 {
 
 void ClientTransfer::reject() const
 {
-    PeerPtr ptr = 0;
+    PeerPtr ptr = nullptr;
     REQUEST_OTHER(requestRejected, ARG(ptr));
     emit rejected();
 }
     REQUEST_OTHER(requestRejected, ARG(ptr));
     emit rejected();
 }
index 567797f..9b27666 100644 (file)
@@ -31,7 +31,7 @@ class ClientTransfer : public Transfer
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ClientTransfer(const QUuid &uuid, QObject *parent = 0);
+    ClientTransfer(const QUuid &uuid, QObject *parent = nullptr);
 
     QString savePath() const;
 
 
     QString savePath() const;
 
index 6baf952..6b46682 100644 (file)
@@ -64,7 +64,7 @@ void ClientUserInputHandler::handleUserInput(const BufferInfo &bufferInfo, const
     if (!msg.startsWith('/')) {
         if (_nickRx.indexIn(msg) == 0) {
             const Network *net = Client::network(bufferInfo.networkId());
     if (!msg.startsWith('/')) {
         if (_nickRx.indexIn(msg) == 0) {
             const Network *net = Client::network(bufferInfo.networkId());
-            IrcUser *user = net ? net->ircUser(_nickRx.cap(1)) : 0;
+            IrcUser *user = net ? net->ircUser(_nickRx.cap(1)) : nullptr;
             if (user)
                 user->setLastSpokenTo(bufferInfo.bufferId(), QDateTime::currentDateTime().toUTC());
         }
             if (user)
                 user->setLastSpokenTo(bufferInfo.bufferId(), QDateTime::currentDateTime().toUTC());
         }
index 5e26dda..6df0da0 100644 (file)
@@ -31,7 +31,7 @@ class ClientUserInputHandler : public BasicHandler
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ClientUserInputHandler(QObject *parent = 0);
+    ClientUserInputHandler(QObject *parent = nullptr);
 
 public slots:
     void handleUserInput(const BufferInfo &bufferInfo, const QString &msg);
 
 public slots:
     void handleUserInput(const BufferInfo &bufferInfo, const QString &msg);
index 5b224b4..91082b2 100644 (file)
@@ -37,8 +37,8 @@ public:
         UuidRole
     };
 
         UuidRole
     };
 
-    CoreAccountModel(QObject *parent = 0);
-    CoreAccountModel(const CoreAccountModel *other, QObject *parent = 0);
+    CoreAccountModel(QObject *parent = nullptr);
+    CoreAccountModel(const CoreAccountModel *other, QObject *parent = nullptr);
 
     inline int rowCount(const QModelIndex &parent = QModelIndex()) const;
     virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
 
     inline int rowCount(const QModelIndex &parent = QModelIndex()) const;
     virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
index 4127152..90e0289 100644 (file)
@@ -36,7 +36,7 @@
 
 CoreConnection::CoreConnection(QObject *parent)
     : QObject(parent),
 
 CoreConnection::CoreConnection(QObject *parent)
     : QObject(parent),
-    _authHandler(0),
+    _authHandler(nullptr),
     _state(Disconnected),
     _wantReconnect(false),
     _wasReconnect(false),
     _state(Disconnected),
     _wantReconnect(false),
     _wasReconnect(false),
@@ -286,17 +286,17 @@ void CoreConnection::resetConnection(bool wantReconnect)
     _wantReconnect = wantReconnect;
 
     if (_authHandler) {
     _wantReconnect = wantReconnect;
 
     if (_authHandler) {
-        disconnect(_authHandler, 0, this, 0);
+        disconnect(_authHandler, nullptr, this, nullptr);
         _authHandler->close();
         _authHandler->deleteLater();
         _authHandler->close();
         _authHandler->deleteLater();
-        _authHandler = 0;
+        _authHandler = nullptr;
     }
 
     if (_peer) {
     }
 
     if (_peer) {
-        disconnect(_peer, 0, this, 0);
+        disconnect(_peer, nullptr, this, nullptr);
         // peer belongs to the sigproxy and thus gets deleted by it
         _peer->close();
         // peer belongs to the sigproxy and thus gets deleted by it
         _peer->close();
-        _peer = 0;
+        _peer = nullptr;
     }
 
     _netsToSync.clear();
     }
 
     _netsToSync.clear();
@@ -453,9 +453,9 @@ void CoreConnection::onHandshakeComplete(RemotePeer *peer, const Protocol::Sessi
 {
     updateProgress(100, 100);
 
 {
     updateProgress(100, 100);
 
-    disconnect(_authHandler, 0, this, 0);
+    disconnect(_authHandler, nullptr, this, nullptr);
     _authHandler->deleteLater();
     _authHandler->deleteLater();
-    _authHandler = 0;
+    _authHandler = nullptr;
 
     _peer = peer;
     connect(peer, SIGNAL(disconnected()), SLOT(coreSocketDisconnected()));
 
     _peer = peer;
     connect(peer, SIGNAL(disconnected()), SLOT(coreSocketDisconnected()));
@@ -518,7 +518,7 @@ void CoreConnection::networkInitDone()
 {
     QObject *net = sender();
     Q_ASSERT(net);
 {
     QObject *net = sender();
     Q_ASSERT(net);
-    disconnect(net, 0, this, 0);
+    disconnect(net, nullptr, this, nullptr);
     _netsToSync.remove(net);
     updateProgress(_numNetsToSync - _netsToSync.count(), _numNetsToSync);
     checkSyncState();
     _netsToSync.remove(net);
     updateProgress(_numNetsToSync - _netsToSync.count(), _numNetsToSync);
     checkSyncState();
index 7951a49..56a5a29 100644 (file)
@@ -56,7 +56,7 @@ public:
         Synchronized
     };
 
         Synchronized
     };
 
-    CoreConnection(QObject *parent = 0);
+    CoreConnection(QObject *parent = nullptr);
 
     void init();
 
 
     void init();
 
index 015b8a6..ce82847 100644 (file)
@@ -30,7 +30,7 @@ class ExecWrapper : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ExecWrapper(QObject *parent = 0);
+    ExecWrapper(QObject *parent = nullptr);
 
 public slots:
     void start(const BufferInfo &info, const QString &command);
 
 public slots:
     void start(const BufferInfo &info, const QString &command);
index 8c52231..5cce869 100644 (file)
@@ -31,7 +31,7 @@ class CLIENT_EXPORT IrcListModel : public QAbstractItemModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IrcListModel(QObject *parent = 0);
+    IrcListModel(QObject *parent = nullptr);
 
     virtual QVariant data(const QModelIndex &index, int role) const;
     virtual Qt::ItemFlags flags(const QModelIndex &index) const;
 
     virtual QVariant data(const QModelIndex &index, int role) const;
     virtual Qt::ItemFlags flags(const QModelIndex &index) const;
index c7bd3d1..2919704 100644 (file)
@@ -36,10 +36,10 @@ class CLIENT_EXPORT MessageFilter : public QSortFilterProxyModel
     Q_OBJECT
 
 protected:
     Q_OBJECT
 
 protected:
-    MessageFilter(QAbstractItemModel *source, QObject *parent = 0);
+    MessageFilter(QAbstractItemModel *source, QObject *parent = nullptr);
 
 public:
 
 public:
-    MessageFilter(MessageModel *, const QList<BufferId> &buffers = QList<BufferId>(), QObject *parent = 0);
+    MessageFilter(MessageModel *, const QList<BufferId> &buffers = QList<BufferId>(), QObject *parent = nullptr);
 
     virtual QString idString() const;
 
 
     virtual QString idString() const;
 
index 5daec85..1634936 100644 (file)
@@ -39,7 +39,7 @@
 NetworkItem::NetworkItem(const NetworkId &netid, AbstractTreeItem *parent)
     : PropertyMapItem(parent),
     _networkId(netid),
 NetworkItem::NetworkItem(const NetworkId &netid, AbstractTreeItem *parent)
     : PropertyMapItem(parent),
     _networkId(netid),
-    _statusBufferItem(0)
+    _statusBufferItem(nullptr)
 {
     // DO NOT EMIT dataChanged() DIRECTLY IN NetworkItem
     // use networkDataChanged() instead. Otherwise you will end up in a infinite loop
 {
     // DO NOT EMIT dataChanged() DIRECTLY IN NetworkItem
     // use networkDataChanged() instead. Otherwise you will end up in a infinite loop
@@ -91,7 +91,7 @@ QString NetworkItem::escapeHTML(const QString &string, bool useNonbreakingSpaces
 // FIXME shouldn't we check the bufferItemCache here?
 BufferItem *NetworkItem::findBufferItem(BufferId bufferId)
 {
 // FIXME shouldn't we check the bufferItemCache here?
 BufferItem *NetworkItem::findBufferItem(BufferId bufferId)
 {
-    BufferItem *bufferItem = 0;
+    BufferItem *bufferItem = nullptr;
 
     for (int i = 0; i < childCount(); i++) {
         bufferItem = qobject_cast<BufferItem *>(child(i));
 
     for (int i = 0; i < childCount(); i++) {
         bufferItem = qobject_cast<BufferItem *>(child(i));
@@ -100,7 +100,7 @@ BufferItem *NetworkItem::findBufferItem(BufferId bufferId)
         if (bufferItem->bufferId() == bufferId)
             return bufferItem;
     }
         if (bufferItem->bufferId() == bufferId)
             return bufferItem;
     }
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
@@ -200,7 +200,7 @@ void NetworkItem::attachIrcChannel(IrcChannel *ircChannel)
 
 void NetworkItem::attachIrcUser(IrcUser *ircUser)
 {
 
 void NetworkItem::attachIrcUser(IrcUser *ircUser)
 {
-    QueryBufferItem *queryItem = 0;
+    QueryBufferItem *queryItem = nullptr;
     for (int i = 0; i < childCount(); i++) {
         queryItem = qobject_cast<QueryBufferItem *>(child(i));
         if (!queryItem)
     for (int i = 0; i < childCount(); i++) {
         queryItem = qobject_cast<QueryBufferItem *>(child(i));
         if (!queryItem)
@@ -264,7 +264,7 @@ void NetworkItem::onBeginRemoveChilds(int start, int end)
     for (int i = start; i <= end; i++) {
         StatusBufferItem *statusBufferItem = qobject_cast<StatusBufferItem *>(child(i));
         if (statusBufferItem) {
     for (int i = start; i <= end; i++) {
         StatusBufferItem *statusBufferItem = qobject_cast<StatusBufferItem *>(child(i));
         if (statusBufferItem) {
-            _statusBufferItem = 0;
+            _statusBufferItem = nullptr;
             break;
         }
     }
             break;
         }
     }
@@ -273,7 +273,7 @@ void NetworkItem::onBeginRemoveChilds(int start, int end)
 
 void NetworkItem::onNetworkDestroyed()
 {
 
 void NetworkItem::onNetworkDestroyed()
 {
-    _network = 0;
+    _network = nullptr;
     emit networkDataChanged();
     removeAllChilds();
 }
     emit networkDataChanged();
     removeAllChilds();
 }
@@ -498,7 +498,7 @@ QString StatusBufferItem::toolTip(int column) const
 *****************************************/
 QueryBufferItem::QueryBufferItem(const BufferInfo &bufferInfo, NetworkItem *parent)
     : BufferItem(bufferInfo, parent),
 *****************************************/
 QueryBufferItem::QueryBufferItem(const BufferInfo &bufferInfo, NetworkItem *parent)
     : BufferItem(bufferInfo, parent),
-    _ircUser(0)
+    _ircUser(nullptr)
 {
     setFlags(flags() | Qt::ItemIsDropEnabled | Qt::ItemIsEditable);
 
 {
     setFlags(flags() | Qt::ItemIsDropEnabled | Qt::ItemIsEditable);
 
@@ -693,7 +693,7 @@ void QueryBufferItem::setIrcUser(IrcUser *ircUser)
         return;
 
     if (_ircUser) {
         return;
 
     if (_ircUser) {
-        disconnect(_ircUser, 0, this, 0);
+        disconnect(_ircUser, nullptr, this, nullptr);
     }
 
     if (ircUser) {
     }
 
     if (ircUser) {
@@ -716,10 +716,10 @@ void QueryBufferItem::removeIrcUser()
         // SIGNAL destroyed(QObject*) to SLOT removeIrcUser().
         // This fixes removing an active IrcUser if the user had quit then rejoined in a nonstandard
         // manner (e.g. updateNickFromHost calling newIrcUser, triggered by an away-notify message).
         // SIGNAL destroyed(QObject*) to SLOT removeIrcUser().
         // This fixes removing an active IrcUser if the user had quit then rejoined in a nonstandard
         // manner (e.g. updateNickFromHost calling newIrcUser, triggered by an away-notify message).
-        disconnect(_ircUser, 0, this, 0);
+        disconnect(_ircUser, nullptr, this, nullptr);
 
         // Clear IrcUser (only set to 0 if not already 0)
 
         // Clear IrcUser (only set to 0 if not already 0)
-        _ircUser = 0;
+        _ircUser = nullptr;
 
         // Only emit dataChanged() if data actually changed.  This might serve as a small
         // optimization, but it can be moved outside the if statement if other behavior depends on
 
         // Only emit dataChanged() if data actually changed.  This might serve as a small
         // optimization, but it can be moved outside the if statement if other behavior depends on
@@ -734,7 +734,7 @@ void QueryBufferItem::removeIrcUser()
 *****************************************/
 ChannelBufferItem::ChannelBufferItem(const BufferInfo &bufferInfo, AbstractTreeItem *parent)
     : BufferItem(bufferInfo, parent),
 *****************************************/
 ChannelBufferItem::ChannelBufferItem(const BufferInfo &bufferInfo, AbstractTreeItem *parent)
     : BufferItem(bufferInfo, parent),
-    _ircChannel(0)
+    _ircChannel(nullptr)
 {
     setFlags(flags() | Qt::ItemIsDropEnabled);
 }
 {
     setFlags(flags() | Qt::ItemIsDropEnabled);
 }
@@ -803,7 +803,7 @@ void ChannelBufferItem::attachIrcChannel(IrcChannel *ircChannel)
 {
     if (_ircChannel) {
         qWarning() << Q_FUNC_INFO << "IrcChannel already set; cleanup failed!?";
 {
     if (_ircChannel) {
         qWarning() << Q_FUNC_INFO << "IrcChannel already set; cleanup failed!?";
-        disconnect(_ircChannel, 0, this, 0);
+        disconnect(_ircChannel, nullptr, this, nullptr);
     }
 
     _ircChannel = ircChannel;
     }
 
     _ircChannel = ircChannel;
@@ -847,8 +847,8 @@ QString ChannelBufferItem::nickChannelModes(const QString &nick) const
 void ChannelBufferItem::ircChannelParted()
 {
     Q_CHECK_PTR(_ircChannel);
 void ChannelBufferItem::ircChannelParted()
 {
     Q_CHECK_PTR(_ircChannel);
-    disconnect(_ircChannel, 0, this, 0);
-    _ircChannel = 0;
+    disconnect(_ircChannel, nullptr, this, nullptr);
+    _ircChannel = nullptr;
     emit dataChanged();
     removeAllChilds();
 }
     emit dataChanged();
     removeAllChilds();
 }
@@ -857,7 +857,7 @@ void ChannelBufferItem::ircChannelParted()
 void ChannelBufferItem::ircChannelDestroyed()
 {
     if (_ircChannel) {
 void ChannelBufferItem::ircChannelDestroyed()
 {
     if (_ircChannel) {
-        _ircChannel = 0;
+        _ircChannel = nullptr;
         emit dataChanged();
         removeAllChilds();
     }
         emit dataChanged();
         removeAllChilds();
     }
@@ -873,7 +873,7 @@ void ChannelBufferItem::join(const QList<IrcUser *> &ircUsers)
 
 UserCategoryItem *ChannelBufferItem::findCategoryItem(int categoryId)
 {
 
 UserCategoryItem *ChannelBufferItem::findCategoryItem(int categoryId)
 {
-    UserCategoryItem *categoryItem = 0;
+    UserCategoryItem *categoryItem = nullptr;
 
     for (int i = 0; i < childCount(); i++) {
         categoryItem = qobject_cast<UserCategoryItem *>(child(i));
 
     for (int i = 0; i < childCount(); i++) {
         categoryItem = qobject_cast<UserCategoryItem *>(child(i));
@@ -882,7 +882,7 @@ UserCategoryItem *ChannelBufferItem::findCategoryItem(int categoryId)
         if (categoryItem->categoryId() == categoryId)
             return categoryItem;
     }
         if (categoryItem->categoryId() == categoryId)
             return categoryItem;
     }
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
@@ -899,7 +899,7 @@ void ChannelBufferItem::addUsersToCategory(const QList<IrcUser *> &ircUsers)
     QHash<UserCategoryItem *, QList<IrcUser *> > categories;
 
     int categoryId = -1;
     QHash<UserCategoryItem *, QList<IrcUser *> > categories;
 
     int categoryId = -1;
-    UserCategoryItem *categoryItem = 0;
+    UserCategoryItem *categoryItem = nullptr;
 
     foreach(IrcUser *ircUser, ircUsers) {
         categoryId = UserCategoryItem::categoryFromModes(_ircChannel->userModes(ircUser));
 
     foreach(IrcUser *ircUser, ircUsers) {
         categoryId = UserCategoryItem::categoryFromModes(_ircChannel->userModes(ircUser));
@@ -927,7 +927,7 @@ void ChannelBufferItem::part(IrcUser *ircUser)
         return;
     }
 
         return;
     }
 
-    disconnect(ircUser, 0, this, 0);
+    disconnect(ircUser, nullptr, this, nullptr);
     removeUserFromCategory(ircUser);
     emit dataChanged(2);
 }
     removeUserFromCategory(ircUser);
     emit dataChanged(2);
 }
@@ -942,7 +942,7 @@ void ChannelBufferItem::removeUserFromCategory(IrcUser *ircUser)
         return;
     }
 
         return;
     }
 
-    UserCategoryItem *categoryItem = 0;
+    UserCategoryItem *categoryItem = nullptr;
     for (int i = 0; i < childCount(); i++) {
         categoryItem = qobject_cast<UserCategoryItem *>(child(i));
         if (categoryItem->removeUser(ircUser)) {
     for (int i = 0; i < childCount(); i++) {
         categoryItem = qobject_cast<UserCategoryItem *>(child(i));
         if (categoryItem->removeUser(ircUser)) {
@@ -972,7 +972,7 @@ void ChannelBufferItem::userModeChanged(IrcUser *ircUser)
     }
 
     // find the item that needs reparenting
     }
 
     // find the item that needs reparenting
-    IrcUserItem *ircUserItem = 0;
+    IrcUserItem *ircUserItem = nullptr;
     for (int i = 0; i < childCount(); i++) {
         UserCategoryItem *oldCategoryItem = qobject_cast<UserCategoryItem *>(child(i));
         Q_ASSERT(oldCategoryItem);
     for (int i = 0; i < childCount(); i++) {
         UserCategoryItem *oldCategoryItem = qobject_cast<UserCategoryItem *>(child(i));
         Q_ASSERT(oldCategoryItem);
@@ -1021,24 +1021,24 @@ QString UserCategoryItem::categoryName() const
     int n = childCount();
     switch (_category) {
     case 0:
     int n = childCount();
     switch (_category) {
     case 0:
-        return tr("%n Owner(s)", 0, n);
+        return tr("%n Owner(s)", "", n);
     case 1:
     case 1:
-        return tr("%n Admin(s)", 0, n);
+        return tr("%n Admin(s)", "", n);
     case 2:
     case 2:
-        return tr("%n Operator(s)", 0, n);
+        return tr("%n Operator(s)", "", n);
     case 3:
     case 3:
-        return tr("%n Half-Op(s)", 0, n);
+        return tr("%n Half-Op(s)", "", n);
     case 4:
     case 4:
-        return tr("%n Voiced", 0, n);
+        return tr("%n Voiced", "", n);
     default:
     default:
-        return tr("%n User(s)", 0, n);
+        return tr("%n User(s)", "", n);
     }
 }
 
 
 IrcUserItem *UserCategoryItem::findIrcUser(IrcUser *ircUser)
 {
     }
 }
 
 
 IrcUserItem *UserCategoryItem::findIrcUser(IrcUser *ircUser)
 {
-    IrcUserItem *userItem = 0;
+    IrcUserItem *userItem = nullptr;
 
     for (int i = 0; i < childCount(); i++) {
         userItem = qobject_cast<IrcUserItem *>(child(i));
 
     for (int i = 0; i < childCount(); i++) {
         userItem = qobject_cast<IrcUserItem *>(child(i));
@@ -1047,7 +1047,7 @@ IrcUserItem *UserCategoryItem::findIrcUser(IrcUser *ircUser)
         if (userItem->ircUser() == ircUser)
             return userItem;
     }
         if (userItem->ircUser() == ircUser)
             return userItem;
     }
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
@@ -1317,7 +1317,7 @@ bool NetworkModel::isBufferIndex(const QModelIndex &index) const
 
 int NetworkModel::networkRow(NetworkId networkId) const
 {
 
 int NetworkModel::networkRow(NetworkId networkId) const
 {
-    NetworkItem *netItem = 0;
+    NetworkItem *netItem = nullptr;
     for (int i = 0; i < rootItem->childCount(); i++) {
         netItem = qobject_cast<NetworkItem *>(rootItem->child(i));
         if (!netItem)
     for (int i = 0; i < rootItem->childCount(); i++) {
         netItem = qobject_cast<NetworkItem *>(rootItem->child(i));
         if (!netItem)
@@ -1343,7 +1343,7 @@ NetworkItem *NetworkModel::findNetworkItem(NetworkId networkId) const
 {
     int netRow = networkRow(networkId);
     if (netRow == -1)
 {
     int netRow = networkRow(networkId);
     if (netRow == -1)
-        return 0;
+        return nullptr;
     else
         return qobject_cast<NetworkItem *>(rootItem->child(netRow));
 }
     else
         return qobject_cast<NetworkItem *>(rootItem->child(netRow));
 }
@@ -1353,7 +1353,7 @@ NetworkItem *NetworkModel::networkItem(NetworkId networkId)
 {
     NetworkItem *netItem = findNetworkItem(networkId);
 
 {
     NetworkItem *netItem = findNetworkItem(networkId);
 
-    if (netItem == 0) {
+    if (netItem == nullptr) {
         netItem = new NetworkItem(networkId, rootItem);
         rootItem->newChild(netItem);
     }
         netItem = new NetworkItem(networkId, rootItem);
         rootItem->newChild(netItem);
     }
@@ -1384,7 +1384,7 @@ BufferItem *NetworkModel::findBufferItem(BufferId bufferId) const
     if (_bufferItemCache.contains(bufferId))
         return _bufferItemCache[bufferId];
     else
     if (_bufferItemCache.contains(bufferId))
         return _bufferItemCache[bufferId];
     else
-        return 0;
+        return nullptr;
 }
 
 
 }
 
 
@@ -1563,7 +1563,7 @@ void NetworkModel::updateBufferActivity(Message &msg)
     case Message::Action:
         if (bufferType(msg.bufferId()) == BufferInfo::ChannelBuffer) {
             const Network *net = Client::network(msg.bufferInfo().networkId());
     case Message::Action:
         if (bufferType(msg.bufferId()) == BufferInfo::ChannelBuffer) {
             const Network *net = Client::network(msg.bufferInfo().networkId());
-            IrcUser *user = net ? net->ircUser(nickFromMask(msg.sender())) : 0;
+            IrcUser *user = net ? net->ircUser(nickFromMask(msg.sender())) : nullptr;
             if (user)
                 user->setLastChannelActivity(msg.bufferId(), msg.timestamp());
         }
             if (user)
                 user->setLastChannelActivity(msg.bufferId(), msg.timestamp());
         }
@@ -1627,7 +1627,7 @@ const Network *NetworkModel::networkByIndex(const QModelIndex &index) const
 {
     QVariant netVariant = index.data(NetworkIdRole);
     if (!netVariant.isValid())
 {
     QVariant netVariant = index.data(NetworkIdRole);
     if (!netVariant.isValid())
-        return 0;
+        return nullptr;
 
     NetworkId networkId = netVariant.value<NetworkId>();
     return Client::network(networkId);
 
     NetworkId networkId = netVariant.value<NetworkId>();
     return Client::network(networkId);
index 7f73b76..a52c1b9 100644 (file)
@@ -42,7 +42,7 @@ class NetworkItem : public PropertyMapItem
     Q_PROPERTY(int nickCount READ nickCount)
 
 public :
     Q_PROPERTY(int nickCount READ nickCount)
 
 public :
-    NetworkItem(const NetworkId &netid, AbstractTreeItem *parent = 0);
+    NetworkItem(const NetworkId &netid, AbstractTreeItem *parent = nullptr);
 
     virtual QStringList propertyOrder() const;
 
 
     virtual QStringList propertyOrder() const;
 
@@ -109,7 +109,7 @@ class BufferItem : public PropertyMapItem
     Q_PROPERTY(int nickCount READ nickCount)
 
 public :
     Q_PROPERTY(int nickCount READ nickCount)
 
 public :
-    BufferItem(const BufferInfo &bufferInfo, AbstractTreeItem *parent = 0);
+    BufferItem(const BufferInfo &bufferInfo, AbstractTreeItem *parent = nullptr);
 
     virtual QStringList propertyOrder() const;
 
 
     virtual QStringList propertyOrder() const;
 
@@ -345,7 +345,7 @@ public:
     };
     Q_DECLARE_FLAGS(ItemTypes, ItemType)
 
     };
     Q_DECLARE_FLAGS(ItemTypes, ItemType)
 
-    NetworkModel(QObject *parent = 0);
+    NetworkModel(QObject *parent = nullptr);
     static QList<QVariant> defaultHeader();
 
     static bool mimeContainsBufferList(const QMimeData *mimeData);
     static QList<QVariant> defaultHeader();
 
     static bool mimeContainsBufferList(const QMimeData *mimeData);
index fe93c41..6329572 100644 (file)
@@ -45,8 +45,8 @@ bool SelectionModelSynchronizer::checkBaseModel(QItemSelectionModel *selectionMo
         return false;
 
     const QAbstractItemModel *baseModel = selectionModel->model();
         return false;
 
     const QAbstractItemModel *baseModel = selectionModel->model();
-    const QAbstractProxyModel *proxyModel = 0;
-    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != 0) {
+    const QAbstractProxyModel *proxyModel = nullptr;
+    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != nullptr) {
         baseModel = proxyModel->sourceModel();
         if (baseModel == model())
             break;
         baseModel = proxyModel->sourceModel();
         if (baseModel == model())
             break;
@@ -81,8 +81,8 @@ void SelectionModelSynchronizer::synchronizeSelectionModel(QItemSelectionModel *
 
 void SelectionModelSynchronizer::removeSelectionModel(QItemSelectionModel *model)
 {
 
 void SelectionModelSynchronizer::removeSelectionModel(QItemSelectionModel *model)
 {
-    disconnect(model, 0, this, 0);
-    disconnect(this, 0, model, 0);
+    disconnect(model, nullptr, this, nullptr);
+    disconnect(this, nullptr, model, nullptr);
     selectionModelDestroyed(model);
 }
 
     selectionModelDestroyed(model);
 }
 
@@ -156,8 +156,8 @@ QModelIndex SelectionModelSynchronizer::mapFromSource(const QModelIndex &sourceI
     // make a list of all involved proxies, wie have to traverse backwards
     QList<const QAbstractProxyModel *> proxyModels;
     const QAbstractItemModel *baseModel = selectionModel->model();
     // make a list of all involved proxies, wie have to traverse backwards
     QList<const QAbstractProxyModel *> proxyModels;
     const QAbstractItemModel *baseModel = selectionModel->model();
-    const QAbstractProxyModel *proxyModel = 0;
-    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != 0) {
+    const QAbstractProxyModel *proxyModel = nullptr;
+    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != nullptr) {
         if (baseModel == model())
             break;
         proxyModels << proxyModel;
         if (baseModel == model())
             break;
         proxyModels << proxyModel;
@@ -182,8 +182,8 @@ QItemSelection SelectionModelSynchronizer::mapSelectionFromSource(const QItemSel
     // make a list of all involved proxies, wie have to traverse backwards
     QList<const QAbstractProxyModel *> proxyModels;
     const QAbstractItemModel *baseModel = selectionModel->model();
     // make a list of all involved proxies, wie have to traverse backwards
     QList<const QAbstractProxyModel *> proxyModels;
     const QAbstractItemModel *baseModel = selectionModel->model();
-    const QAbstractProxyModel *proxyModel = 0;
-    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != 0) {
+    const QAbstractProxyModel *proxyModel = nullptr;
+    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != nullptr) {
         if (baseModel == model())
             break;
         proxyModels << proxyModel;
         if (baseModel == model())
             break;
         proxyModels << proxyModel;
@@ -204,8 +204,8 @@ QModelIndex SelectionModelSynchronizer::mapToSource(const QModelIndex &index, QI
 
     QModelIndex sourceIndex = index;
     const QAbstractItemModel *baseModel = selectionModel->model();
 
     QModelIndex sourceIndex = index;
     const QAbstractItemModel *baseModel = selectionModel->model();
-    const QAbstractProxyModel *proxyModel = 0;
-    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != 0) {
+    const QAbstractProxyModel *proxyModel = nullptr;
+    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != nullptr) {
         sourceIndex = proxyModel->mapToSource(sourceIndex);
         baseModel = proxyModel->sourceModel();
         if (baseModel == model())
         sourceIndex = proxyModel->mapToSource(sourceIndex);
         baseModel = proxyModel->sourceModel();
         if (baseModel == model())
@@ -221,8 +221,8 @@ QItemSelection SelectionModelSynchronizer::mapSelectionToSource(const QItemSelec
 
     QItemSelection sourceSelection = selection;
     const QAbstractItemModel *baseModel = selectionModel->model();
 
     QItemSelection sourceSelection = selection;
     const QAbstractItemModel *baseModel = selectionModel->model();
-    const QAbstractProxyModel *proxyModel = 0;
-    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != 0) {
+    const QAbstractProxyModel *proxyModel = nullptr;
+    while ((proxyModel = qobject_cast<const QAbstractProxyModel *>(baseModel)) != nullptr) {
         sourceSelection = proxyModel->mapSelectionToSource(sourceSelection);
         baseModel = proxyModel->sourceModel();
         if (baseModel == model())
         sourceSelection = proxyModel->mapSelectionToSource(sourceSelection);
         baseModel = proxyModel->sourceModel();
         if (baseModel == model())
index b3d1214..cad7edf 100644 (file)
@@ -32,7 +32,7 @@ class CLIENT_EXPORT SelectionModelSynchronizer : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SelectionModelSynchronizer(QAbstractItemModel *parent = 0);
+    SelectionModelSynchronizer(QAbstractItemModel *parent = nullptr);
 
     void synchronizeSelectionModel(QItemSelectionModel *selectionModel);
     void removeSelectionModel(QItemSelectionModel *selectionModel);
 
     void synchronizeSelectionModel(QItemSelectionModel *selectionModel);
     void removeSelectionModel(QItemSelectionModel *selectionModel);
index 85bd8e3..affd487 100644 (file)
@@ -106,7 +106,7 @@ QVariant TransferModel::data(const QModelIndex& index, int role) const
 void TransferModel::setManager(const TransferManager *manager)
 {
     if (_manager) {
 void TransferModel::setManager(const TransferManager *manager)
 {
     if (_manager) {
-        disconnect(_manager, 0, this, 0);
+        disconnect(_manager, nullptr, this, nullptr);
         beginResetModel();
         _transferIds.clear();
         endResetModel();
         beginResetModel();
         _transferIds.clear();
         endResetModel();
@@ -152,7 +152,7 @@ void TransferModel::onTransferRemoved(const QUuid &transferId)
     // Check if the transfer object still exists, which means we still should disconnect
     auto transfer = _manager->transfer(transferId);
     if (transfer)
     // Check if the transfer object still exists, which means we still should disconnect
     auto transfer = _manager->transfer(transferId);
     if (transfer)
-        disconnect(transfer, 0, this, 0);
+        disconnect(transfer, nullptr, this, nullptr);
 
     for (auto row = 0; row < _transferIds.size(); ++row) {
         if (_transferIds[row] == transferId) {
 
     for (auto row = 0; row < _transferIds.size(); ++row) {
         if (_transferIds[row] == transferId) {
index 892ad5c..fa66ba6 100644 (file)
@@ -41,7 +41,7 @@ private:
 AbstractTreeItem::AbstractTreeItem(AbstractTreeItem *parent)
     : QObject(parent),
     _flags(Qt::ItemIsSelectable | Qt::ItemIsEnabled),
 AbstractTreeItem::AbstractTreeItem(AbstractTreeItem *parent)
     : QObject(parent),
     _flags(Qt::ItemIsSelectable | Qt::ItemIsEnabled),
-    _treeItemFlags(0)
+    _treeItemFlags(nullptr)
 {
 }
 
 {
 }
 
@@ -103,7 +103,7 @@ void AbstractTreeItem::removeAllChilds()
     childIter = _childItems.begin();
     while (childIter != _childItems.end()) {
         child = *childIter;
     childIter = _childItems.begin();
     while (childIter != _childItems.end()) {
         child = *childIter;
-        child->setTreeItemFlags(0); // disable self deletion, as this would only fuck up consitency and the child gets deleted anyways
+        child->setTreeItemFlags(nullptr); // disable self deletion, as this would only fuck up consitency and the child gets deleted anyways
         child->removeAllChilds();
         ++childIter;
     }
         child->removeAllChilds();
         ++childIter;
     }
@@ -182,7 +182,7 @@ bool AbstractTreeItem::reParent(AbstractTreeItem *newParent)
 AbstractTreeItem *AbstractTreeItem::child(int row) const
 {
     if (childCount() <= row)
 AbstractTreeItem *AbstractTreeItem::child(int row) const
 {
     if (childCount() <= row)
-        return 0;
+        return nullptr;
     else
         return _childItems[row];
 }
     else
         return _childItems[row];
 }
@@ -323,7 +323,7 @@ TreeModel::TreeModel(const QList<QVariant> &data, QObject *parent)
     _childStatus(QModelIndex(), 0, 0, 0),
     _aboutToRemoveOrInsert(false)
 {
     _childStatus(QModelIndex(), 0, 0, 0),
     _aboutToRemoveOrInsert(false)
 {
-    rootItem = new SimpleTreeItem(data, 0);
+    rootItem = new SimpleTreeItem(data, nullptr);
     connectItem(rootItem);
 
     if (Quassel::isOptionSet("debugmodel")) {
     connectItem(rootItem);
 
     if (Quassel::isOptionSet("debugmodel")) {
@@ -376,7 +376,7 @@ QModelIndex TreeModel::index(int row, int column, const QModelIndex &parent) con
 
 QModelIndex TreeModel::indexByItem(AbstractTreeItem *item) const
 {
 
 QModelIndex TreeModel::indexByItem(AbstractTreeItem *item) const
 {
-    if (item == 0) {
+    if (item == nullptr) {
         qWarning() << "TreeModel::indexByItem(AbstractTreeItem *item) received NULL-Pointer";
         return QModelIndex();
     }
         qWarning() << "TreeModel::indexByItem(AbstractTreeItem *item) received NULL-Pointer";
         return QModelIndex();
     }
@@ -564,7 +564,7 @@ void TreeModel::beginRemoveChilds(int firstRow, int lastRow)
     }
 
     for (int i = firstRow; i <= lastRow; i++) {
     }
 
     for (int i = firstRow; i <= lastRow; i++) {
-        disconnect(parentItem->child(i), 0, this, 0);
+        disconnect(parentItem->child(i), nullptr, this, nullptr);
     }
 
     // consitency checks
     }
 
     // consitency checks
index 716e07c..7e097ec 100644 (file)
@@ -43,7 +43,7 @@ public:
     };
     Q_DECLARE_FLAGS(TreeItemFlags, TreeItemFlag)
 
     };
     Q_DECLARE_FLAGS(TreeItemFlags, TreeItemFlag)
 
-    AbstractTreeItem(AbstractTreeItem *parent = 0);
+    AbstractTreeItem(AbstractTreeItem *parent = nullptr);
 
     bool newChild(AbstractTreeItem *child);
     bool newChilds(const QList<AbstractTreeItem *> &items);
 
     bool newChild(AbstractTreeItem *child);
     bool newChilds(const QList<AbstractTreeItem *> &items);
@@ -106,7 +106,7 @@ class CLIENT_EXPORT SimpleTreeItem : public AbstractTreeItem
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SimpleTreeItem(const QList<QVariant> &data, AbstractTreeItem *parent = 0);
+    SimpleTreeItem(const QList<QVariant> &data, AbstractTreeItem *parent = nullptr);
     virtual ~SimpleTreeItem();
 
     virtual QVariant data(int column, int role) const;
     virtual ~SimpleTreeItem();
 
     virtual QVariant data(int column, int role) const;
@@ -127,7 +127,7 @@ class CLIENT_EXPORT PropertyMapItem : public AbstractTreeItem
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    PropertyMapItem(AbstractTreeItem *parent = 0);
+    PropertyMapItem(AbstractTreeItem *parent = nullptr);
 
     virtual QStringList propertyOrder() const = 0;
 
 
     virtual QStringList propertyOrder() const = 0;
 
@@ -152,7 +152,7 @@ public:
         UserRole
     };
 
         UserRole
     };
 
-    TreeModel(const QList<QVariant> &, QObject *parent = 0);
+    TreeModel(const QList<QVariant> &, QObject *parent = nullptr);
     virtual ~TreeModel();
 
     AbstractTreeItem *root() const;
     virtual ~TreeModel();
 
     AbstractTreeItem *root() const;
index aaac54d..ef3b512 100644 (file)
@@ -35,7 +35,7 @@ class COMMON_EXPORT AliasManager : public SyncableObject
     SYNCABLE_OBJECT
 
 public:
     SYNCABLE_OBJECT
 
 public:
-    inline AliasManager(QObject *parent = 0) : SyncableObject(parent) { setAllowClientUpdates(true); }
+    inline AliasManager(QObject *parent = nullptr) : SyncableObject(parent) { setAllowClientUpdates(true); }
     AliasManager &operator=(const AliasManager &other);
 
     struct Alias {
     AliasManager &operator=(const AliasManager &other);
 
     struct Alias {
index 4ff0f60..b87400b 100644 (file)
@@ -24,7 +24,7 @@
 
 AuthHandler::AuthHandler(QObject *parent)
     : QObject(parent),
 
 AuthHandler::AuthHandler(QObject *parent)
     : QObject(parent),
-    _socket(0),
+    _socket(nullptr),
     _disconnectedSent(false)
 {
 
     _disconnectedSent(false)
 {
 
index 7fb9127..d5c5471 100644 (file)
@@ -33,7 +33,7 @@ class COMMON_EXPORT AuthHandler : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AuthHandler(QObject *parent = 0);
+    AuthHandler(QObject *parent = nullptr);
 
     QTcpSocket *socket() const;
 
 
     QTcpSocket *socket() const;
 
index e64f45a..ad7c806 100644 (file)
@@ -31,7 +31,7 @@ class COMMON_EXPORT BacklogManager : public SyncableObject
     SYNCABLE_OBJECT
 
 public:
     SYNCABLE_OBJECT
 
 public:
-    BacklogManager(QObject *parent = 0) : SyncableObject(parent) {}
+    BacklogManager(QObject *parent = nullptr) : SyncableObject(parent) {}
 
 public slots:
     virtual QVariantList requestBacklog(BufferId bufferId, MsgId first = -1, MsgId last = -1, int limit = -1, int additional = 0);
 
 public slots:
     virtual QVariantList requestBacklog(BufferId bufferId, MsgId first = -1, MsgId last = -1, int limit = -1, int additional = 0);
index 6ad7828..6e7e438 100644 (file)
@@ -88,14 +88,14 @@ void BasicHandler::handle(const QString &member, QGenericArgument val0,
             return;
         }
         else {
             return;
         }
         else {
-            void *param[] = { 0, Q_ARG(QString, member).data(), val0.data(), val1.data(), val2.data(), val3.data(), val4.data(),
+            void *param[] = { nullptr, Q_ARG(QString, member).data(), val0.data(), val1.data(), val2.data(), val3.data(), val4.data(),
                               val5.data(), val6.data(), val7.data(), val8.data(), val8.data() };
             qt_metacall(QMetaObject::InvokeMetaMethod, _defaultHandler, param);
             return;
         }
     }
 
                               val5.data(), val6.data(), val7.data(), val8.data(), val8.data() };
             qt_metacall(QMetaObject::InvokeMetaMethod, _defaultHandler, param);
             return;
         }
     }
 
-    void *param[] = { 0, val0.data(), val1.data(), val2.data(), val3.data(), val4.data(),
-                      val5.data(), val6.data(), val7.data(), val8.data(), val8.data(), 0 };
+    void *param[] = { nullptr, val0.data(), val1.data(), val2.data(), val3.data(), val4.data(),
+                      val5.data(), val6.data(), val7.data(), val8.data(), val8.data(), nullptr };
     qt_metacall(QMetaObject::InvokeMetaMethod, handlerHash()[handler], param);
 }
     qt_metacall(QMetaObject::InvokeMetaMethod, handlerHash()[handler], param);
 }
index e48d605..081e8df 100644 (file)
@@ -33,13 +33,13 @@ class COMMON_EXPORT BasicHandler : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    BasicHandler(QObject *parent = 0);
-    BasicHandler(const QString &methodPrefix, QObject *parent = 0);
+    BasicHandler(QObject *parent = nullptr);
+    BasicHandler(const QString &methodPrefix, QObject *parent = nullptr);
 
     QStringList providesHandlers();
 
 protected:
 
     QStringList providesHandlers();
 
 protected:
-    virtual void handle(const QString &member, QGenericArgument val0 = QGenericArgument(0),
+    virtual void handle(const QString &member, QGenericArgument val0 = QGenericArgument(nullptr),
         QGenericArgument val1 = QGenericArgument(), QGenericArgument val2 = QGenericArgument(),
         QGenericArgument val3 = QGenericArgument(), QGenericArgument val4 = QGenericArgument(),
         QGenericArgument val5 = QGenericArgument(), QGenericArgument val6 = QGenericArgument(),
         QGenericArgument val1 = QGenericArgument(), QGenericArgument val2 = QGenericArgument(),
         QGenericArgument val3 = QGenericArgument(), QGenericArgument val4 = QGenericArgument(),
         QGenericArgument val5 = QGenericArgument(), QGenericArgument val6 = QGenericArgument(),
index 03debf8..0390ddb 100644 (file)
@@ -44,8 +44,8 @@ class COMMON_EXPORT BufferViewConfig : public SyncableObject
     Q_PROPERTY(bool showSearch READ showSearch WRITE setShowSearch)
 
 public :
     Q_PROPERTY(bool showSearch READ showSearch WRITE setShowSearch)
 
 public :
-    BufferViewConfig(int bufferViewId, QObject *parent = 0);
-    BufferViewConfig(int bufferViewId, const QVariantMap &properties, QObject *parent = 0);
+    BufferViewConfig(int bufferViewId, QObject *parent = nullptr);
+    BufferViewConfig(int bufferViewId, const QVariantMap &properties, QObject *parent = nullptr);
 
 public slots:
     inline int bufferViewId() const { return _bufferViewId; }
 
 public slots:
     inline int bufferViewId() const { return _bufferViewId; }
index ba1b6c2..2287dda 100644 (file)
@@ -36,7 +36,7 @@ BufferViewConfig *BufferViewManager::bufferViewConfig(int bufferViewId) const
     if (_bufferViewConfigs.contains(bufferViewId))
         return _bufferViewConfigs[bufferViewId];
     else
     if (_bufferViewConfigs.contains(bufferViewId))
         return _bufferViewConfigs[bufferViewId];
     else
-        return 0;
+        return nullptr;
 }
 
 
 }
 
 
index 0a4f280..3c63396 100644 (file)
@@ -36,7 +36,7 @@ class COMMON_EXPORT BufferViewManager : public SyncableObject
     SYNCABLE_OBJECT
 
 public:
     SYNCABLE_OBJECT
 
 public:
-    BufferViewManager(SignalProxy *proxy, QObject *parent = 0);
+    BufferViewManager(SignalProxy *proxy, QObject *parent = nullptr);
 
     inline QList<BufferViewConfig *> bufferViewConfigs() const { return _bufferViewConfigs.values(); }
     BufferViewConfig *bufferViewConfig(int bufferViewId) const;
 
     inline QList<BufferViewConfig *> bufferViewConfigs() const { return _bufferViewConfigs.values(); }
     BufferViewConfig *bufferViewConfig(int bufferViewId) const;
index 84b8f7f..2b91beb 100644 (file)
@@ -30,8 +30,8 @@ Compressor::Compressor(QTcpSocket *socket, Compressor::CompressionLevel level, Q
     : QObject(parent),
     _socket(socket),
     _level(level),
     : QObject(parent),
     _socket(socket),
     _level(level),
-    _inflater(0),
-    _deflater(0)
+    _inflater(nullptr),
+    _deflater(nullptr)
 {
     connect(socket, SIGNAL(readyRead()), SLOT(readData()));
 
 {
     connect(socket, SIGNAL(readyRead()), SLOT(readData()));
 
index d80e41d..1360b67 100644 (file)
@@ -49,7 +49,7 @@ public:
         Flush
     };
 
         Flush
     };
 
-    Compressor(QTcpSocket *socket, CompressionLevel level, QObject *parent = 0);
+    Compressor(QTcpSocket *socket, CompressionLevel level, QObject *parent = nullptr);
     ~Compressor();
 
     CompressionLevel compressionLevel() const { return _level; }
     ~Compressor();
 
     CompressionLevel compressionLevel() const { return _level; }
index 5d0dc08..c4ca95f 100644 (file)
@@ -25,7 +25,7 @@ Event *CtcpEvent::create(EventManager::EventType type, QVariantMap &map, Network
     if (type == EventManager::CtcpEvent || type == EventManager::CtcpEventFlush)
         return new CtcpEvent(type, map, network);
 
     if (type == EventManager::CtcpEvent || type == EventManager::CtcpEventFlush)
         return new CtcpEvent(type, map, network);
 
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
index b933fa6..4d9a6de 100644 (file)
@@ -86,16 +86,16 @@ Event *Event::fromVariantMap(QVariantMap &map, Network *network)
     // sanity check if we have a valid enum value
     if (EventManager::enumName(inttype).isEmpty()) {
         qWarning() << "Received a serialized event with unknown type" << inttype;
     // sanity check if we have a valid enum value
     if (EventManager::enumName(inttype).isEmpty()) {
         qWarning() << "Received a serialized event with unknown type" << inttype;
-        return 0;
+        return nullptr;
     }
 
     EventManager::EventType type = static_cast<EventManager::EventType>(inttype);
     if (type == EventManager::Invalid || type == EventManager::GenericEvent)
     }
 
     EventManager::EventType type = static_cast<EventManager::EventType>(inttype);
     if (type == EventManager::Invalid || type == EventManager::GenericEvent)
-        return 0;
+        return nullptr;
 
     EventManager::EventType group = static_cast<EventManager::EventType>(type & EventManager::EventGroupMask);
 
 
     EventManager::EventType group = static_cast<EventManager::EventType>(type & EventManager::EventGroupMask);
 
-    Event *e = 0;
+    Event *e = nullptr;
 
     // we use static create() functions to keep group-specific special cases in the files they belong
     // e.g. IrcEventRawMessage
 
     // we use static create() functions to keep group-specific special cases in the files they belong
     // e.g. IrcEventRawMessage
@@ -121,7 +121,7 @@ Event *Event::fromVariantMap(QVariantMap &map, Network *network)
 
     if (!e) {
         qWarning() << "Can't create event of type" << type;
 
     if (!e) {
         qWarning() << "Can't create event of type" << type;
-        return 0;
+        return nullptr;
     }
 
     if (!map.isEmpty()) {
     }
 
     if (!map.isEmpty()) {
index f43f6ed..503babf 100644 (file)
@@ -301,7 +301,7 @@ void EventManager::dispatchEvent(Event *event)
         }
 
         // finally, deliverance!
         }
 
         // finally, deliverance!
-        void *param[] = { 0, Q_ARG(Event *, event).data() };
+        void *param[] = { nullptr, Q_ARG(Event *, event).data() };
         obj->qt_metacall(QMetaObject::InvokeMetaMethod, it->methodIndex, param);
     }
 
         obj->qt_metacall(QMetaObject::InvokeMetaMethod, it->methodIndex, param);
     }
 
index 246c58a..d4bd14a 100644 (file)
@@ -122,7 +122,7 @@ public :
         KeyEvent                    = 0x00060000
     };
 
         KeyEvent                    = 0x00060000
     };
 
-    EventManager(QObject *parent = 0);
+    EventManager(QObject *parent = nullptr);
 
     static EventType eventTypeByName(const QString &name);
     static EventType eventGroupByName(const QString &name);
 
     static EventType eventTypeByName(const QString &name);
     static EventType eventGroupByName(const QString &name);
@@ -160,7 +160,7 @@ private:
         int methodIndex;
         Priority priority;
 
         int methodIndex;
         Priority priority;
 
-        explicit Handler(QObject *obj = 0, int method = 0, Priority prio = NormalPriority)
+        explicit Handler(QObject *obj = nullptr, int method = 0, Priority prio = NormalPriority)
         {
             object = obj;
             methodIndex = method;
         {
             object = obj;
             methodIndex = method;
index 7cbd193..4345642 100644 (file)
@@ -57,8 +57,8 @@ class COMMON_EXPORT Identity : public SyncableObject
     Q_PROPERTY(QString quitReason READ quitReason WRITE setQuitReason)
 
 public :
     Q_PROPERTY(QString quitReason READ quitReason WRITE setQuitReason)
 
 public :
-    Identity(IdentityId id = 0, QObject *parent = 0);
-    Identity(const Identity &other, QObject *parent = 0);
+    Identity(IdentityId id = 0, QObject *parent = nullptr);
+    Identity(const Identity &other, QObject *parent = nullptr);
 
     void setToDefaults();
 
 
     void setToDefaults();
 
@@ -174,7 +174,7 @@ class COMMON_EXPORT CertManager : public SyncableObject
     Q_PROPERTY(QByteArray sslCert READ sslCertPem WRITE setSslCert)
 
 public :
     Q_PROPERTY(QByteArray sslCert READ sslCertPem WRITE setSslCert)
 
 public :
-    CertManager(IdentityId id, QObject *parent = 0) : SyncableObject(QString::number(id.toInt()), parent) {}
+    CertManager(IdentityId id, QObject *parent = nullptr) : SyncableObject(QString::number(id.toInt()), parent) {}
 
     virtual const QSslKey &sslKey() const = 0;
     inline QByteArray sslKeyPem() const { return sslKey().toPem(); }
 
     virtual const QSslKey &sslKey() const = 0;
     inline QByteArray sslKeyPem() const { return sslKey().toPem(); }
index 3f73eb6..a4fa3c3 100644 (file)
@@ -36,7 +36,7 @@ class COMMON_EXPORT IgnoreListManager : public SyncableObject
     SYNCABLE_OBJECT
 
 public:
     SYNCABLE_OBJECT
 
 public:
-    inline IgnoreListManager(QObject *parent = 0) : SyncableObject(parent) { setAllowClientUpdates(true); }
+    inline IgnoreListManager(QObject *parent = nullptr) : SyncableObject(parent) { setAllowClientUpdates(true); }
     IgnoreListManager &operator=(const IgnoreListManager &other);
 
     enum IgnoreType {
     IgnoreListManager &operator=(const IgnoreListManager &other);
 
     enum IgnoreType {
index 92a4944..dd47f85 100644 (file)
@@ -37,8 +37,8 @@ IrcChannel::IrcChannel(const QString &channelname, Network *network)
     _topic(QString()),
     _encrypted(false),
     _network(network),
     _topic(QString()),
     _encrypted(false),
     _network(network),
-    _codecForEncoding(0),
-    _codecForDecoding(0)
+    _codecForEncoding(nullptr),
+    _codecForDecoding(nullptr)
 {
     setObjectName(QString::number(network->networkId().toInt()) + "/" +  channelname);
 }
 {
     setObjectName(QString::number(network->networkId().toInt()) + "/" +  channelname);
 }
@@ -54,7 +54,7 @@ IrcChannel::~IrcChannel()
 // ====================
 bool IrcChannel::isKnownUser(IrcUser *ircuser) const
 {
 // ====================
 bool IrcChannel::isKnownUser(IrcUser *ircuser) const
 {
-    if (ircuser == 0) {
+    if (ircuser == nullptr) {
         qWarning() << "Channel" << name() << "received IrcUser Nullpointer!";
         return false;
     }
         qWarning() << "Channel" << name() << "received IrcUser Nullpointer!";
         return false;
     }
@@ -241,7 +241,7 @@ void IrcChannel::part(IrcUser *ircuser)
         ircuser->partChannel(this);
         // If you wonder why there is no counterpart to ircUserParted:
         // the joins are propagted by the ircuser. The signal ircUserParted is only for convenience
         ircuser->partChannel(this);
         // If you wonder why there is no counterpart to ircUserParted:
         // the joins are propagted by the ircuser. The signal ircUserParted is only for convenience
-        disconnect(ircuser, 0, this, 0);
+        disconnect(ircuser, nullptr, this, nullptr);
         emit ircUserParted(ircuser);
 
         if (network()->isMe(ircuser) || _userModes.isEmpty()) {
         emit ircUserParted(ircuser);
 
         if (network()->isMe(ircuser) || _userModes.isEmpty()) {
@@ -250,7 +250,7 @@ void IrcChannel::part(IrcUser *ircuser)
             QList<IrcUser *> users = _userModes.keys();
             _userModes.clear();
             foreach(IrcUser *user, users) {
             QList<IrcUser *> users = _userModes.keys();
             _userModes.clear();
             foreach(IrcUser *user, users) {
-                disconnect(user, 0, this, 0);
+                disconnect(user, nullptr, this, nullptr);
                 user->partChannel(this);
             }
             emit parted();
                 user->partChannel(this);
             }
             emit parted();
index dcff52a..797f453 100644 (file)
@@ -26,7 +26,7 @@ Event *IrcEvent::create(EventManager::EventType type, QVariantMap &map, Network
         return new IrcEventNumeric(type, map, network);
 
     if ((type & EventManager::EventGroupMask) != EventManager::IrcEvent)
         return new IrcEventNumeric(type, map, network);
 
     if ((type & EventManager::EventGroupMask) != EventManager::IrcEvent)
-        return 0;
+        return nullptr;
 
     switch (type) {
     case EventManager::IrcEventRawPrivmsg:
 
     switch (type) {
     case EventManager::IrcEventRawPrivmsg:
index 00128a3..b5d72df 100644 (file)
@@ -39,7 +39,7 @@ class COMMON_EXPORT IrcListHelper : public SyncableObject
     SYNCABLE_OBJECT
 
 public:
     SYNCABLE_OBJECT
 
 public:
-    inline IrcListHelper(QObject *parent = 0) : SyncableObject(parent) { setInitialized(); };
+    inline IrcListHelper(QObject *parent = nullptr) : SyncableObject(parent) { setInitialized(); };
 
     struct ChannelDescription {
         QString channelName;
 
     struct ChannelDescription {
         QString channelName;
index 18a066b..1683700 100644 (file)
@@ -43,8 +43,8 @@ IrcUser::IrcUser(const QString &hostmask, Network *network) : SyncableObject(net
     _whoisServiceReply(),
     _encrypted(false),
     _network(network),
     _whoisServiceReply(),
     _encrypted(false),
     _network(network),
-    _codecForEncoding(0),
-    _codecForDecoding(0)
+    _codecForEncoding(nullptr),
+    _codecForDecoding(nullptr)
 {
     updateObjectName();
     _lastAwayMessageTime.setTimeSpec(Qt::UTC);
 {
     updateObjectName();
     _lastAwayMessageTime.setTimeSpec(Qt::UTC);
@@ -328,7 +328,7 @@ void IrcUser::partChannel(IrcChannel *channel)
 {
     if (_channels.contains(channel)) {
         _channels.remove(channel);
 {
     if (_channels.contains(channel)) {
         _channels.remove(channel);
-        disconnect(channel, 0, this, 0);
+        disconnect(channel, nullptr, this, nullptr);
         channel->part(this);
         QString channelName = channel->name();
         SYNC_OTHER(partChannel, ARG(channelName))
         channel->part(this);
         QString channelName = channel->name();
         SYNC_OTHER(partChannel, ARG(channelName))
@@ -341,7 +341,7 @@ void IrcUser::partChannel(IrcChannel *channel)
 void IrcUser::partChannel(const QString &channelname)
 {
     IrcChannel *channel = network()->ircChannel(channelname);
 void IrcUser::partChannel(const QString &channelname)
 {
     IrcChannel *channel = network()->ircChannel(channelname);
-    if (channel == 0) {
+    if (channel == nullptr) {
         qWarning() << "IrcUser::partChannel(): received part for unknown Channel" << channelname;
     }
     else {
         qWarning() << "IrcUser::partChannel(): received part for unknown Channel" << channelname;
     }
     else {
@@ -355,7 +355,7 @@ void IrcUser::quit()
     QList<IrcChannel *> channels = _channels.toList();
     _channels.clear();
     foreach(IrcChannel *channel, channels) {
     QList<IrcChannel *> channels = _channels.toList();
     _channels.clear();
     foreach(IrcChannel *channel, channels) {
-        disconnect(channel, 0, this, 0);
+        disconnect(channel, nullptr, this, nullptr);
         channel->part(this);
     }
     network()->removeIrcUser(this);
         channel->part(this);
     }
     network()->removeIrcUser(this);
index 9001c47..c9bedd3 100644 (file)
@@ -62,7 +62,7 @@ void Quassel::logBacktrace(const QString &filename)
 
         QString funcName;
         if (info.dli_sname) {
 
         QString funcName;
         if (info.dli_sname) {
-            char *func = abi::__cxa_demangle(info.dli_sname, 0, 0, 0);
+            char *func = abi::__cxa_demangle(info.dli_sname, nullptr, nullptr, nullptr);
             if (func) {
                 funcName = QString(func);
                 free(func);
             if (func) {
                 funcName = QString(func);
                 free(func);
index 1befbbd..01b4049 100644 (file)
@@ -25,7 +25,7 @@ Event *MessageEvent::create(EventManager::EventType type, QVariantMap &map, Netw
     if (type == EventManager::MessageEvent)
         return new MessageEvent(type, map, network);
 
     if (type == EventManager::MessageEvent)
         return new MessageEvent(type, map, network);
 
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
index d7c0980..f76cd30 100644 (file)
@@ -25,9 +25,9 @@
 #include "network.h"
 #include "peer.h"
 
 #include "network.h"
 #include "peer.h"
 
-QTextCodec *Network::_defaultCodecForServer = 0;
-QTextCodec *Network::_defaultCodecForEncoding = 0;
-QTextCodec *Network::_defaultCodecForDecoding = 0;
+QTextCodec *Network::_defaultCodecForServer = nullptr;
+QTextCodec *Network::_defaultCodecForEncoding = nullptr;
+QTextCodec *Network::_defaultCodecForDecoding = nullptr;
 
 // ====================
 //  Public:
 
 // ====================
 //  Public:
@@ -35,7 +35,7 @@ QTextCodec *Network::_defaultCodecForDecoding = 0;
 
 Network::Network(const NetworkId &networkid, QObject *parent)
     : SyncableObject(parent),
 
 Network::Network(const NetworkId &networkid, QObject *parent)
     : SyncableObject(parent),
-    _proxy(0),
+    _proxy(nullptr),
     _networkId(networkid),
     _identity(0),
     _myNick(QString()),
     _networkId(networkid),
     _identity(0),
     _myNick(QString()),
@@ -57,9 +57,9 @@ Network::Network(const NetworkId &networkid, QObject *parent)
     _messageRateBurstSize(5),
     _messageRateDelay(2200),
     _unlimitedMessageRate(false),
     _messageRateBurstSize(5),
     _messageRateDelay(2200),
     _unlimitedMessageRate(false),
-    _codecForServer(0),
-    _codecForEncoding(0),
-    _codecForDecoding(0),
+    _codecForServer(nullptr),
+    _codecForEncoding(nullptr),
+    _codecForDecoding(nullptr),
     _autoAwayActive(false)
 {
     setObjectName(QString::number(networkid.toInt()));
     _autoAwayActive(false)
 {
     setObjectName(QString::number(networkid.toInt()));
@@ -340,7 +340,7 @@ IrcUser *Network::ircUser(QString nickname) const
     if (_ircUsers.contains(nickname))
         return _ircUsers[nickname];
     else
     if (_ircUsers.contains(nickname))
         return _ircUsers[nickname];
     else
-        return 0;
+        return nullptr;
 }
 
 
 }
 
 
@@ -351,7 +351,7 @@ void Network::removeIrcUser(IrcUser *ircuser)
         return;
 
     _ircUsers.remove(nick);
         return;
 
     _ircUsers.remove(nick);
-    disconnect(ircuser, 0, this, 0);
+    disconnect(ircuser, nullptr, this, nullptr);
     ircuser->deleteLater();
 }
 
     ircuser->deleteLater();
 }
 
@@ -363,7 +363,7 @@ void Network::removeIrcChannel(IrcChannel *channel)
         return;
 
     _ircChannels.remove(chanName);
         return;
 
     _ircChannels.remove(chanName);
-    disconnect(channel, 0, this, 0);
+    disconnect(channel, nullptr, this, nullptr);
     channel->deleteLater();
 }
 
     channel->deleteLater();
 }
 
@@ -410,7 +410,7 @@ IrcChannel *Network::ircChannel(QString channelname) const
     if (_ircChannels.contains(channelname))
         return _ircChannels[channelname];
     else
     if (_ircChannels.contains(channelname))
         return _ircChannels[channelname];
     else
-        return 0;
+        return nullptr;
 }
 
 
 }
 
 
index 410931f..104abe7 100644 (file)
@@ -145,7 +145,7 @@ public :
     };
     typedef QList<Server> ServerList;
 
     };
     typedef QList<Server> ServerList;
 
-    Network(const NetworkId &networkid, QObject *parent = 0);
+    Network(const NetworkId &networkid, QObject *parent = nullptr);
     ~Network();
 
     inline NetworkId networkId() const { return _networkId; }
     ~Network();
 
     inline NetworkId networkId() const { return _networkId; }
index 85d1f56..83574f9 100644 (file)
@@ -39,7 +39,7 @@ class COMMON_EXPORT NetworkConfig : public SyncableObject
     Q_PROPERTY(bool standardCtcp READ standardCtcp WRITE setStandardCtcp)
 
 public :
     Q_PROPERTY(bool standardCtcp READ standardCtcp WRITE setStandardCtcp)
 
 public :
-    NetworkConfig(const QString &objectName = "GlobalNetworkConfig", QObject *parent = 0);
+    NetworkConfig(const QString &objectName = "GlobalNetworkConfig", QObject *parent = nullptr);
 
 public slots:
     inline bool pingTimeoutEnabled() const { return _pingTimeoutEnabled; }
 
 public slots:
     inline bool pingTimeoutEnabled() const { return _pingTimeoutEnabled; }
index 394bfc9..eb8d76b 100644 (file)
@@ -39,7 +39,7 @@ Event *NetworkEvent::create(EventManager::EventType type, QVariantMap &map, Netw
         return new NetworkSplitEvent(type, map, network);
 
     default:
         return new NetworkSplitEvent(type, map, network);
 
     default:
-        return 0;
+        return nullptr;
     }
 }
 
     }
 }
 
index 345889a..62e7cc4 100644 (file)
@@ -36,7 +36,7 @@ class COMMON_EXPORT Peer : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    explicit Peer(AuthHandler *authHandler, QObject *parent = 0);
+    explicit Peer(AuthHandler *authHandler, QObject *parent = nullptr);
 
     virtual Protocol::Type protocol() const = 0;
     virtual QString description() const = 0;
 
     virtual Protocol::Type protocol() const = 0;
     virtual QString description() const = 0;
index f78cf0c..ec7426e 100644 (file)
@@ -43,7 +43,7 @@ public:
 
     static ProtoList supportedProtocols();
 
 
     static ProtoList supportedProtocols();
 
-    static RemotePeer *createPeer(const ProtoDescriptor &protocol, AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = 0);
-    static RemotePeer *createPeer(const ProtoList &protocols, AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = 0);
+    static RemotePeer *createPeer(const ProtoDescriptor &protocol, AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = nullptr);
+    static RemotePeer *createPeer(const ProtoList &protocols, AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = nullptr);
 
 };
 
 };
index 98c2660..7e5f5d8 100644 (file)
@@ -39,7 +39,7 @@ public:
         HeartBeatReply
     };
 
         HeartBeatReply
     };
 
-    DataStreamPeer(AuthHandler *authHandler, QTcpSocket *socket, quint16 features, Compressor::CompressionLevel level, QObject *parent = 0);
+    DataStreamPeer(AuthHandler *authHandler, QTcpSocket *socket, quint16 features, Compressor::CompressionLevel level, QObject *parent = nullptr);
 
     Protocol::Type protocol() const { return Protocol::DataStreamProtocol; }
     QString protocolName() const { return "the DataStream protocol"; }
 
     Protocol::Type protocol() const { return Protocol::DataStreamProtocol; }
     QString protocolName() const { return "the DataStream protocol"; }
index 803b2b3..f9e0954 100644 (file)
@@ -37,7 +37,7 @@ public:
         HeartBeatReply
     };
 
         HeartBeatReply
     };
 
-    LegacyPeer(AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = 0);
+    LegacyPeer(AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = nullptr);
 
     Protocol::Type protocol() const { return Protocol::LegacyProtocol; }
     QString protocolName() const { return "the legacy protocol"; }
 
     Protocol::Type protocol() const { return Protocol::LegacyProtocol; }
     QString protocolName() const { return "the legacy protocol"; }
index 36c56ba..31783dc 100644 (file)
@@ -39,7 +39,7 @@ RemotePeer::RemotePeer(::AuthHandler *authHandler, QTcpSocket *socket, Compresso
     : Peer(authHandler, parent),
     _socket(socket),
     _compressor(new Compressor(socket, level, this)),
     : Peer(authHandler, parent),
     _socket(socket),
     _compressor(new Compressor(socket, level, this)),
-    _signalProxy(0),
+    _signalProxy(nullptr),
     _heartBeatTimer(new QTimer(this)),
     _heartBeatCount(0),
     _lag(0),
     _heartBeatTimer(new QTimer(this)),
     _heartBeatCount(0),
     _lag(0),
@@ -121,8 +121,8 @@ void RemotePeer::setSignalProxy(::SignalProxy *proxy)
 
     if (!proxy) {
         _heartBeatTimer->stop();
 
     if (!proxy) {
         _heartBeatTimer->stop();
-        disconnect(signalProxy(), 0, this, 0);
-        _signalProxy = 0;
+        disconnect(signalProxy(), nullptr, this, nullptr);
+        _signalProxy = nullptr;
         if (isOpen())
             close();
     }
         if (isOpen())
             close();
     }
index d29236c..e9d85f5 100644 (file)
@@ -42,7 +42,7 @@ public:
     using Peer::handle;
     using Peer::dispatch;
 
     using Peer::handle;
     using Peer::dispatch;
 
-    RemotePeer(AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = 0);
+    RemotePeer(AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = nullptr);
 
     void setSignalProxy(SignalProxy *proxy);
 
 
     void setSignalProxy(SignalProxy *proxy);
 
index 721f32a..52432eb 100644 (file)
@@ -70,7 +70,7 @@ private:
         int signalId;
         QByteArray signature;
         Signal(QObject *sender, int sigId, const QByteArray &signature) : sender(sender), signalId(sigId), signature(signature) {}
         int signalId;
         QByteArray signature;
         Signal(QObject *sender, int sigId, const QByteArray &signature) : sender(sender), signalId(sigId), signature(signature) {}
-        Signal() : sender(0), signalId(-1) {}
+        Signal() : sender(nullptr), signalId(-1) {}
     };
 
     SignalProxy *_proxy;
     };
 
     SignalProxy *_proxy;
@@ -340,8 +340,8 @@ void SignalProxy::removePeer(Peer *peer)
         return;
     }
 
         return;
     }
 
-    disconnect(peer, 0, this, 0);
-    peer->setSignalProxy(0);
+    disconnect(peer, nullptr, this, nullptr);
+    peer->setSignalProxy(nullptr);
 
     _peerMap.remove(peer->id());
     emit peerRemoved(peer);
 
     _peerMap.remove(peer->id());
     emit peerRemoved(peer);
@@ -398,7 +398,7 @@ SignalProxy::ExtendedMetaObject *SignalProxy::extendedMetaObject(const QMetaObje
     if (_extendedMetaObjects.contains(meta))
         return _extendedMetaObjects[meta];
     else
     if (_extendedMetaObjects.contains(meta))
         return _extendedMetaObjects[meta];
     else
-        return 0;
+        return nullptr;
 }
 
 
 }
 
 
@@ -662,9 +662,9 @@ bool SignalProxy::invokeSlot(QObject *receiver, int methodId, const QVariantList
         return false;
     }
 
         return false;
     }
 
-    void *_a[] = { 0,           // return type...
-                   0, 0, 0, 0, 0, // and 10 args - that's the max size qt can handle with signals and slots
-                   0, 0, 0, 0, 0 };
+    void *_a[] = { nullptr,           // return type...
+                   nullptr, nullptr, nullptr, nullptr, nullptr, // and 10 args - that's the max size qt can handle with signals and slots
+                   nullptr, nullptr, nullptr, nullptr, nullptr };
 
     // check for argument compatibility and build params array
     for (int i = 0; i < numArgs; i++) {
 
     // check for argument compatibility and build params array
     for (int i = 0; i < numArgs; i++) {
index d4e920e..38bc00f 100644 (file)
@@ -177,8 +177,8 @@ private:
     template<class T>
     void handle(Peer *, T) { Q_ASSERT(0); }
 
     template<class T>
     void handle(Peer *, T) { Q_ASSERT(0); }
 
-    bool invokeSlot(QObject *receiver, int methodId, const QVariantList &params, QVariant &returnValue, Peer *peer = 0);
-    bool invokeSlot(QObject *receiver, int methodId, const QVariantList &params = QVariantList(), Peer *peer = 0);
+    bool invokeSlot(QObject *receiver, int methodId, const QVariantList &params, QVariant &returnValue, Peer *peer = nullptr);
+    bool invokeSlot(QObject *receiver, int methodId, const QVariantList &params = QVariantList(), Peer *peer = nullptr);
 
     void requestInit(SyncableObject *obj);
     QVariantMap initData(SyncableObject *obj) const;
 
     void requestInit(SyncableObject *obj);
     QVariantMap initData(SyncableObject *obj) const;
index 9394659..2c42ea4 100644 (file)
@@ -117,7 +117,7 @@ QVariantMap SyncableObject::toVariantMap()
             continue;
         }
 
             continue;
         }
 
-        QVariant value(variantType, (const void *)0);
+        QVariant value(variantType, (const void *)nullptr);
         QGenericReturnArgument genericvalue = QGenericReturnArgument(method.typeName(), value.data());
         QMetaObject::invokeMethod(this, methodname.toLatin1(), genericvalue);
 
         QGenericReturnArgument genericvalue = QGenericReturnArgument(method.typeName(), value.data());
         QMetaObject::invokeMethod(this, methodname.toLatin1(), genericvalue);
 
index 91e1e70..7b08043 100644 (file)
@@ -57,9 +57,9 @@ class COMMON_EXPORT SyncableObject : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SyncableObject(QObject *parent = 0);
-    SyncableObject(const QString &objectName, QObject *parent = 0);
-    SyncableObject(const SyncableObject &other, QObject *parent = 0);
+    SyncableObject(QObject *parent = nullptr);
+    SyncableObject(const QString &objectName, QObject *parent = nullptr);
+    SyncableObject(const SyncableObject &other, QObject *parent = nullptr);
     ~SyncableObject() override;
 
     //! Stores the object's state into a QVariantMap.
     ~SyncableObject() override;
 
     //! Stores the object's state into a QVariantMap.
index aa9da69..506d883 100644 (file)
@@ -61,8 +61,8 @@ public:
     };
     Q_ENUMS(Direction)
 
     };
     Q_ENUMS(Direction)
 
-    Transfer(const QUuid &uuid, QObject *parent = 0); // for creating a syncable object client-side
-    Transfer(Direction direction, const QString &nick, const QString &fileName, const QHostAddress &address, quint16 port, quint64 size = 0, QObject *parent = 0);
+    Transfer(const QUuid &uuid, QObject *parent = nullptr); // for creating a syncable object client-side
+    Transfer(Direction direction, const QString &nick, const QString &fileName, const QHostAddress &address, quint16 port, quint64 size = 0, QObject *parent = nullptr);
 
     QUuid uuid() const;
     Status status() const;
 
     QUuid uuid() const;
     Status status() const;
@@ -97,8 +97,8 @@ signals:
 
     void error(const QString &errorString);
 
 
     void error(const QString &errorString);
 
-    void accepted(PeerPtr peer = 0) const;
-    void rejected(PeerPtr peer = 0) const;
+    void accepted(PeerPtr peer = nullptr) const;
+    void rejected(PeerPtr peer = nullptr) const;
 
 protected slots:
     void setStatus(Transfer::Status status);
 
 protected slots:
     void setStatus(Transfer::Status status);
index ba73f4d..63d724c 100644 (file)
@@ -46,7 +46,7 @@ COMMON_EXPORT QString secondsToString(int timeInSeconds);
  *  \param codec The text codec we use if the input is not utf8
  *  \return The decoded string.
  */
  *  \param codec The text codec we use if the input is not utf8
  *  \return The decoded string.
  */
-COMMON_EXPORT QString decodeString(const QByteArray &input, QTextCodec *codec = 0);
+COMMON_EXPORT QString decodeString(const QByteArray &input, QTextCodec *codec = nullptr);
 
 COMMON_EXPORT uint editingDistance(const QString &s1, const QString &s2);
 
 
 COMMON_EXPORT uint editingDistance(const QString &s1, const QString &s2);
 
index 149aabb..7f5d115 100644 (file)
@@ -43,7 +43,7 @@ AbstractSqlStorage::~AbstractSqlStorage()
     QHash<QThread *, Connection *>::iterator conIter;
     for (conIter = _connectionPool.begin(); conIter != _connectionPool.end(); ++conIter) {
         QSqlDatabase::removeDatabase(conIter.value()->name());
     QHash<QThread *, Connection *>::iterator conIter;
     for (conIter = _connectionPool.begin(); conIter != _connectionPool.end(); ++conIter) {
         QSqlDatabase::removeDatabase(conIter.value()->name());
-        disconnect(conIter.value(), 0, this, 0);
+        disconnect(conIter.value(), nullptr, this, nullptr);
     }
 }
 
     }
 }
 
@@ -402,7 +402,7 @@ AbstractSqlStorage::Connection::~Connection()
 //  AbstractSqlMigrator
 // ========================================
 AbstractSqlMigrator::AbstractSqlMigrator()
 //  AbstractSqlMigrator
 // ========================================
 AbstractSqlMigrator::AbstractSqlMigrator()
-    : _query(0)
+    : _query(nullptr)
 {
 }
 
 {
 }
 
@@ -418,7 +418,7 @@ void AbstractSqlMigrator::newQuery(const QString &query, QSqlDatabase db)
 void AbstractSqlMigrator::resetQuery()
 {
     delete _query;
 void AbstractSqlMigrator::resetQuery()
 {
     delete _query;
-    _query = 0;
+    _query = nullptr;
 }
 
 
 }
 
 
@@ -490,7 +490,7 @@ void AbstractSqlMigrator::dumpStatus()
 // ========================================
 AbstractSqlMigrationReader::AbstractSqlMigrationReader()
     : AbstractSqlMigrator(),
 // ========================================
 AbstractSqlMigrationReader::AbstractSqlMigrationReader()
     : AbstractSqlMigrator(),
-    _writer(0)
+    _writer(nullptr)
 {
 }
 
 {
 }
 
@@ -574,7 +574,7 @@ void AbstractSqlMigrationReader::abortMigration(const QString &errorMsg)
 
     rollback();
     _writer->rollback();
 
     rollback();
     _writer->rollback();
-    _writer = 0;
+    _writer = nullptr;
 }
 
 
 }
 
 
@@ -585,10 +585,10 @@ bool AbstractSqlMigrationReader::finalizeMigration()
 
     commit();
     if (!_writer->commit()) {
 
     commit();
     if (!_writer->commit()) {
-        _writer = 0;
+        _writer = nullptr;
         return false;
     }
         return false;
     }
-    _writer = 0;
+    _writer = nullptr;
     return true;
 }
 
     return true;
 }
 
index ffdd89c..9c371ff 100644 (file)
@@ -36,7 +36,7 @@ class AbstractSqlStorage : public Storage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AbstractSqlStorage(QObject *parent = 0);
+    AbstractSqlStorage(QObject *parent = nullptr);
     virtual ~AbstractSqlStorage();
 
     virtual std::unique_ptr<AbstractSqlMigrationReader> createMigrationReader() { return {}; }
     virtual ~AbstractSqlStorage();
 
     virtual std::unique_ptr<AbstractSqlMigrationReader> createMigrationReader() { return {}; }
@@ -141,7 +141,7 @@ class AbstractSqlStorage::Connection : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    Connection(const QString &name, QObject *parent = 0);
+    Connection(const QString &name, QObject *parent = nullptr);
     ~Connection();
 
     inline QLatin1String name() const { return QLatin1String(_name); }
     ~Connection();
 
     inline QLatin1String name() const { return QLatin1String(_name); }
index 339cbd3..6e77294 100644 (file)
@@ -783,7 +783,7 @@ void Core::setupClientSession(RemotePeer *peer, UserId uid)
     Q_ASSERT(handler);
 
     // From now on everything is handled by the client session
     Q_ASSERT(handler);
 
     // From now on everything is handled by the client session
-    disconnect(handler, 0, this, 0);
+    disconnect(handler, nullptr, this, nullptr);
     _connectingClients.remove(handler);
     handler->deleteLater();
 
     _connectingClients.remove(handler);
     handler->deleteLater();
 
index 240954e..a4baf5f 100644 (file)
@@ -31,7 +31,7 @@ using namespace Protocol;
 
 CoreAuthHandler::CoreAuthHandler(QTcpSocket *socket, QObject *parent)
     : AuthHandler(parent),
 
 CoreAuthHandler::CoreAuthHandler(QTcpSocket *socket, QObject *parent)
     : AuthHandler(parent),
-    _peer(0),
+    _peer(nullptr),
     _magicReceived(false),
     _legacy(false),
     _clientRegistered(false),
     _magicReceived(false),
     _legacy(false),
     _clientRegistered(false),
@@ -256,9 +256,9 @@ void CoreAuthHandler::handle(const Login &msg)
         quInfo() << qPrintable(tr("Client supports unknown features: %1").arg(clientFeatures.unknownFeatures().join(", ")));
     }
 
         quInfo() << qPrintable(tr("Client supports unknown features: %1").arg(clientFeatures.unknownFeatures().join(", ")));
     }
 
-    disconnect(socket(), 0, this, 0);
-    disconnect(_peer, 0, this, 0);
-    _peer->setParent(0); // Core needs to take care of this one now!
+    disconnect(socket(), nullptr, this, nullptr);
+    disconnect(_peer, nullptr, this, nullptr);
+    _peer->setParent(nullptr); // Core needs to take care of this one now!
 
     socket()->flush(); // Make sure all data is sent before handing over the peer (and socket) to the session thread (bug 682)
     emit handshakeComplete(_peer, uid);
 
     socket()->flush(); // Make sure all data is sent before handing over the peer (and socket) to the session thread (bug 682)
     emit handshakeComplete(_peer, uid);
index 003d704..1b4e6b9 100644 (file)
@@ -31,7 +31,7 @@ class CoreAuthHandler : public AuthHandler
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreAuthHandler(QTcpSocket *socket, QObject *parent = 0);
+    CoreAuthHandler(QTcpSocket *socket, QObject *parent = nullptr);
 
 signals:
     void handshakeComplete(RemotePeer *peer, UserId uid);
 
 signals:
     void handshakeComplete(RemotePeer *peer, UserId uid);
index 801ca78..356660b 100644 (file)
@@ -29,7 +29,7 @@ class CoreBacklogManager : public BacklogManager
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreBacklogManager(CoreSession *coreSession = 0);
+    CoreBacklogManager(CoreSession *coreSession = nullptr);
 
     CoreSession *coreSession() { return _coreSession; }
 
 
     CoreSession *coreSession() { return _coreSession; }
 
index acd05c1..39e41cb 100644 (file)
@@ -36,7 +36,7 @@ class CoreBasicHandler : public BasicHandler
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreBasicHandler(CoreNetwork *parent = 0);
+    CoreBasicHandler(CoreNetwork *parent = nullptr);
 
     QString serverDecode(const QByteArray &string);
     QStringList serverDecode(const QList<QByteArray> &stringlist);
 
     QString serverDecode(const QByteArray &string);
     QStringList serverDecode(const QList<QByteArray> &stringlist);
index 6723951..d41205a 100644 (file)
@@ -27,8 +27,8 @@ class CoreBufferViewConfig : public BufferViewConfig
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreBufferViewConfig(int bufferViewId, QObject *parent = 0);
-    CoreBufferViewConfig(int bufferViewId, const QVariantMap &properties, QObject *parent = 0);
+    CoreBufferViewConfig(int bufferViewId, QObject *parent = nullptr);
+    CoreBufferViewConfig(int bufferViewId, const QVariantMap &properties, QObject *parent = nullptr);
 
 public slots:
     virtual inline void requestSetBufferViewName(const QString &bufferViewName) { setBufferViewName(bufferViewName); }
 
 public slots:
     virtual inline void requestSetBufferViewName(const QString &bufferViewName) { setBufferViewName(bufferViewName); }
index f1a73db..7615755 100644 (file)
@@ -32,7 +32,7 @@ CoreBufferViewManager::CoreBufferViewManager(SignalProxy *proxy, CoreSession *pa
     QVariantMap views = Core::getUserSetting(_coreSession->user(), "BufferViews").toMap();
     QVariantMap::iterator iter = views.begin();
     QVariantMap::iterator iterEnd = views.end();
     QVariantMap views = Core::getUserSetting(_coreSession->user(), "BufferViews").toMap();
     QVariantMap::iterator iter = views.begin();
     QVariantMap::iterator iterEnd = views.end();
-    CoreBufferViewConfig *config = 0;
+    CoreBufferViewConfig *config = nullptr;
     while (iter != iterEnd) {
         config = new CoreBufferViewConfig(iter.key().toInt(), iter.value().toMap(), this);
         addBufferViewConfig(config);
     while (iter != iterEnd) {
         config = new CoreBufferViewConfig(iter.key().toInt(), iter.value().toMap(), this);
         addBufferViewConfig(config);
index 698cd4c..9fbc24e 100644 (file)
@@ -67,9 +67,9 @@ class CoreIdentity : public Identity
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreIdentity(IdentityId id, QObject *parent = 0);
-    CoreIdentity(const Identity &other, QObject *parent = 0);
-    CoreIdentity(const CoreIdentity &other, QObject *parent = 0);
+    CoreIdentity(IdentityId id, QObject *parent = nullptr);
+    CoreIdentity(const Identity &other, QObject *parent = nullptr);
+    CoreIdentity(const CoreIdentity &other, QObject *parent = nullptr);
 
     void synchronize(SignalProxy *proxy);
 
 
     void synchronize(SignalProxy *proxy);
 
index e6a48c9..8bce68f 100644 (file)
@@ -26,7 +26,7 @@ CoreIrcChannel::CoreIrcChannel(const QString &channelname, Network *network)
     _receivedWelcomeMsg(false)
 {
 #ifdef HAVE_QCA2
     _receivedWelcomeMsg(false)
 {
 #ifdef HAVE_QCA2
-    _cipher = 0;
+    _cipher = nullptr;
 
     // Get the cipher key from CoreNetwork if present
     CoreNetwork *coreNetwork = qobject_cast<CoreNetwork *>(network);
 
     // Get the cipher key from CoreNetwork if present
     CoreNetwork *coreNetwork = qobject_cast<CoreNetwork *>(network);
index 4dd946e..b9dd830 100644 (file)
@@ -24,7 +24,7 @@
 CoreIrcUser::CoreIrcUser(const QString &hostmask, Network *network) : IrcUser(hostmask, network)
 {
 #ifdef HAVE_QCA2
 CoreIrcUser::CoreIrcUser(const QString &hostmask, Network *network) : IrcUser(hostmask, network)
 {
 #ifdef HAVE_QCA2
-    _cipher = 0;
+    _cipher = nullptr;
 
     // Get the cipher key from CoreNetwork if present
     CoreNetwork *coreNetwork = qobject_cast<CoreNetwork *>(network);
 
     // Get the cipher key from CoreNetwork if present
     CoreNetwork *coreNetwork = qobject_cast<CoreNetwork *>(network);
index 4b32f2c..143760f 100644 (file)
@@ -438,10 +438,10 @@ void CoreNetwork::removeChannelKey(const QString &channel)
 Cipher *CoreNetwork::cipher(const QString &target)
 {
     if (target.isEmpty())
 Cipher *CoreNetwork::cipher(const QString &target)
 {
     if (target.isEmpty())
-        return 0;
+        return nullptr;
 
     if (!Cipher::neededFeaturesAvailable())
 
     if (!Cipher::neededFeaturesAvailable())
-        return 0;
+        return nullptr;
 
     CoreIrcChannel *channel = qobject_cast<CoreIrcChannel *>(ircChannel(target));
     if (channel) {
 
     CoreIrcChannel *channel = qobject_cast<CoreIrcChannel *>(ircChannel(target));
     if (channel) {
@@ -453,7 +453,7 @@ Cipher *CoreNetwork::cipher(const QString &target)
     } else if (!isChannelName(target)) {
         return qobject_cast<CoreIrcUser*>(newIrcUser(target))->cipher();
     }
     } else if (!isChannelName(target)) {
         return qobject_cast<CoreIrcUser*>(newIrcUser(target))->cipher();
     }
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
index c38c3d6..faec85d 100644 (file)
@@ -188,14 +188,14 @@ void CoreSession::onNetworkDisconnected(NetworkId networkId)
 CoreNetwork *CoreSession::network(NetworkId id) const
 {
     if (_networks.contains(id)) return _networks[id];
 CoreNetwork *CoreSession::network(NetworkId id) const
 {
     if (_networks.contains(id)) return _networks[id];
-    return 0;
+    return nullptr;
 }
 
 
 CoreIdentity *CoreSession::identity(IdentityId id) const
 {
     if (_identities.contains(id)) return _identities[id];
 }
 
 
 CoreIdentity *CoreSession::identity(IdentityId id) const
 {
     if (_identities.contains(id)) return _identities[id];
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
@@ -245,7 +245,7 @@ void CoreSession::saveSessionState() const
 void CoreSession::restoreSessionState()
 {
     QList<NetworkId> nets = Core::connectedNetworks(user());
 void CoreSession::restoreSessionState()
 {
     QList<NetworkId> nets = Core::connectedNetworks(user());
-    CoreNetwork *net = 0;
+    CoreNetwork *net = nullptr;
     foreach(NetworkId id, nets) {
         net = network(id);
         Q_ASSERT(net);
     foreach(NetworkId id, nets) {
         net = network(id);
         Q_ASSERT(net);
@@ -649,8 +649,8 @@ void CoreSession::removeNetwork(NetworkId id)
 
     if (net->connectionState() != Network::Disconnected) {
         // make sure we no longer receive data from the tcp buffer
 
     if (net->connectionState() != Network::Disconnected) {
         // make sure we no longer receive data from the tcp buffer
-        disconnect(net, SIGNAL(displayMsg(NetworkId, Message::Type, BufferInfo::Type, const QString &, const QString &, const QString &, Message::Flags)), this, 0);
-        disconnect(net, SIGNAL(displayStatusMsg(QString)), this, 0);
+        disconnect(net, SIGNAL(displayMsg(NetworkId, Message::Type, BufferInfo::Type, const QString &, const QString &, const QString &, Message::Flags)), this, nullptr);
+        disconnect(net, SIGNAL(displayStatusMsg(QString)), this, nullptr);
         connect(net, SIGNAL(disconnected(NetworkId)), this, SLOT(destroyNetwork(NetworkId)));
         net->disconnectFromIrc();
     }
         connect(net, SIGNAL(disconnected(NetworkId)), this, SLOT(destroyNetwork(NetworkId)));
         net->disconnectFromIrc();
     }
@@ -697,9 +697,9 @@ void CoreSession::renameBuffer(const NetworkId &networkId, const QString &newNam
 void CoreSession::clientsConnected()
 {
     QHash<NetworkId, CoreNetwork *>::iterator netIter = _networks.begin();
 void CoreSession::clientsConnected()
 {
     QHash<NetworkId, CoreNetwork *>::iterator netIter = _networks.begin();
-    Identity *identity = 0;
-    CoreNetwork *net = 0;
-    IrcUser *me = 0;
+    Identity *identity = nullptr;
+    CoreNetwork *net = nullptr;
+    IrcUser *me = nullptr;
     while (netIter != _networks.end()) {
         net = *netIter;
         ++netIter;
     while (netIter != _networks.end()) {
         net = *netIter;
         ++netIter;
@@ -723,9 +723,9 @@ void CoreSession::clientsConnected()
 void CoreSession::clientsDisconnected()
 {
     QHash<NetworkId, CoreNetwork *>::iterator netIter = _networks.begin();
 void CoreSession::clientsDisconnected()
 {
     QHash<NetworkId, CoreNetwork *>::iterator netIter = _networks.begin();
-    Identity *identity = 0;
-    CoreNetwork *net = 0;
-    IrcUser *me = 0;
+    Identity *identity = nullptr;
+    CoreNetwork *net = nullptr;
+    IrcUser *me = nullptr;
     QString awayReason;
     while (netIter != _networks.end()) {
         net = *netIter;
     QString awayReason;
     while (netIter != _networks.end()) {
         net = *netIter;
@@ -755,7 +755,7 @@ void CoreSession::clientsDisconnected()
 void CoreSession::globalAway(const QString &msg, const bool skipFormatting)
 {
     QHash<NetworkId, CoreNetwork *>::iterator netIter = _networks.begin();
 void CoreSession::globalAway(const QString &msg, const bool skipFormatting)
 {
     QHash<NetworkId, CoreNetwork *>::iterator netIter = _networks.begin();
-    CoreNetwork *net = 0;
+    CoreNetwork *net = nullptr;
     while (netIter != _networks.end()) {
         net = *netIter;
         ++netIter;
     while (netIter != _networks.end()) {
         net = *netIter;
         ++netIter;
index b4903ff..176a23c 100644 (file)
@@ -63,7 +63,7 @@ class CoreSession : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreSession(UserId, bool restoreState, bool strictIdentEnabled, QObject *parent = 0);
+    CoreSession(UserId, bool restoreState, bool strictIdentEnabled, QObject *parent = nullptr);
 
     QList<BufferInfo> buffers() const;
     inline UserId user() const { return _user; }
 
     QList<BufferInfo> buffers() const;
     inline UserId user() const { return _user; }
index 34443a0..209a800 100644 (file)
@@ -29,7 +29,7 @@ const qint64 chunkSize = 16 * 1024;
 
 CoreTransfer::CoreTransfer(Direction direction, const QString &nick, const QString &fileName, const QHostAddress &address, quint16 port, quint64 fileSize, QObject *parent)
     : Transfer(direction, nick, fileName, address, port, fileSize, parent),
 
 CoreTransfer::CoreTransfer(Direction direction, const QString &nick, const QString &fileName, const QHostAddress &address, quint16 port, quint64 fileSize, QObject *parent)
     : Transfer(direction, nick, fileName, address, port, fileSize, parent),
-    _socket(0),
+    _socket(nullptr),
     _pos(0),
     _reading(false)
 {
     _pos(0),
     _reading(false)
 {
@@ -48,7 +48,7 @@ void CoreTransfer::cleanUp()
     if (_socket) {
         _socket->close();
         _socket->deleteLater();
     if (_socket) {
         _socket->close();
         _socket->deleteLater();
-        _socket = 0;
+        _socket = nullptr;
     }
 
     _buffer.clear();
     }
 
     _buffer.clear();
index 25e8ef9..02c21c8 100644 (file)
@@ -32,7 +32,7 @@ class CoreTransfer : public Transfer
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreTransfer(Direction direction, const QString &nick, const QString &fileName, const QHostAddress &address, quint16 port, quint64 size = 0, QObject *parent = 0);
+    CoreTransfer(Direction direction, const QString &nick, const QString &fileName, const QHostAddress &address, quint16 port, quint64 size = 0, QObject *parent = nullptr);
 
     quint64 transferred() const override;
 
 
     quint64 transferred() const override;
 
index 75f9b8d..55539e6 100644 (file)
@@ -32,7 +32,7 @@ class CoreUserInputHandler : public CoreBasicHandler
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreUserInputHandler(CoreNetwork *parent = 0);
+    CoreUserInputHandler(CoreNetwork *parent = nullptr);
     inline CoreNetwork *coreNetwork() const { return qobject_cast<CoreNetwork *>(parent()); }
 
     void handleUserInput(const BufferInfo &bufferInfo, const QString &text);
     inline CoreNetwork *coreNetwork() const { return qobject_cast<CoreNetwork *>(parent()); }
 
     void handleUserInput(const BufferInfo &bufferInfo, const QString &text);
@@ -112,10 +112,10 @@ protected:
 private:
     void doMode(const BufferInfo& bufferInfo, const QChar &addOrRemove, const QChar &mode, const QString &nickList);
     void banOrUnban(const BufferInfo &bufferInfo, const QString &text, bool ban);
 private:
     void doMode(const BufferInfo& bufferInfo, const QChar &addOrRemove, const QChar &mode, const QString &nickList);
     void banOrUnban(const BufferInfo &bufferInfo, const QString &text, bool ban);
-    void putPrivmsg(const QString &target, const QString &message, std::function<QByteArray(const QString &, const QString &)> encodeFunc, Cipher *cipher = 0);
+    void putPrivmsg(const QString &target, const QString &message, std::function<QByteArray(const QString &, const QString &)> encodeFunc, Cipher *cipher = nullptr);
 
 #ifdef HAVE_QCA2
 
 #ifdef HAVE_QCA2
-    QByteArray encrypt(const QString &target, const QByteArray &message, bool *didEncrypt = 0) const;
+    QByteArray encrypt(const QString &target, const QByteArray &message, bool *didEncrypt = nullptr) const;
 #endif
 
     struct Command {
 #endif
 
     struct Command {
index f5e5860..5808a71 100644 (file)
@@ -36,7 +36,7 @@ class CtcpParser : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CtcpParser(CoreSession *coreSession, QObject *parent = 0);
+    CtcpParser(CoreSession *coreSession, QObject *parent = nullptr);
 
     inline CoreSession *coreSession() const { return _coreSession; }
 
 
     inline CoreSession *coreSession() const { return _coreSession; }
 
@@ -88,7 +88,7 @@ private:
         QString bufferName;
         QList<QByteArray> replies;
 
         QString bufferName;
         QList<QByteArray> replies;
 
-        CtcpReply() : network(0) {}
+        CtcpReply() : network(nullptr) {}
         CtcpReply(CoreNetwork *net, const QString &buf) : network(net), bufferName(buf) {}
     };
 
         CtcpReply(CoreNetwork *net, const QString &buf) : network(net), bufferName(buf) {}
     };
 
index ff1ccb6..ab92325 100644 (file)
@@ -25,7 +25,7 @@ Event *KeyEvent::create(EventManager::EventType type, QVariantMap &map, Network
     if (type == EventManager::KeyEvent)
         return new KeyEvent(type, map, network);
 
     if (type == EventManager::KeyEvent)
         return new KeyEvent(type, map, network);
 
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
index b420440..76db681 100644 (file)
 
 LdapAuthenticator::LdapAuthenticator(QObject *parent)
     : Authenticator(parent),
 
 LdapAuthenticator::LdapAuthenticator(QObject *parent)
     : Authenticator(parent),
-    _connection(0)
+    _connection(nullptr)
 {
 }
 
 
 LdapAuthenticator::~LdapAuthenticator()
 {
 {
 }
 
 
 LdapAuthenticator::~LdapAuthenticator()
 {
-    if (_connection != 0) {
-        ldap_unbind_ext(_connection, 0, 0);
+    if (_connection != nullptr) {
+        ldap_unbind_ext(_connection, nullptr, nullptr);
     }
 }
 
     }
 }
 
@@ -183,7 +183,7 @@ Authenticator::State LdapAuthenticator::init(const QVariantMap &settings,
 // Method based on abustany LDAP quassel patch.
 bool LdapAuthenticator::ldapConnect()
 {
 // Method based on abustany LDAP quassel patch.
 bool LdapAuthenticator::ldapConnect()
 {
-    if (_connection != 0) {
+    if (_connection != nullptr) {
         ldapDisconnect();
     }
 
         ldapDisconnect();
     }
 
@@ -208,8 +208,8 @@ bool LdapAuthenticator::ldapConnect()
 
     if (res != LDAP_SUCCESS) {
         qWarning() << "Could not set LDAP protocol version to v3:" << ldap_err2string(res);
 
     if (res != LDAP_SUCCESS) {
         qWarning() << "Could not set LDAP protocol version to v3:" << ldap_err2string(res);
-        ldap_unbind_ext(_connection, 0, 0);
-        _connection = 0;
+        ldap_unbind_ext(_connection, nullptr, nullptr);
+        _connection = nullptr;
         return false;
     }
 
         return false;
     }
 
@@ -219,12 +219,12 @@ bool LdapAuthenticator::ldapConnect()
 
 void LdapAuthenticator::ldapDisconnect()
 {
 
 void LdapAuthenticator::ldapDisconnect()
 {
-    if (_connection == 0) {
+    if (_connection == nullptr) {
         return;
     }
 
         return;
     }
 
-    ldap_unbind_ext(_connection, 0, 0);
-    _connection = 0;
+    ldap_unbind_ext(_connection, nullptr, nullptr);
+    _connection = nullptr;
 }
 
 
 }
 
 
@@ -237,7 +237,7 @@ bool LdapAuthenticator::ldapAuth(const QString &username, const QString &passwor
     int res;
 
     // Attempt to establish a connection.
     int res;
 
     // Attempt to establish a connection.
-    if (_connection == 0) {
+    if (_connection == nullptr) {
         if (!ldapConnect()) {
             return false;
         }
         if (!ldapConnect()) {
             return false;
         }
@@ -251,10 +251,10 @@ bool LdapAuthenticator::ldapAuth(const QString &username, const QString &passwor
     QByteArray baseDN = _baseDN.toLocal8Bit();
     QByteArray uidAttribute = _uidAttribute.toLocal8Bit();
 
     QByteArray baseDN = _baseDN.toLocal8Bit();
     QByteArray uidAttribute = _uidAttribute.toLocal8Bit();
 
-    cred.bv_val = (bindPassword.size() > 0 ? bindPassword.data() : NULL);
+    cred.bv_val = (bindPassword.size() > 0 ? bindPassword.data() : nullptr);
     cred.bv_len = bindPassword.size();
 
     cred.bv_len = bindPassword.size();
 
-    res = ldap_sasl_bind_s(_connection, bindDN.size() > 0 ? bindDN.constData() : 0, LDAP_SASL_SIMPLE, &cred, 0, 0, 0);
+    res = ldap_sasl_bind_s(_connection, bindDN.size() > 0 ? bindDN.constData() : nullptr, LDAP_SASL_SIMPLE, &cred, nullptr, nullptr, nullptr);
 
     if (res != LDAP_SUCCESS) {
         qWarning() << "Refusing connection from" << username << "(LDAP bind failed:" << ldap_err2string(res) << ")";
 
     if (res != LDAP_SUCCESS) {
         qWarning() << "Refusing connection from" << username << "(LDAP bind failed:" << ldap_err2string(res) << ")";
@@ -262,11 +262,11 @@ bool LdapAuthenticator::ldapAuth(const QString &username, const QString &passwor
         return false;
     }
 
         return false;
     }
 
-    LDAPMessage *msg = NULL, *entry = NULL;
+    LDAPMessage *msg = nullptr, *entry = nullptr;
 
     const QByteArray ldapQuery = "(&(" + uidAttribute + '=' + username.toLocal8Bit() + ")" + _filter.toLocal8Bit() + ")";
 
 
     const QByteArray ldapQuery = "(&(" + uidAttribute + '=' + username.toLocal8Bit() + ")" + _filter.toLocal8Bit() + ")";
 
-    res = ldap_search_ext_s(_connection, baseDN.constData(), LDAP_SCOPE_SUBTREE, ldapQuery.constData(), 0, 0, 0, 0, 0, 0, &msg);
+    res = ldap_search_ext_s(_connection, baseDN.constData(), LDAP_SCOPE_SUBTREE, ldapQuery.constData(), nullptr, 0, nullptr, nullptr, nullptr, 0, &msg);
 
     if (res != LDAP_SUCCESS) {
         qWarning() << "Refusing connection from" << username << "(LDAP search failed:" << ldap_err2string(res) << ")";
 
     if (res != LDAP_SUCCESS) {
         qWarning() << "Refusing connection from" << username << "(LDAP search failed:" << ldap_err2string(res) << ")";
@@ -281,7 +281,7 @@ bool LdapAuthenticator::ldapAuth(const QString &username, const QString &passwor
 
     entry = ldap_first_entry(_connection, msg);
 
 
     entry = ldap_first_entry(_connection, msg);
 
-    if (entry == 0) {
+    if (entry == nullptr) {
         qWarning() << "Refusing connection from" << username << "(LDAP search returned no results)";
         ldap_msgfree(msg);
         return false;
         qWarning() << "Refusing connection from" << username << "(LDAP search returned no results)";
         ldap_msgfree(msg);
         return false;
@@ -293,7 +293,7 @@ bool LdapAuthenticator::ldapAuth(const QString &username, const QString &passwor
 
     char *userDN = ldap_get_dn(_connection, entry);
 
 
     char *userDN = ldap_get_dn(_connection, entry);
 
-    res = ldap_sasl_bind_s(_connection, userDN, LDAP_SASL_SIMPLE, &cred, 0, 0, 0);
+    res = ldap_sasl_bind_s(_connection, userDN, LDAP_SASL_SIMPLE, &cred, nullptr, nullptr, nullptr);
 
     if (res != LDAP_SUCCESS) {
         qWarning() << "Refusing connection from" << username << "(LDAP authentication failed)";
 
     if (res != LDAP_SUCCESS) {
         qWarning() << "Refusing connection from" << username << "(LDAP authentication failed)";
index 1b0b639..c46b76c 100644 (file)
@@ -50,7 +50,7 @@ class LdapAuthenticator : public Authenticator
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    LdapAuthenticator(QObject *parent = 0);
+    LdapAuthenticator(QObject *parent = nullptr);
     ~LdapAuthenticator() override;
 
 public slots:
     ~LdapAuthenticator() override;
 
 public slots:
index 1251f9e..a5aa995 100644 (file)
@@ -32,7 +32,7 @@ class Netsplit : public QObject
 {
     Q_OBJECT
 public:
 {
     Q_OBJECT
 public:
-    Netsplit(Network *network, QObject *parent = 0);
+    Netsplit(Network *network, QObject *parent = nullptr);
 
     inline Network *network() const { return _network; }
 
 
     inline Network *network() const { return _network; }
 
index 7e13d58..c0d375b 100644 (file)
@@ -54,7 +54,7 @@ class OidentdConfigGenerator : public QObject
 {
     Q_OBJECT
 public:
 {
     Q_OBJECT
 public:
-    explicit OidentdConfigGenerator(QObject *parent = 0);
+    explicit OidentdConfigGenerator(QObject *parent = nullptr);
     ~OidentdConfigGenerator();
 
 public slots:
     ~OidentdConfigGenerator();
 
 public slots:
index fb8157a..5e6517c 100644 (file)
@@ -1496,7 +1496,7 @@ Message::Types PostgreSqlStorage::bufferActivity(BufferId bufferId, MsgId lastSe
     query.bindValue(":lastseenmsgid", lastSeenMsgId.toQint64());
     safeExec(query);
     watchQuery(query);
     query.bindValue(":lastseenmsgid", lastSeenMsgId.toQint64());
     safeExec(query);
     watchQuery(query);
-    Message::Types result = Message::Types(0);
+    Message::Types result = Message::Types(nullptr);
     if (query.first())
         result = Message::Types(query.value(0).toInt());
     return result;
     if (query.first())
         result = Message::Types(query.value(0).toInt());
     return result;
index ff6e7b8..3643ecc 100644 (file)
@@ -30,7 +30,7 @@ class PostgreSqlStorage : public AbstractSqlStorage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    PostgreSqlStorage(QObject *parent = 0);
+    PostgreSqlStorage(QObject *parent = nullptr);
     ~PostgreSqlStorage() override;
 
     std::unique_ptr<AbstractSqlMigrationWriter> createMigrationWriter() override;
     ~PostgreSqlStorage() override;
 
     std::unique_ptr<AbstractSqlMigrationWriter> createMigrationWriter() override;
index 63bb2a5..5a9a8bc 100644 (file)
@@ -36,7 +36,7 @@ class SessionThread : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SessionThread(UserId user, bool restoreState, bool strictIdentEnabled, QObject *parent = 0);
+    SessionThread(UserId user, bool restoreState, bool strictIdentEnabled, QObject *parent = nullptr);
     ~SessionThread();
 
 public slots:
     ~SessionThread();
 
 public slots:
index 79b204f..2b79ef0 100644 (file)
@@ -27,7 +27,7 @@ class SqlAuthenticator : public Authenticator
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SqlAuthenticator(QObject *parent = 0);
+    SqlAuthenticator(QObject *parent = nullptr);
     virtual ~SqlAuthenticator();
 
 public slots:
     virtual ~SqlAuthenticator();
 
 public slots:
index e0f8fd8..bf6f3f7 100644 (file)
@@ -1612,7 +1612,7 @@ Message::Types SqliteStorage::bufferActivity(BufferId bufferId, MsgId lastSeenMs
     QSqlDatabase db = logDb();
     db.transaction();
 
     QSqlDatabase db = logDb();
     db.transaction();
 
-    Message::Types result = Message::Types(0);
+    Message::Types result = Message::Types(nullptr);
     {
         QSqlQuery query(db);
         query.prepare(queryString("select_buffer_bufferactivity"));
     {
         QSqlQuery query(db);
         query.prepare(queryString("select_buffer_bufferactivity"));
index d52cdfa..ab4c826 100644 (file)
@@ -31,7 +31,7 @@ class SqliteStorage : public AbstractSqlStorage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SqliteStorage(QObject *parent = 0);
+    SqliteStorage(QObject *parent = nullptr);
     ~SqliteStorage() override;
 
     std::unique_ptr<AbstractSqlMigrationReader> createMigrationReader() override;
     ~SqliteStorage() override;
 
     std::unique_ptr<AbstractSqlMigrationReader> createMigrationReader() override;
index a1e090b..83d7e60 100644 (file)
@@ -66,7 +66,7 @@ SslServer::SslServer(QObject *parent)
 QTcpSocket *SslServer::nextPendingConnection()
 {
     if (_pendingConnections.isEmpty())
 QTcpSocket *SslServer::nextPendingConnection()
 {
     if (_pendingConnections.isEmpty())
-        return 0;
+        return nullptr;
     else
         return _pendingConnections.takeFirst();
 }
     else
         return _pendingConnections.takeFirst();
 }
index 518db2e..2e18aa1 100644 (file)
@@ -33,7 +33,7 @@ class SslServer : public QTcpServer
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SslServer(QObject *parent = 0);
+    SslServer(QObject *parent = nullptr);
 
     bool hasPendingConnections() const override { return !_pendingConnections.isEmpty(); }
     QTcpSocket *nextPendingConnection() override;
 
     bool hasPendingConnections() const override { return !_pendingConnections.isEmpty(); }
     QTcpSocket *nextPendingConnection() override;
index df0a3a0..c0cddc1 100644 (file)
@@ -33,7 +33,7 @@ class Storage : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    Storage(QObject *parent = 0);
+    Storage(QObject *parent = nullptr);
     virtual ~Storage() {};
 
     enum State {
     virtual ~Storage() {};
 
     enum State {
index 45ac596..9a4eedd 100644 (file)
@@ -32,7 +32,7 @@ class AboutDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AboutDlg(QWidget *parent = 0);
+    AboutDlg(QWidget *parent = nullptr);
 
 private:
     Ui::AboutDlg ui;
 
 private:
     Ui::AboutDlg ui;
index 6c76936..3b96c44 100644 (file)
@@ -28,7 +28,7 @@ class AwayLogFilter : public ChatMonitorFilter
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AwayLogFilter(MessageModel *model, QObject *parent = 0);
+    AwayLogFilter(MessageModel *model, QObject *parent = nullptr);
 
     virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
     virtual QString idString() const { return "AwayLog"; }
 
     virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
     virtual QString idString() const { return "AwayLog"; }
index 068d1fa..ed7dba5 100644 (file)
@@ -30,7 +30,7 @@ class AwayLogView : public ChatMonitorView
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AwayLogView(AwayLogFilter *filter, QWidget *parent = 0);
+    AwayLogView(AwayLogFilter *filter, QWidget *parent = nullptr);
     virtual void addActionsToMenu(QMenu *menu, const QPointF &pos);
 };
 
     virtual void addActionsToMenu(QMenu *menu, const QPointF &pos);
 };
 
index 2d8e3a0..aa700f9 100644 (file)
@@ -107,7 +107,7 @@ BufferWidget::BufferWidget(QWidget *parent)
 BufferWidget::~BufferWidget()
 {
     delete _chatViewSearchController;
 BufferWidget::~BufferWidget()
 {
     delete _chatViewSearchController;
-    _chatViewSearchController = 0;
+    _chatViewSearchController = nullptr;
 }
 
 
 }
 
 
index f5f5c3f..e467ecc 100644 (file)
@@ -44,8 +44,8 @@ public:
     virtual inline bool autoMarkerLineOnLostFocus() const { return _autoMarkerLineOnLostFocus; }
 
 public slots:
     virtual inline bool autoMarkerLineOnLostFocus() const { return _autoMarkerLineOnLostFocus; }
 
 public slots:
-    virtual void setMarkerLine(ChatView *view = 0, bool allowGoingBack = true);
-    virtual void jumpToMarkerLine(ChatView *view = 0, bool requestBacklog = true);
+    virtual void setMarkerLine(ChatView *view = nullptr, bool allowGoingBack = true);
+    virtual void jumpToMarkerLine(ChatView *view = nullptr, bool requestBacklog = true);
 
 protected:
     virtual AbstractChatView *createChatView(BufferId);
 
 protected:
     virtual AbstractChatView *createChatView(BufferId);
index d575dc7..204590e 100644 (file)
@@ -33,7 +33,7 @@ ChannelListDlg::ChannelListDlg(QWidget *parent)
     _listFinished(true),
     _ircListModel(this),
     _sortFilter(this),
     _listFinished(true),
     _ircListModel(this),
     _sortFilter(this),
-    _simpleModeSpacer(0),
+    _simpleModeSpacer(nullptr),
     _advancedMode(false)
 {
     _sortFilter.setSourceModel(&_ircListModel);
     _advancedMode(false)
 {
     _sortFilter.setSourceModel(&_ircListModel);
@@ -151,7 +151,7 @@ void ChannelListDlg::setAdvancedMode(bool advanced)
         if (_simpleModeSpacer) {
             ui.searchLayout->removeItem(_simpleModeSpacer);
             delete _simpleModeSpacer;
         if (_simpleModeSpacer) {
             ui.searchLayout->removeItem(_simpleModeSpacer);
             delete _simpleModeSpacer;
-            _simpleModeSpacer = 0;
+            _simpleModeSpacer = nullptr;
         }
         ui.advancedModeLabel->setPixmap(icon::get("edit-clear-locationbar-rtl").pixmap(16));
     }
         }
         ui.advancedModeLabel->setPixmap(icon::get("edit-clear-locationbar-rtl").pixmap(16));
     }
index aa0708d..5136ef3 100644 (file)
@@ -36,7 +36,7 @@ class ChannelListDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ChannelListDlg(QWidget *parent = 0);
+    ChannelListDlg(QWidget *parent = nullptr);
 
     void setNetwork(NetworkId netId);
 
 
     void setNetwork(NetworkId netId);
 
index bbd49bf..79ee339 100644 (file)
@@ -49,7 +49,7 @@ ChatItem::ChatItem(const QRectF &boundingRect, ChatLine *parent)
     _boundingRect(boundingRect),
     _selectionMode(NoSelection),
     _selectionStart(-1),
     _boundingRect(boundingRect),
     _selectionMode(NoSelection),
     _selectionStart(-1),
-    _cachedLayout(0)
+    _cachedLayout(nullptr)
 {
 }
 
 {
 }
 
@@ -141,7 +141,7 @@ QTextLayout *ChatItem::layout() const
 void ChatItem::clearCache()
 {
     delete _cachedLayout;
 void ChatItem::clearCache()
 {
     delete _cachedLayout;
-    _cachedLayout = 0;
+    _cachedLayout = nullptr;
 }
 
 
 }
 
 
@@ -630,7 +630,7 @@ ContentsChatItem::ActionProxy ContentsChatItem::_actionProxy;
 
 ContentsChatItem::ContentsChatItem(const QPointF &pos, const qreal &width, ChatLine *parent)
     : ChatItem(QRectF(pos, QSizeF(width, 0)), parent),
 
 ContentsChatItem::ContentsChatItem(const QPointF &pos, const qreal &width, ChatLine *parent)
     : ChatItem(QRectF(pos, QSizeF(width, 0)), parent),
-    _data(0)
+    _data(nullptr)
 {
     setPos(pos);
     setGeometryByWidth(width);
 {
     setPos(pos);
     setGeometryByWidth(width);
@@ -652,7 +652,7 @@ ContentsChatItem::~ContentsChatItem()
 void ContentsChatItem::clearCache()
 {
     delete _data;
 void ContentsChatItem::clearCache()
 {
     delete _data;
-    _data = 0;
+    _data = nullptr;
     ChatItem::clearCache();
 }
 
     ChatItem::clearCache();
 }
 
@@ -679,7 +679,7 @@ qreal ContentsChatItem::setGeometryByWidth(qreal w)
     qreal spacing = qMax(fontMetrics()->lineSpacing(), fontMetrics()->height()); // cope with negative leading()
     qreal h = lines * spacing;
     delete _data;
     qreal spacing = qMax(fontMetrics()->lineSpacing(), fontMetrics()->height()); // cope with negative leading()
     qreal h = lines * spacing;
     delete _data;
-    _data = 0;
+    _data = nullptr;
 
     if (w != width() || h != height())
         setGeometry(w, h);
 
     if (w != width() || h != height())
         setGeometry(w, h);
index a6a94b2..52f5c36 100644 (file)
@@ -66,7 +66,7 @@ public:
     QPointF mapToScene(const QPointF &) const;
     QPointF mapFromScene(const QPointF &) const;
 
     QPointF mapToScene(const QPointF &) const;
     QPointF mapFromScene(const QPointF &) const;
 
-    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
     virtual inline int type() const { return ChatScene::ChatItemType; }
 
     QVariant data(int role) const;
     virtual inline int type() const { return ChatScene::ChatItemType; }
 
     QVariant data(int role) const;
@@ -175,7 +175,7 @@ public:
     virtual void handleClick(const QPointF &pos, ChatScene::ClickMode clickMode);
 
 protected:
     virtual void handleClick(const QPointF &pos, ChatScene::ClickMode clickMode);
 
 protected:
-    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
     virtual inline int type() const { return ChatScene::SenderChatItemType; }
     virtual void initLayout(QTextLayout *layout) const;
 };
     virtual inline int type() const { return ChatScene::SenderChatItemType; }
     virtual void initLayout(QTextLayout *layout) const;
 };
index 755d05b..5aba191 100644 (file)
@@ -50,8 +50,8 @@ ChatLine::ChatLine(int row, QAbstractItemModel *model,
     _width(width),
     _height(_contentsItem.height()),
     _selection(0),
     _width(width),
     _height(_contentsItem.height()),
     _selection(0),
-    _mouseGrabberItem(0),
-    _hoverItem(0)
+    _mouseGrabberItem(nullptr),
+    _hoverItem(nullptr)
 {
     Q_ASSERT(model);
     QModelIndex index = model->index(row, ChatLineModel::ContentsColumn);
 {
     Q_ASSERT(model);
     QModelIndex index = model->index(row, ChatLineModel::ContentsColumn);
@@ -78,7 +78,7 @@ ChatItem *ChatLine::item(ChatLineModel::ColumnType column)
     case ChatLineModel::ContentsColumn:
         return &_contentsItem;
     default:
     case ChatLineModel::ContentsColumn:
         return &_contentsItem;
     default:
-        return 0;
+        return nullptr;
     }
 }
 
     }
 }
 
@@ -91,7 +91,7 @@ ChatItem *ChatLine::itemAt(const QPointF &pos)
         return &_senderItem;
     if (_timestampItem.boundingRect().contains(pos))
         return &_timestampItem;
         return &_senderItem;
     if (_timestampItem.boundingRect().contains(pos))
         return &_timestampItem;
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
@@ -118,7 +118,7 @@ bool ChatLine::sceneEvent(QEvent *event)
         setMouseGrabberItem(itemAt(linePos));
     }
     else if (event->type() == QEvent::UngrabMouse) {
         setMouseGrabberItem(itemAt(linePos));
     }
     else if (event->type() == QEvent::UngrabMouse) {
-        setMouseGrabberItem(0);
+        setMouseGrabberItem(nullptr);
     }
     return QGraphicsItem::sceneEvent(event);
 }
     }
     return QGraphicsItem::sceneEvent(event);
 }
@@ -287,7 +287,7 @@ void ChatLine::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
 {
     if (_hoverItem) {
         _hoverItem->hoverLeaveEvent(event);
 {
     if (_hoverItem) {
         _hoverItem->hoverLeaveEvent(event);
-        _hoverItem = 0;
+        _hoverItem = nullptr;
     }
 }
 
     }
 }
 
index 3d95c5e..ed2de36 100644 (file)
@@ -34,7 +34,7 @@ public:
         const qreal &width,
         const qreal &timestampWidth, const qreal &senderWidth, const qreal &contentsWidth,
         const QPointF &senderPos, const QPointF &contentsPos,
         const qreal &width,
         const qreal &timestampWidth, const qreal &senderWidth, const qreal &contentsWidth,
         const QPointF &senderPos, const QPointF &contentsPos,
-        QGraphicsItem *parent = 0);
+        QGraphicsItem *parent = nullptr);
 
     virtual ~ChatLine();
 
 
     virtual ~ChatLine();
 
@@ -49,7 +49,7 @@ public:
 
     inline const QAbstractItemModel *model() const { return _model; }
     inline ChatScene *chatScene() const { return qobject_cast<ChatScene *>(scene()); }
 
     inline const QAbstractItemModel *model() const { return _model; }
     inline ChatScene *chatScene() const { return qobject_cast<ChatScene *>(scene()); }
-    inline ChatView *chatView() const { return chatScene() ? chatScene()->chatView() : 0; }
+    inline ChatView *chatView() const { return chatScene() ? chatScene()->chatView() : nullptr; }
 
     inline qreal width() const { return _width; }
     inline qreal height() const { return _height; }
 
     inline qreal width() const { return _width; }
     inline qreal height() const { return _height; }
@@ -60,7 +60,7 @@ public:
     inline ChatItem *senderItem() { return &_senderItem; }
     inline ContentsChatItem *contentsItem() { return &_contentsItem; }
 
     inline ChatItem *senderItem() { return &_senderItem; }
     inline ContentsChatItem *contentsItem() { return &_contentsItem; }
 
-    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
     enum { Type = ChatScene::ChatLineType };
     virtual inline int type() const { return Type; }
 
     enum { Type = ChatScene::ChatLineType };
     virtual inline int type() const { return Type; }
 
index 0c18ef1..d2e976c 100644 (file)
@@ -37,7 +37,7 @@ public:
         SelectedBackgroundRole
     };
 
         SelectedBackgroundRole
     };
 
-    ChatLineModel(QObject *parent = 0);
+    ChatLineModel(QObject *parent = nullptr);
 
     typedef ChatLineModelItem::Word Word;
     typedef ChatLineModelItem::WrapList WrapList;
 
     typedef ChatLineModelItem::Word Word;
     typedef ChatLineModelItem::WrapList WrapList;
index a3344d0..c9ceb97 100644 (file)
@@ -37,7 +37,7 @@ public:
         AllFields = 0xff
     };
 
         AllFields = 0xff
     };
 
-    ChatMonitorFilter(MessageModel *model, QObject *parent = 0);
+    ChatMonitorFilter(MessageModel *model, QObject *parent = nullptr);
 
     virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
     virtual QString idString() const { return "ChatMonitor"; }
 
     virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
     virtual QString idString() const { return "ChatMonitor"; }
index 02f5fac..4e6b766 100644 (file)
@@ -71,7 +71,7 @@ ChatScene::ChatScene(QAbstractItemModel *model, const QString &idString, qreal w
     _markerLineJumpPending(false),
     _cutoffMode(CutoffRight),
     _alwaysBracketSender(false),
     _markerLineJumpPending(false),
     _cutoffMode(CutoffRight),
     _alwaysBracketSender(false),
-    _selectingItem(0),
+    _selectingItem(nullptr),
     _selectionStart(-1),
     _isSelecting(false),
     _clickMode(NoClick),
     _selectionStart(-1),
     _isSelecting(false),
     _clickMode(NoClick),
@@ -182,7 +182,7 @@ void ChatScene::resetColumnWidths()
 ChatLine *ChatScene::chatLine(MsgId msgId, bool matchExact, bool ignoreDayChange) const
 {
     if (!_lines.count())
 ChatLine *ChatScene::chatLine(MsgId msgId, bool matchExact, bool ignoreDayChange) const
 {
     if (!_lines.count())
-        return 0;
+        return nullptr;
 
     QList<ChatLine *>::ConstIterator start = _lines.begin();
     QList<ChatLine *>::ConstIterator end = _lines.end();
 
     QList<ChatLine *>::ConstIterator start = _lines.begin();
     QList<ChatLine *>::ConstIterator end = _lines.end();
@@ -207,10 +207,10 @@ ChatLine *ChatScene::chatLine(MsgId msgId, bool matchExact, bool ignoreDayChange
         return *start;
 
     if (matchExact)
         return *start;
 
     if (matchExact)
-        return 0;
+        return nullptr;
 
     if (start == _lines.begin()) // not (yet?) in our scene
 
     if (start == _lines.begin()) // not (yet?) in our scene
-        return 0;
+        return nullptr;
 
     // if we didn't find the exact msgId, take the next-lower one (this makes sense for lastSeen)
 
 
     // if we didn't find the exact msgId, take the next-lower one (this makes sense for lastSeen)
 
@@ -222,7 +222,7 @@ ChatLine *ChatScene::chatLine(MsgId msgId, bool matchExact, bool ignoreDayChange
             if (_lines.at(i)->msgType() != Message::DayChange)
                 return _lines.at(i);
         }
             if (_lines.at(i)->msgType() != Message::DayChange)
                 return _lines.at(i);
         }
-        return 0;
+        return nullptr;
     }
 
     // return the next-lower line
     }
 
     // return the next-lower line
@@ -234,7 +234,7 @@ ChatLine *ChatScene::chatLine(MsgId msgId, bool matchExact, bool ignoreDayChange
             return *start;
     }
     while (start != _lines.begin());
             return *start;
     }
     while (start != _lines.begin());
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
@@ -245,7 +245,7 @@ ChatItem *ChatScene::chatItemAt(const QPointF &scenePos) const
         if (line)
             return line->itemAt(line->mapFromScene(scenePos));
     }
         if (line)
             return line->itemAt(line->mapFromScene(scenePos));
     }
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
@@ -419,7 +419,7 @@ void ChatScene::rowsInserted(const QModelIndex &index, int start, int end)
 
     // neither pre- or append means we have to do dirty work: move items...
     if (!(atTop || atBottom)) {
 
     // neither pre- or append means we have to do dirty work: move items...
     if (!(atTop || atBottom)) {
-        ChatLine *line = 0;
+        ChatLine *line = nullptr;
         for (int i = 0; i <= end; i++) {
             line = _lines.at(i);
             line->setPos(0, line->pos().y() - h);
         for (int i = 0; i <= end; i++) {
             line = _lines.at(i);
             line->setPos(0, line->pos().y() - h);
@@ -484,7 +484,7 @@ void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e
     if (_selectingItem) {
         int row = _selectingItem->row();
         if (row >= start && row <= end)
     if (_selectingItem) {
         int row = _selectingItem->row();
         if (row >= start && row <= end)
-            setSelectingItem(0);
+            setSelectingItem(nullptr);
     }
 
     // remove items from scene
     }
 
     // remove items from scene
@@ -492,7 +492,7 @@ void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e
     int lineCount = start;
     while (lineIter != _lines.end() && lineCount <= end) {
         if ((*lineIter) == markerLine()->chatLine())
     int lineCount = start;
     while (lineIter != _lines.end() && lineCount <= end) {
         if ((*lineIter) == markerLine()->chatLine())
-            markerLine()->setChatLine(0);
+            markerLine()->setChatLine(nullptr);
         h += (*lineIter)->height();
         delete *lineIter;
         lineIter = _lines.erase(lineIter);
         h += (*lineIter)->height();
         delete *lineIter;
         lineIter = _lines.erase(lineIter);
@@ -534,7 +534,7 @@ void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e
             moveStart = start;
             offset = -offset;
         }
             moveStart = start;
             offset = -offset;
         }
-        ChatLine *line = 0;
+        ChatLine *line = nullptr;
         for (int i = moveStart; i <= moveEnd; i++) {
             line = _lines.at(i);
             line->setPos(0, line->pos().y() + offset);
         for (int i = moveStart; i <= moveEnd; i++) {
             line = _lines.at(i);
             line->setPos(0, line->pos().y() + offset);
@@ -1227,7 +1227,7 @@ void ChatScene::loadWebPreview(ChatItem *parentItem, const QUrl &url, const QRec
             if (webPreview.previewItem->scene())
                 removeItem(webPreview.previewItem);
             delete webPreview.previewItem;
             if (webPreview.previewItem->scene())
                 removeItem(webPreview.previewItem);
             delete webPreview.previewItem;
-            webPreview.previewItem = 0;
+            webPreview.previewItem = nullptr;
         }
         webPreview.previewState = WebPreview::NoPreview;
     }
         }
         webPreview.previewState = WebPreview::NoPreview;
     }
@@ -1297,9 +1297,9 @@ void ChatScene::webPreviewNextStep()
     case WebPreview::HidePreview:
         if (webPreview.previewItem) {
             delete webPreview.previewItem;
     case WebPreview::HidePreview:
         if (webPreview.previewItem) {
             delete webPreview.previewItem;
-            webPreview.previewItem = 0;
+            webPreview.previewItem = nullptr;
         }
         }
-        webPreview.parentItem = 0;
+        webPreview.parentItem = nullptr;
         webPreview.url = QUrl();
         webPreview.urlRect = QRectF();
         webPreview.previewState = WebPreview::NoPreview;
         webPreview.url = QUrl();
         webPreview.urlRect = QRectF();
         webPreview.previewState = WebPreview::NoPreview;
@@ -1316,7 +1316,7 @@ void ChatScene::clearWebPreview(ChatItem *parentItem)
         webPreview.previewState = WebPreview::NoPreview; // we haven't loaded anything yet
         break;
     case WebPreview::ShowPreview:
         webPreview.previewState = WebPreview::NoPreview; // we haven't loaded anything yet
         break;
     case WebPreview::ShowPreview:
-        if (parentItem == 0 || webPreview.parentItem == parentItem) {
+        if (parentItem == nullptr || webPreview.parentItem == parentItem) {
             if (webPreview.previewItem && webPreview.previewItem->scene())
                 removeItem(webPreview.previewItem);
         }
             if (webPreview.previewItem && webPreview.previewItem->scene())
                 removeItem(webPreview.previewItem);
         }
index 7f6bb75..cec16a0 100644 (file)
@@ -168,7 +168,7 @@ public slots:
 
 #if defined HAVE_WEBKIT || defined HAVE_WEBENGINE
     void loadWebPreview(ChatItem *parentItem, const QUrl &url, const QRectF &urlRect);
 
 #if defined HAVE_WEBKIT || defined HAVE_WEBENGINE
     void loadWebPreview(ChatItem *parentItem, const QUrl &url, const QRectF &urlRect);
-    void clearWebPreview(ChatItem *parentItem = 0);
+    void clearWebPreview(ChatItem *parentItem = nullptr);
 #endif
 
 signals:
 #endif
 
 signals:
@@ -292,7 +292,7 @@ private:
         QRectF urlRect;
         PreviewState previewState;
         QTimer timer;
         QRectF urlRect;
         PreviewState previewState;
         QTimer timer;
-        WebPreview() : parentItem(0), previewItem(0), previewState(NoPreview) {}
+        WebPreview() : parentItem(nullptr), previewItem(nullptr), previewState(NoPreview) {}
     };
     WebPreview webPreview;
 #endif // HAVE_WEBKIT || HAVE_WEBENGINE
     };
     WebPreview webPreview;
 #endif // HAVE_WEBKIT || HAVE_WEBENGINE
index 2370311..46ec7be 100644 (file)
@@ -55,7 +55,7 @@ ChatView::ChatView(MessageFilter *filter, QWidget *parent)
 
 void ChatView::init(MessageFilter *filter)
 {
 
 void ChatView::init(MessageFilter *filter)
 {
-    _bufferContainer = 0;
+    _bufferContainer = nullptr;
     _currentScaleFactor = 1;
     _invalidateFilter = false;
 
     _currentScaleFactor = 1;
     _invalidateFilter = false;
 
@@ -313,11 +313,11 @@ QList<ChatLine *> ChatView::visibleChatLinesSorted(Qt::ItemSelectionMode mode) c
 ChatLine *ChatView::lastVisibleChatLine(bool ignoreDayChange) const
 {
     if (!scene())
 ChatLine *ChatView::lastVisibleChatLine(bool ignoreDayChange) const
 {
     if (!scene())
-        return 0;
+        return nullptr;
 
     QAbstractItemModel *model = scene()->model();
     if (!model || model->rowCount() == 0)
 
     QAbstractItemModel *model = scene()->model();
     if (!model || model->rowCount() == 0)
-        return 0;
+        return nullptr;
 
     int row = -1;
 
 
     int row = -1;
 
@@ -330,7 +330,7 @@ ChatLine *ChatView::lastVisibleChatLine(bool ignoreDayChange) const
     if (row >= 0)
         return scene()->chatLine(row);
 
     if (row >= 0)
         return scene()->chatLine(row);
 
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
index 8b50c55..cb34ede 100644 (file)
@@ -39,8 +39,8 @@ class ChatView : public QGraphicsView, public AbstractChatView
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ChatView(MessageFilter *, QWidget *parent = 0);
-    ChatView(BufferId bufferId, QWidget *parent = 0);
+    ChatView(MessageFilter *, QWidget *parent = nullptr);
+    ChatView(BufferId bufferId, QWidget *parent = nullptr);
 
     virtual MsgId lastMsgId() const;
     virtual MsgId lastVisibleMsgId() const;
 
     virtual MsgId lastMsgId() const;
     virtual MsgId lastVisibleMsgId() const;
index df31569..f3c92b1 100644 (file)
@@ -33,7 +33,7 @@ class ChatViewSearchBar : public QWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ChatViewSearchBar(QWidget *parent = 0);
+    ChatViewSearchBar(QWidget *parent = nullptr);
 
     inline QLineEdit *searchEditLine() const { return ui.searchEditLine; }
     inline QCheckBox *caseSensitiveBox() const { return ui.caseSensitiveBox; }
 
     inline QLineEdit *searchEditLine() const { return ui.searchEditLine; }
     inline QCheckBox *caseSensitiveBox() const { return ui.caseSensitiveBox; }
index b1970c4..bb6dc36 100644 (file)
@@ -31,7 +31,7 @@
 
 ChatViewSearchController::ChatViewSearchController(QObject *parent)
     : QObject(parent),
 
 ChatViewSearchController::ChatViewSearchController(QObject *parent)
     : QObject(parent),
-    _scene(0),
+    _scene(nullptr),
     _currentHighlight(0),
     _caseSensitive(false),
     _searchSenders(false),
     _currentHighlight(0),
     _caseSensitive(false),
     _searchSenders(false),
@@ -65,8 +65,8 @@ void ChatViewSearchController::setScene(ChatScene *scene)
         return;
 
     if (_scene) {
         return;
 
     if (_scene) {
-        disconnect(_scene, 0, this, 0);
-        disconnect(Client::messageModel(), 0, this, 0);
+        disconnect(_scene, nullptr, this, nullptr);
+        disconnect(Client::messageModel(), nullptr, this, nullptr);
         qDeleteAll(_highlightItems);
         _highlightItems.clear();
     }
         qDeleteAll(_highlightItems);
         _highlightItems.clear();
     }
@@ -357,7 +357,7 @@ void ChatViewSearchController::repositionHighlights(ChatLine *line)
 void ChatViewSearchController::sceneDestroyed()
 {
     // WARNING: don't call any methods on scene!
 void ChatViewSearchController::sceneDestroyed()
 {
     // WARNING: don't call any methods on scene!
-    _scene = 0;
+    _scene = nullptr;
     // the items will be automatically deleted when the scene is destroyed
     // so we just have to clear the list;
     _highlightItems.clear();
     // the items will be automatically deleted when the scene is destroyed
     // so we just have to clear the list;
     _highlightItems.clear();
index b85d355..8c0aa5c 100644 (file)
@@ -39,7 +39,7 @@ class ChatViewSearchController : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ChatViewSearchController(QObject *parent = 0);
+    ChatViewSearchController(QObject *parent = nullptr);
 
     inline const QString &searchString() const { return _searchString; }
 
 
     inline const QString &searchString() const { return _searchString; }
 
@@ -93,10 +93,10 @@ class SearchHighlightItem : public QObject, public QGraphicsItem
     Q_INTERFACES(QGraphicsItem)
 
 public:
     Q_INTERFACES(QGraphicsItem)
 
 public:
-    SearchHighlightItem(QRectF wordRect, QGraphicsItem *parent = 0);
+    SearchHighlightItem(QRectF wordRect, QGraphicsItem *parent = nullptr);
     virtual inline QRectF boundingRect() const { return _boundingRect; }
     void updateGeometry(qreal width, qreal height);
     virtual inline QRectF boundingRect() const { return _boundingRect; }
     void updateGeometry(qreal width, qreal height);
-    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
     enum { Type = ChatScene::SearchHighlightType };
     virtual inline int type() const { return Type; }
 
     enum { Type = ChatScene::SearchHighlightType };
     virtual inline int type() const { return Type; }
 
index 84c8405..ef2636c 100644 (file)
@@ -33,7 +33,7 @@ class ColumnHandleItem : public QGraphicsObject
     Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)
 
 public :
     Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)
 
 public :
-        ColumnHandleItem(qreal width, QGraphicsItem *parent = 0);
+        ColumnHandleItem(qreal width, QGraphicsItem *parent = nullptr);
     virtual inline int type() const { return ChatScene::ColumnHandleType; }
 
     inline qreal width() const { return _width; }
     virtual inline int type() const { return ChatScene::ColumnHandleType; }
 
     inline qreal width() const { return _width; }
@@ -46,7 +46,7 @@ public :
     void setXPos(qreal xpos);
     void setXLimits(qreal min, qreal max);
 
     void setXPos(qreal xpos);
     void setXLimits(qreal min, qreal max);
 
-    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
 
 public slots:
     void sceneRectChanged(const QRectF &);
 
 public slots:
     void sceneRectChanged(const QRectF &);
index 70512e7..da4a30c 100644 (file)
@@ -57,7 +57,7 @@ public:
         ConclusionPage
     };
 
         ConclusionPage
     };
 
-    CoreConfigWizard(CoreConnection *connection, const QVariantList &backendInfos, const QVariantList &authInfos, QWidget *parent = 0);
+    CoreConfigWizard(CoreConnection *connection, const QVariantList &backendInfos, const QVariantList &authInfos, QWidget *parent = nullptr);
 
     inline CoreConnection *coreConnection() const { return _connection; }
 
 
     inline CoreConnection *coreConnection() const { return _connection; }
 
@@ -89,7 +89,7 @@ class IntroPage : public QWizardPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IntroPage(QWidget *parent = 0);
+    IntroPage(QWidget *parent = nullptr);
     int nextId() const;
 private:
     Ui::CoreConfigWizardIntroPage ui;
     int nextId() const;
 private:
     Ui::CoreConfigWizardIntroPage ui;
@@ -101,7 +101,7 @@ class AdminUserPage : public QWizardPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AdminUserPage(QWidget *parent = 0);
+    AdminUserPage(QWidget *parent = nullptr);
     int nextId() const;
     bool isComplete() const;
 private:
     int nextId() const;
     bool isComplete() const;
 private:
@@ -115,7 +115,7 @@ class AuthenticationSelectionPage : public QWizardPage
     using FieldInfo = std::tuple<QString, QString, QVariant>;
 
 public:
     using FieldInfo = std::tuple<QString, QString, QVariant>;
 
 public:
-    AuthenticationSelectionPage(const QVariantList &authInfos, QWidget *parent = 0);
+    AuthenticationSelectionPage(const QVariantList &authInfos, QWidget *parent = nullptr);
     int nextId() const;
     QString displayName() const;
     QString authenticator() const;
     int nextId() const;
     QString displayName() const;
     QString authenticator() const;
@@ -137,7 +137,7 @@ class StorageSelectionPage : public QWizardPage
     using FieldInfo = std::tuple<QString, QString, QVariant>;
 
 public:
     using FieldInfo = std::tuple<QString, QString, QVariant>;
 
 public:
-    StorageSelectionPage(const QVariantList &backendInfos, QWidget *parent = 0);
+    StorageSelectionPage(const QVariantList &backendInfos, QWidget *parent = nullptr);
     int nextId() const;
     QString displayName() const;
     QString backend() const;
     int nextId() const;
     QString displayName() const;
     QString backend() const;
@@ -158,7 +158,7 @@ class SyncPage : public QWizardPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SyncPage(QWidget *parent = 0);
+    SyncPage(QWidget *parent = nullptr);
     void initializePage();
     int nextId() const;
     bool isComplete() const;
     void initializePage();
     int nextId() const;
     bool isComplete() const;
@@ -183,7 +183,7 @@ class SyncRelayPage : public QWizardPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SyncRelayPage(QWidget *parent = 0);
+    SyncRelayPage(QWidget *parent = nullptr);
     int nextId() const;
     enum Mode { Success, Error };
 
     int nextId() const;
     enum Mode { Success, Error };
 
index 7b31c83..b882c6e 100644 (file)
@@ -34,7 +34,7 @@ class CoreConnectDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreConnectDlg(QWidget *parent = 0);
+    CoreConnectDlg(QWidget *parent = nullptr);
     AccountId selectedAccount() const;
 
     void accept();
     AccountId selectedAccount() const;
 
     void accept();
@@ -49,7 +49,7 @@ class CoreConnectAuthDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreConnectAuthDlg(CoreAccount *account, QWidget *parent = 0);
+    CoreConnectAuthDlg(CoreAccount *account, QWidget *parent = nullptr);
 
     void accept();
 
 
     void accept();
 
index a65b1f4..9c70161 100644 (file)
@@ -32,7 +32,7 @@ class CoreConnectionStatusWidget : public QWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreConnectionStatusWidget(CoreConnection *connection, QWidget *parent = 0);
+    CoreConnectionStatusWidget(CoreConnection *connection, QWidget *parent = nullptr);
 
     inline CoreConnection *coreConnection() const { return _coreConnection; }
 
 
     inline CoreConnection *coreConnection() const { return _coreConnection; }
 
index 9077363..540eb54 100644 (file)
@@ -32,7 +32,7 @@ class DebugBufferViewOverlay : public QWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    DebugBufferViewOverlay(QWidget *parent = 0);
+    DebugBufferViewOverlay(QWidget *parent = nullptr);
 
 private slots:
     void update();
 
 private slots:
     void update();
index 7b8f429..1ec0ee1 100644 (file)
@@ -28,7 +28,7 @@ class DebugConsole : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    DebugConsole(QWidget *parent = 0);
+    DebugConsole(QWidget *parent = nullptr);
     virtual ~DebugConsole();
 
 public slots:
     virtual ~DebugConsole();
 
 public slots:
index faf0584..bff4702 100644 (file)
@@ -32,7 +32,7 @@ class DebugLogDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    DebugLogDlg(QWidget *parent = 0);
+    DebugLogDlg(QWidget *parent = nullptr);
 
 private slots:
     void logUpdated(const Logger::LogEntry &msg);
 
 private slots:
     void logUpdated(const Logger::LogEntry &msg);
index 6974eae..ef441b2 100644 (file)
@@ -28,7 +28,7 @@ class DebugMessageModelFilter : public QSortFilterProxyModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    DebugMessageModelFilter(QObject *parent = 0);
+    DebugMessageModelFilter(QObject *parent = nullptr);
     QVariant headerData(int section, Qt::Orientation orientation, int role) const;
     virtual QVariant data(const QModelIndex &index, int role) const;
 };
     QVariant headerData(int section, Qt::Orientation orientation, int role) const;
     virtual QVariant data(const QModelIndex &index, int role) const;
 };
index 786593d..bbeeff4 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(0), _item(0), _count(0)
+    : AbstractNotificationBackend(parent), _bus(QDBusConnection::sessionBus()), _dock(nullptr), _item(nullptr), _count(0)
 {
     NotificationSettings notificationSettings;
     _enabled = notificationSettings.value("DockManager/Enabled", false).toBool();
 {
     NotificationSettings notificationSettings;
     _enabled = notificationSettings.value("DockManager/Enabled", false).toBool();
@@ -110,7 +110,7 @@ void DockManagerNotificationBackend::updateProgress(int done, int total)
 
     int perc = 0;
     if (done == total) {
 
     int perc = 0;
     if (done == total) {
-        disconnect(Client::backlogManager(), 0, this, 0);
+        disconnect(Client::backlogManager(), nullptr, this, nullptr);
         perc = -1;
     } else
         perc = (done * 100) / total;
         perc = -1;
     } else
         perc = (done * 100) / total;
index c59ffbb..37ebd47 100644 (file)
@@ -34,7 +34,7 @@ class DockManagerNotificationBackend : public AbstractNotificationBackend
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    DockManagerNotificationBackend(QObject *parent = 0);
+    DockManagerNotificationBackend(QObject *parent = nullptr);
 
     void notify(const Notification &);
     void close(uint notificationId);
 
     void notify(const Notification &);
     void close(uint notificationId);
@@ -63,7 +63,7 @@ class DockManagerNotificationBackend::ConfigWidget : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ConfigWidget(bool enabled, QWidget *parent = 0);
+    ConfigWidget(bool enabled, QWidget *parent = nullptr);
 
     void save();
     void load();
 
     void save();
     void load();
index 7a4b5ac..3233f04 100644 (file)
@@ -427,9 +427,9 @@ void InputWidget::setNetwork(NetworkId networkId)
 
     const Network *previousNet = Client::network(_networkId);
     if (previousNet) {
 
     const Network *previousNet = Client::network(_networkId);
     if (previousNet) {
-        disconnect(previousNet, 0, this, 0);
+        disconnect(previousNet, nullptr, this, nullptr);
         if (previousNet->me())
         if (previousNet->me())
-            disconnect(previousNet->me(), 0, this, 0);
+            disconnect(previousNet->me(), nullptr, this, nullptr);
     }
 
     _networkId = networkId;
     }
 
     _networkId = networkId;
@@ -472,7 +472,7 @@ void InputWidget::setIdentity(IdentityId identityId)
 
     const Identity *previousIdentity = Client::identity(_identityId);
     if (previousIdentity)
 
     const Identity *previousIdentity = Client::identity(_identityId);
     if (previousIdentity)
-        disconnect(previousIdentity, 0, this, 0);
+        disconnect(previousIdentity, nullptr, this, nullptr);
 
     _identityId = identityId;
 
 
     _identityId = identityId;
 
index 11512b2..831e094 100644 (file)
@@ -41,7 +41,7 @@ class InputWidget : public AbstractItemView
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    InputWidget(QWidget *parent = 0);
+    InputWidget(QWidget *parent = nullptr);
     virtual ~InputWidget();
 
     const Network *currentNetwork() const;
     virtual ~InputWidget();
 
     const Network *currentNetwork() const;
@@ -197,6 +197,6 @@ class MouseWheelFilter : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    MouseWheelFilter(QObject *parent = 0);
+    MouseWheelFilter(QObject *parent = nullptr);
     virtual bool eventFilter(QObject *obj, QEvent *event);
 };
     virtual bool eventFilter(QObject *obj, QEvent *event);
 };
index b81c209..d7e8658 100644 (file)
@@ -29,9 +29,9 @@
 
 IrcConnectionWizard::IrcConnectionWizard(QWidget *parent, Qt::WindowFlags flags)
     : QWizard(parent, flags),
 
 IrcConnectionWizard::IrcConnectionWizard(QWidget *parent, Qt::WindowFlags flags)
     : QWizard(parent, flags),
-    _introductionPage(0),
-    _identityPage(0),
-    _networkPage(0)
+    _introductionPage(nullptr),
+    _identityPage(nullptr),
+    _networkPage(nullptr)
 {
     _introductionPage = createIntroductionPage(this);
     _identityPage = new IdentityPage(this);
 {
     _introductionPage = createIntroductionPage(this);
     _identityPage = new IdentityPage(this);
@@ -111,7 +111,7 @@ void IrcConnectionWizard::networkReady(NetworkId id)
 IdentityPage::IdentityPage(QWidget *parent)
     : QWizardPage(parent),
     _identityEditWidget(new IdentityEditWidget(this)),
 IdentityPage::IdentityPage(QWidget *parent)
     : QWizardPage(parent),
     _identityEditWidget(new IdentityEditWidget(this)),
-    _identity(0)
+    _identity(nullptr)
 {
     setTitle(tr("Setup Identity"));
 
 {
     setTitle(tr("Setup Identity"));
 
index 69836fb..65509eb 100644 (file)
@@ -30,9 +30,9 @@ class IrcConnectionWizard : public QWizard
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IrcConnectionWizard(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+    IrcConnectionWizard(QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr);
 
 
-    static QWizardPage *createIntroductionPage(QWidget *parent = 0);
+    static QWizardPage *createIntroductionPage(QWidget *parent = nullptr);
 
 private slots:
     void finishClicked();
 
 private slots:
     void finishClicked();
@@ -60,7 +60,7 @@ class IdentityPage : public QWizardPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IdentityPage(QWidget *parent = 0);
+    IdentityPage(QWidget *parent = nullptr);
 
     CertIdentity *identity();
 
 
     CertIdentity *identity();
 
@@ -80,7 +80,7 @@ class NetworkPage : public QWizardPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NetworkPage(QWidget *parent = 0);
+    NetworkPage(QWidget *parent = nullptr);
 
     NetworkInfo networkInfo();
     QStringList channelList();
 
     NetworkInfo networkInfo();
     QStringList channelList();
index 93e1506..8932283 100644 (file)
@@ -34,7 +34,7 @@ class KNotificationBackend : public AbstractNotificationBackend
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    KNotificationBackend(QObject *parent = 0);
+    KNotificationBackend(QObject *parent = nullptr);
 
     void notify(const Notification &);
     void close(uint notificationId);
 
     void notify(const Notification &);
     void close(uint notificationId);
@@ -60,7 +60,7 @@ class KNotificationBackend::ConfigWidget : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ConfigWidget(QWidget *parent = 0);
+    ConfigWidget(QWidget *parent = nullptr);
 
     void save();
     void load();
 
     void save();
     void load();
index a5d860e..d8b649b 100644 (file)
@@ -30,7 +30,7 @@ class MainPage : public QWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    MainPage(QWidget *parent = 0);
+    MainPage(QWidget *parent = nullptr);
 
 private slots:
     void showCoreConnectionDlg();
 
 private slots:
     void showCoreConnectionDlg();
index 2ce724b..fc0e061 100644 (file)
@@ -162,7 +162,7 @@ MainWin::MainWin(QWidget *parent)
     _msgProcessorStatusWidget(new MsgProcessorStatusWidget(this)),
     _coreConnectionStatusWidget(new CoreConnectionStatusWidget(Client::coreConnection(), this)),
     _titleSetter(this),
     _msgProcessorStatusWidget(new MsgProcessorStatusWidget(this)),
     _coreConnectionStatusWidget(new CoreConnectionStatusWidget(Client::coreConnection(), this)),
     _titleSetter(this),
-    _awayLog(0),
+    _awayLog(nullptr),
     _layoutLoaded(false),
     _activeBufferViewIndex(-1),
     _aboutToQuit(false)
     _layoutLoaded(false),
     _activeBufferViewIndex(-1),
     _aboutToQuit(false)
@@ -401,14 +401,14 @@ void MainWin::setupActions()
     connect(lockAct, SIGNAL(toggled(bool)), SLOT(on_actionLockLayout_toggled(bool)));
 
     coll->addAction("ToggleSearchBar", new Action(icon::get("edit-find"), tr("Show &Search Bar"), coll,
     connect(lockAct, SIGNAL(toggled(bool)), SLOT(on_actionLockLayout_toggled(bool)));
 
     coll->addAction("ToggleSearchBar", new Action(icon::get("edit-find"), tr("Show &Search Bar"), coll,
-            0, 0, QKeySequence::Find))->setCheckable(true);
+            nullptr, nullptr, QKeySequence::Find))->setCheckable(true);
     coll->addAction("ShowAwayLog", new Action(tr("Show Away Log"), coll,
             this, SLOT(showAwayLog())));
     coll->addAction("ToggleMenuBar", new Action(icon::get("show-menu"), tr("Show &Menubar"), coll,
     coll->addAction("ShowAwayLog", new Action(tr("Show Away Log"), coll,
             this, SLOT(showAwayLog())));
     coll->addAction("ToggleMenuBar", new Action(icon::get("show-menu"), tr("Show &Menubar"), coll,
-            0, 0))->setCheckable(true);
+            nullptr, nullptr))->setCheckable(true);
 
     coll->addAction("ToggleStatusBar", new Action(tr("Show Status &Bar"), coll,
 
     coll->addAction("ToggleStatusBar", new Action(tr("Show Status &Bar"), coll,
-            0, 0))->setCheckable(true);
+            nullptr, nullptr))->setCheckable(true);
 
 #ifdef HAVE_KDE
     _fullScreenAction = KStandardAction::fullScreen(this, SLOT(onFullScreenToggled()), this, coll);
 
 #ifdef HAVE_KDE
     _fullScreenAction = KStandardAction::fullScreen(this, SLOT(onFullScreenToggled()), this, coll);
@@ -761,16 +761,16 @@ BufferView *MainWin::allBuffersView() const
     // "All Buffers" is always the first dock created
     if (_bufferViews.count() > 0)
         return _bufferViews[0]->bufferView();
     // "All Buffers" is always the first dock created
     if (_bufferViews.count() > 0)
         return _bufferViews[0]->bufferView();
-    return 0;
+    return nullptr;
 }
 
 
 BufferView *MainWin::activeBufferView() const
 {
     if (_activeBufferViewIndex < 0 || _activeBufferViewIndex >= _bufferViews.count())
 }
 
 
 BufferView *MainWin::activeBufferView() const
 {
     if (_activeBufferViewIndex < 0 || _activeBufferViewIndex >= _bufferViews.count())
-        return 0;
+        return nullptr;
     BufferViewDock *dock = _bufferViews.at(_activeBufferViewIndex);
     BufferViewDock *dock = _bufferViews.at(_activeBufferViewIndex);
-    return dock->isActive() ? dock->bufferView() : 0;
+    return dock->isActive() ? dock->bufferView() : nullptr;
 }
 
 
 }
 
 
@@ -1521,7 +1521,7 @@ void MainWin::showAwayLog()
     if (_awayLog)
         return;
     AwayLogFilter *filter = new AwayLogFilter(Client::messageModel());
     if (_awayLog)
         return;
     AwayLogFilter *filter = new AwayLogFilter(Client::messageModel());
-    _awayLog = new AwayLogView(filter, 0);
+    _awayLog = new AwayLogView(filter, nullptr);
     filter->setParent(_awayLog);
     connect(_awayLog, SIGNAL(destroyed()), this, SLOT(awayLogDestroyed()));
     _awayLog->setAttribute(Qt::WA_DeleteOnClose);
     filter->setParent(_awayLog);
     connect(_awayLog, SIGNAL(destroyed()), this, SLOT(awayLogDestroyed()));
     _awayLog->setAttribute(Qt::WA_DeleteOnClose);
@@ -1531,7 +1531,7 @@ void MainWin::showAwayLog()
 
 void MainWin::awayLogDestroyed()
 {
 
 void MainWin::awayLogDestroyed()
 {
-    _awayLog = 0;
+    _awayLog = nullptr;
 }
 
 
 }
 
 
@@ -1691,7 +1691,7 @@ void MainWin::messagesInserted(const QModelIndex &parent, int start, int end)
 {
     Q_UNUSED(parent);
 
 {
     Q_UNUSED(parent);
 
-    bool hasFocus = QApplication::activeWindow() != 0;
+    bool hasFocus = QApplication::activeWindow() != nullptr;
 
     for (int i = start; i <= end; i++) {
         QModelIndex idx = Client::messageModel()->index(i, ChatLineModel::ContentsColumn);
 
     for (int i = start; i <= end; i++) {
         QModelIndex idx = Client::messageModel()->index(i, ChatLineModel::ContentsColumn);
@@ -1759,7 +1759,7 @@ void MainWin::clientNetworkCreated(NetworkId id)
     connect(net, SIGNAL(updatedRemotely()), this, SLOT(clientNetworkUpdated()));
     connect(act, SIGNAL(triggered()), this, SLOT(connectOrDisconnectFromNet()));
 
     connect(net, SIGNAL(updatedRemotely()), this, SLOT(clientNetworkUpdated()));
     connect(act, SIGNAL(triggered()), this, SLOT(connectOrDisconnectFromNet()));
 
-    QAction *beforeAction = 0;
+    QAction *beforeAction = nullptr;
     foreach(QAction *action, _networksMenu->actions()) {
         if (!action->data().isValid()) // ignore stock actions
             continue;
     foreach(QAction *action, _networksMenu->actions()) {
         if (!action->data().isValid()) // ignore stock actions
             continue;
@@ -1958,7 +1958,7 @@ void MainWin::on_actionDebugHotList_triggered()
 
 void MainWin::on_actionDebugBufferViewOverlay_triggered()
 {
 
 void MainWin::on_actionDebugBufferViewOverlay_triggered()
 {
-    DebugBufferViewOverlay *overlay = new DebugBufferViewOverlay(0);
+    DebugBufferViewOverlay *overlay = new DebugBufferViewOverlay(nullptr);
     overlay->setAttribute(Qt::WA_DeleteOnClose);
     overlay->show();
 }
     overlay->setAttribute(Qt::WA_DeleteOnClose);
     overlay->show();
 }
@@ -1966,7 +1966,7 @@ void MainWin::on_actionDebugBufferViewOverlay_triggered()
 
 void MainWin::on_actionDebugMessageModel_triggered()
 {
 
 void MainWin::on_actionDebugMessageModel_triggered()
 {
-    QTableView *view = new QTableView(0);
+    QTableView *view = new QTableView(nullptr);
     DebugMessageModelFilter *filter = new DebugMessageModelFilter(view);
     filter->setSourceModel(Client::messageModel());
     view->setModel(filter);
     DebugMessageModelFilter *filter = new DebugMessageModelFilter(view);
     filter->setSourceModel(Client::messageModel());
     view->setModel(filter);
index f9e53e3..9dacca6 100644 (file)
@@ -65,7 +65,7 @@ class MainWin
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    MainWin(QWidget *parent = 0);
+    MainWin(QWidget *parent = nullptr);
 
     void init();
 
 
     void init();
 
index be3f1af..68c44ae 100644 (file)
@@ -26,7 +26,7 @@
 MarkerLineItem::MarkerLineItem(qreal sceneWidth, QGraphicsItem *parent)
     : QGraphicsObject(parent),
     _boundingRect(0, 0, sceneWidth, 1),
 MarkerLineItem::MarkerLineItem(qreal sceneWidth, QGraphicsItem *parent)
     : QGraphicsObject(parent),
     _boundingRect(0, 0, sceneWidth, 1),
-    _chatLine(0)
+    _chatLine(nullptr)
 {
     setVisible(false);
     setZValue(8);
 {
     setVisible(false);
     setZValue(8);
index 98f7b6a..516c0d2 100644 (file)
@@ -32,11 +32,11 @@ class MarkerLineItem : public QGraphicsObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    MarkerLineItem(qreal sceneWidth, QGraphicsItem *parent = 0);
+    MarkerLineItem(qreal sceneWidth, QGraphicsItem *parent = nullptr);
     virtual inline int type() const { return ChatScene::MarkerLineType; }
 
     inline QRectF boundingRect() const { return _boundingRect; }
     virtual inline int type() const { return ChatScene::MarkerLineType; }
 
     inline QRectF boundingRect() const { return _boundingRect; }
-    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
 
     inline ChatLine *chatLine() const { return _chatLine; }
 
 
     inline ChatLine *chatLine() const { return _chatLine; }
 
index c7c01d0..69b1ba2 100644 (file)
@@ -28,7 +28,7 @@ class MsgProcessorStatusWidget : public QWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    MsgProcessorStatusWidget(QWidget *parent = 0);
+    MsgProcessorStatusWidget(QWidget *parent = nullptr);
 
 public slots:
     void setProgress(int value, int max);
 
 public slots:
     void setProgress(int value, int max);
index dace390..f90a10f 100644 (file)
@@ -45,7 +45,7 @@ QDockWidget *NickListWidget::dock() const
     if (dock)
         return dock;
     else
     if (dock)
         return dock;
     else
-        return 0;
+        return nullptr;
 }
 
 
 }
 
 
@@ -174,9 +174,9 @@ void NickListWidget::rowsAboutToBeRemoved(const QModelIndex &parent, int start,
             iter = nickViews.erase(iter);
             ui.stackedWidget->removeWidget(nickView);
             QAbstractItemModel *model = nickView->model();
             iter = nickViews.erase(iter);
             ui.stackedWidget->removeWidget(nickView);
             QAbstractItemModel *model = nickView->model();
-            nickView->setModel(0);
+            nickView->setModel(nullptr);
             if (QSortFilterProxyModel *filter = qobject_cast<QSortFilterProxyModel *>(model))
             if (QSortFilterProxyModel *filter = qobject_cast<QSortFilterProxyModel *>(model))
-                filter->setSourceModel(0);
+                filter->setSourceModel(nullptr);
             model->deleteLater();
             nickView->deleteLater();
         }
             model->deleteLater();
             nickView->deleteLater();
         }
@@ -203,9 +203,9 @@ void NickListWidget::removeBuffer(BufferId bufferId)
     NickView *view = nickViews.take(bufferId);
     ui.stackedWidget->removeWidget(view);
     QAbstractItemModel *model = view->model();
     NickView *view = nickViews.take(bufferId);
     ui.stackedWidget->removeWidget(view);
     QAbstractItemModel *model = view->model();
-    view->setModel(0);
+    view->setModel(nullptr);
     if (QSortFilterProxyModel *filter = qobject_cast<QSortFilterProxyModel *>(model))
     if (QSortFilterProxyModel *filter = qobject_cast<QSortFilterProxyModel *>(model))
-        filter->setSourceModel(0);
+        filter->setSourceModel(nullptr);
     model->deleteLater();
     view->deleteLater();
 }
     model->deleteLater();
     view->deleteLater();
 }
@@ -243,7 +243,7 @@ NickListDock::NickListDock(const QString &title, QWidget *parent)
 
 void NickListDock::setLocked(bool locked) {
     if (locked) {
 
 void NickListDock::setLocked(bool locked) {
     if (locked) {
-        setFeatures(0);
+        setFeatures(nullptr);
     }
     else {
         setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
     }
     else {
         setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
index f6ed3dc..a4e5ecb 100644 (file)
@@ -39,7 +39,7 @@ class NickListWidget : public AbstractItemView
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NickListWidget(QWidget *parent = 0);
+    NickListWidget(QWidget *parent = nullptr);
 
 public slots:
     void showWidget(bool visible);
 
 public slots:
     void showWidget(bool visible);
@@ -77,7 +77,7 @@ class NickListDock : public QDockWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NickListDock(const QString &title, QWidget *parent = 0);
+    NickListDock(const QString &title, QWidget *parent = nullptr);
     // ~NickListDock();
 
     void setLocked(bool locked);
     // ~NickListDock();
 
     void setLocked(bool locked);
index eb614bf..909791f 100644 (file)
@@ -34,7 +34,7 @@ class QtMultimediaNotificationBackend : public AbstractNotificationBackend
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    QtMultimediaNotificationBackend(QObject *parent = 0);
+    QtMultimediaNotificationBackend(QObject *parent = nullptr);
 
     void notify(const Notification &) override;
     void close(uint notificationId) override;
 
     void notify(const Notification &) override;
     void close(uint notificationId) override;
@@ -58,7 +58,7 @@ class QtMultimediaNotificationBackend::ConfigWidget : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ConfigWidget(QWidget *parent = 0);
+    ConfigWidget(QWidget *parent = nullptr);
 
     void save() override;
     void load() override;
 
     void save() override;
     void load() override;
index 94549e5..80bf7f4 100644 (file)
@@ -29,7 +29,7 @@ class QtUiStyle : public UiStyle
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    QtUiStyle(QObject *parent = 0);
+    QtUiStyle(QObject *parent = nullptr);
     virtual ~QtUiStyle();
 
     virtual inline qreal firstColumnSeparator() const { return 6; }
     virtual ~QtUiStyle();
 
     virtual inline qreal firstColumnSeparator() const { return 6; }
index e71fff2..512dba1 100644 (file)
@@ -30,7 +30,7 @@ class ReceiveFileDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ReceiveFileDlg(const Transfer *transfer, QWidget *parent = 0);
+    ReceiveFileDlg(const Transfer *transfer, QWidget *parent = nullptr);
 
 private slots:
     void on_buttonBox_clicked(QAbstractButton *button);
 
 private slots:
     void on_buttonBox_clicked(QAbstractButton *button);
index 5e9ea6e..13100af 100644 (file)
@@ -28,7 +28,7 @@
 
 SettingsDlg::SettingsDlg(QWidget *parent)
     : QDialog(parent),
 
 SettingsDlg::SettingsDlg(QWidget *parent)
     : QDialog(parent),
-    _currentPage(0)
+    _currentPage(nullptr)
 {
     ui.setupUi(this);
     setModal(true);
 {
     ui.setupUi(this);
     setModal(true);
@@ -107,7 +107,7 @@ void SettingsDlg::registerSettingsPage(SettingsPage *sp)
 void SettingsDlg::selectPage(SettingsPage *sp)
 {
     if (!sp) {
 void SettingsDlg::selectPage(SettingsPage *sp)
 {
     if (!sp) {
-        _currentPage = 0;
+        _currentPage = nullptr;
         ui.settingsStack->setCurrentIndex(0);
         ui.pageTitle->setText(tr("Settings"));
         return;
         ui.settingsStack->setCurrentIndex(0);
         ui.pageTitle->setText(tr("Settings"));
         return;
@@ -118,7 +118,7 @@ void SettingsDlg::selectPage(SettingsPage *sp)
         pageIsLoaded[sp] = true;
     }
 
         pageIsLoaded[sp] = true;
     }
 
-    if (sp != currentPage() && currentPage() != 0 && currentPage()->hasChanged()) {
+    if (sp != currentPage() && currentPage() != nullptr && currentPage()->hasChanged()) {
         int ret = QMessageBox::warning(this, tr("Save changes"),
             tr("There are unsaved changes on the current configuration page. Would you like to apply your changes now?"),
             QMessageBox::Discard|QMessageBox::Save|QMessageBox::Cancel, QMessageBox::Cancel);
         int ret = QMessageBox::warning(this, tr("Save changes"),
             tr("There are unsaved changes on the current configuration page. Would you like to apply your changes now?"),
             QMessageBox::Discard|QMessageBox::Save|QMessageBox::Cancel, QMessageBox::Cancel);
@@ -151,7 +151,7 @@ void SettingsDlg::selectPage(SettingsPage *sp)
 void SettingsDlg::itemSelected()
 {
     QList<QTreeWidgetItem *> items = ui.settingsTree->selectedItems();
 void SettingsDlg::itemSelected()
 {
     QList<QTreeWidgetItem *> items = ui.settingsTree->selectedItems();
-    SettingsPage *sp = 0;
+    SettingsPage *sp = nullptr;
     if (!items.isEmpty()) {
         sp = qobject_cast<SettingsPage *>(items[0]->data(0, SettingsPageRole).value<QObject *>());
     }
     if (!items.isEmpty()) {
         sp = qobject_cast<SettingsPage *>(items[0]->data(0, SettingsPageRole).value<QObject *>());
     }
index dcebaf1..483855b 100644 (file)
@@ -32,7 +32,7 @@ class SettingsDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SettingsDlg(QWidget *parent = 0);
+    SettingsDlg(QWidget *parent = nullptr);
     void registerSettingsPage(SettingsPage *);
     void unregisterSettingsPage(SettingsPage *);
 
     void registerSettingsPage(SettingsPage *);
     void unregisterSettingsPage(SettingsPage *);
 
index d4cc744..7f91071 100644 (file)
@@ -31,7 +31,7 @@ class SettingsPageDlg : public QDialog
 {
     Q_OBJECT
 public:
 {
     Q_OBJECT
 public:
-    SettingsPageDlg(SettingsPage *page, QWidget *parent = 0);
+    SettingsPageDlg(SettingsPage *page, QWidget *parent = nullptr);
 
     SettingsPage *currentPage() const;
 
 
     SettingsPage *currentPage() const;
 
index d70c63a..61e6821 100644 (file)
@@ -31,7 +31,7 @@ class AliasesModel : public QAbstractItemModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AliasesModel(QObject *parent = 0);
+    AliasesModel(QObject *parent = nullptr);
 
     virtual QVariant data(const QModelIndex &index, int role) const;
     virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
 
     virtual QVariant data(const QModelIndex &index, int role) const;
     virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
index 21892b7..0062134 100644 (file)
@@ -31,7 +31,7 @@ class AliasesSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AliasesSettingsPage(QWidget *parent = 0);
+    AliasesSettingsPage(QWidget *parent = nullptr);
 
     virtual inline bool hasDefaults() const { return true; }
     virtual inline bool needsCoreConnection() const { return true; }
 
     virtual inline bool hasDefaults() const { return true; }
     virtual inline bool needsCoreConnection() const { return true; }
index 825fc50..b2af522 100644 (file)
@@ -35,7 +35,7 @@ class AppearanceSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AppearanceSettingsPage(QWidget *parent = 0);
+    AppearanceSettingsPage(QWidget *parent = nullptr);
 
     inline bool hasDefaults() const { return true; }
 
 
     inline bool hasDefaults() const { return true; }
 
index 407d11e..17c98f0 100644 (file)
@@ -31,7 +31,7 @@ class BacklogSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    BacklogSettingsPage(QWidget *parent = 0);
+    BacklogSettingsPage(QWidget *parent = nullptr);
 
     inline QString settingsKey() const { return "Backlog"; }
     bool hasDefaults() const;
 
     inline QString settingsKey() const { return "Backlog"; }
     bool hasDefaults() const;
index fff7b1e..7323697 100644 (file)
@@ -284,7 +284,7 @@ BufferViewConfig *BufferViewSettingsPage::bufferView(int listPos)
         return qobject_cast<BufferViewConfig *>(obj);
     }
     else {
         return qobject_cast<BufferViewConfig *>(obj);
     }
     else {
-        return 0;
+        return nullptr;
     }
 }
 
     }
 }
 
index 402c823..aa1ad5f 100644 (file)
@@ -33,7 +33,7 @@ class BufferViewSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    BufferViewSettingsPage(QWidget *parent = 0);
+    BufferViewSettingsPage(QWidget *parent = nullptr);
     ~BufferViewSettingsPage();
 
 public slots:
     ~BufferViewSettingsPage();
 
 public slots:
@@ -94,7 +94,7 @@ class BufferViewEditDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    BufferViewEditDlg(const QString &old, const QStringList &existing = QStringList(), QWidget *parent = 0);
+    BufferViewEditDlg(const QString &old, const QStringList &existing = QStringList(), QWidget *parent = nullptr);
 
     inline QString bufferViewName() const { return ui.bufferViewEdit->text(); }
 
 
     inline QString bufferViewName() const { return ui.bufferViewEdit->text(); }
 
index e6f0435..f62462c 100644 (file)
@@ -238,8 +238,8 @@ void ChatMonitorSettingsPage::toggleBuffers(BufferView *inView, BufferViewConfig
       This can probably be removed whenever BufferViewConfig::bulkAdd or something
       like that is available.
     */
       This can probably be removed whenever BufferViewConfig::bulkAdd or something
       like that is available.
     */
-    qobject_cast<BufferViewFilter *>(outView->model())->setConfig(0);
-    qobject_cast<BufferViewFilter *>(inView->model())->setConfig(0);
+    qobject_cast<BufferViewFilter *>(outView->model())->setConfig(nullptr);
+    qobject_cast<BufferViewFilter *>(inView->model())->setConfig(nullptr);
 
     // actually move the ids
     foreach(QList<BufferId> list, selectedBuffers) {
 
     // actually move the ids
     foreach(QList<BufferId> list, selectedBuffers) {
index ceaad1e..8324e32 100644 (file)
@@ -33,7 +33,7 @@ class ChatMonitorSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ChatMonitorSettingsPage(QWidget *parent = 0);
+    ChatMonitorSettingsPage(QWidget *parent = nullptr);
     bool hasDefaults() const;
 
 public slots:
     bool hasDefaults() const;
 
 public slots:
index b230e01..f9e2993 100644 (file)
@@ -35,7 +35,7 @@ public:
      *
      * @param parent Parent QWidget object, such as the settings dialog
      */
      *
      * @param parent Parent QWidget object, such as the settings dialog
      */
-    explicit ChatViewColorSettingsPage(QWidget *parent = 0);
+    explicit ChatViewColorSettingsPage(QWidget *parent = nullptr);
 
     /**
      * Gets whether or not this settings page has defaults
 
     /**
      * Gets whether or not this settings page has defaults
index a47db0e..6a1b7af 100644 (file)
@@ -31,7 +31,7 @@ class ChatViewSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ChatViewSettingsPage(QWidget *parent = 0);
+    ChatViewSettingsPage(QWidget *parent = nullptr);
 
     inline bool hasDefaults() const { return true; }
 
 
     inline bool hasDefaults() const { return true; }
 
index a697bfb..4582f3f 100644 (file)
@@ -31,7 +31,7 @@ class ConnectionSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ConnectionSettingsPage(QWidget *parent = 0);
+    ConnectionSettingsPage(QWidget *parent = nullptr);
 
     bool hasDefaults() const;
     bool needsCoreConnection() const { return true; }
 
     bool hasDefaults() const;
     bool needsCoreConnection() const { return true; }
index 2413f45..7570df3 100644 (file)
@@ -39,7 +39,7 @@ class CoreAccountSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreAccountSettingsPage(QWidget *parent = 0);
+    CoreAccountSettingsPage(QWidget *parent = nullptr);
 
     inline bool hasDefaults() const { return false; }
     inline bool isStandAlone() const { return _standalone; }
 
     inline bool hasDefaults() const { return false; }
     inline bool isStandAlone() const { return _standalone; }
@@ -95,7 +95,7 @@ class CoreAccountEditDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreAccountEditDlg(const CoreAccount &account, QWidget *parent = 0);
+    CoreAccountEditDlg(const CoreAccount &account, QWidget *parent = nullptr);
 
     CoreAccount account();
 
 
     CoreAccount account();
 
@@ -124,7 +124,7 @@ class FilteredCoreAccountModel : public QSortFilterProxyModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    FilteredCoreAccountModel(CoreAccountModel *model, QObject *parent = 0);
+    FilteredCoreAccountModel(CoreAccountModel *model, QObject *parent = nullptr);
 
 protected:
     virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
 
 protected:
     virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
index 9fd213e..f9df696 100644 (file)
@@ -31,7 +31,7 @@ class CoreConnectionSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CoreConnectionSettingsPage(QWidget *parent = 0);
+    CoreConnectionSettingsPage(QWidget *parent = nullptr);
 
     inline bool hasDefaults() const { return true; }
 
 
     inline bool hasDefaults() const { return true; }
 
index 829c877..70d792e 100644 (file)
@@ -46,7 +46,7 @@ bool DccSettingsPage::isClientConfigValid() const
 void DccSettingsPage::setClientConfig(DccConfig *config)
 {
     if (_clientConfig) {
 void DccSettingsPage::setClientConfig(DccConfig *config)
 {
     if (_clientConfig) {
-        disconnect(_clientConfig, 0, this, 0);
+        disconnect(_clientConfig, nullptr, this, nullptr);
     }
     if (config && !isClientConfigValid()) {
         qWarning() << "Client DCC config is not valid/synchronized!";
     }
     if (config && !isClientConfigValid()) {
         qWarning() << "Client DCC config is not valid/synchronized!";
index 57c0123..6899c36 100644 (file)
@@ -32,7 +32,7 @@ class HighlightSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    HighlightSettingsPage(QWidget *parent = 0);
+    HighlightSettingsPage(QWidget *parent = nullptr);
 
     bool hasDefaults() const;
 
 
     bool hasDefaults() const;
 
index cf5ebc1..71e48cf 100644 (file)
@@ -303,13 +303,13 @@ void IdentitiesSettingsPage::removeIdentity(Identity *id)
 
 void IdentitiesSettingsPage::on_identityList_currentIndexChanged(int index)
 {
 
 void IdentitiesSettingsPage::on_identityList_currentIndexChanged(int index)
 {
-    CertIdentity *previousIdentity = 0;
+    CertIdentity *previousIdentity = nullptr;
     if (currentId != 0 && identities.contains(currentId))
         previousIdentity = identities[currentId];
 
     if (index < 0) {
         //ui.identityList->setEditable(false);
     if (currentId != 0 && identities.contains(currentId))
         previousIdentity = identities[currentId];
 
     if (index < 0) {
         //ui.identityList->setEditable(false);
-        ui.identityEditor->displayIdentity(0, previousIdentity);
+        ui.identityEditor->displayIdentity(nullptr, previousIdentity);
         currentId = 0;
     }
     else {
         currentId = 0;
     }
     else {
index 84091ea..e931d70 100644 (file)
@@ -36,7 +36,7 @@ class IdentitiesSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IdentitiesSettingsPage(QWidget *parent = 0);
+    IdentitiesSettingsPage(QWidget *parent = nullptr);
 
     virtual inline bool needsCoreConnection() const { return true; }
 
 
     virtual inline bool needsCoreConnection() const { return true; }
 
@@ -98,7 +98,7 @@ class CreateIdentityDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent = 0);
+    CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent = nullptr);
 
     QString identityName() const;
     IdentityId duplicateId() const;
 
     QString identityName() const;
     IdentityId duplicateId() const;
@@ -116,7 +116,7 @@ class SaveIdentitiesDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SaveIdentitiesDlg(const QList<CertIdentity *> &toCreate, const QList<CertIdentity *> &toUpdate, const QList<IdentityId> &toRemove, QWidget *parent = 0);
+    SaveIdentitiesDlg(const QList<CertIdentity *> &toCreate, const QList<CertIdentity *> &toUpdate, const QList<IdentityId> &toRemove, QWidget *parent = nullptr);
 
 private slots:
     void clientEvent();
 
 private slots:
     void clientEvent();
index e0927bf..1d36987 100644 (file)
@@ -36,7 +36,7 @@ class IdentityEditWidget : public QWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IdentityEditWidget(QWidget *parent = 0);
+    IdentityEditWidget(QWidget *parent = nullptr);
 
     enum SslState {
         NoSsl,
 
     enum SslState {
         NoSsl,
@@ -44,7 +44,7 @@ public:
         AllowSsl
     };
 
         AllowSsl
     };
 
-    void displayIdentity(CertIdentity *id, CertIdentity *saveId = 0);
+    void displayIdentity(CertIdentity *id, CertIdentity *saveId = nullptr);
     void saveToIdentity(CertIdentity *id);
 
 public slots:
     void saveToIdentity(CertIdentity *id);
 
 public slots:
@@ -98,7 +98,7 @@ class NickEditDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NickEditDlg(const QString &oldnick, const QStringList &existing = QStringList(), QWidget *parent = 0);
+    NickEditDlg(const QString &oldnick, const QStringList &existing = QStringList(), QWidget *parent = nullptr);
 
     QString nick() const;
 
 
     QString nick() const;
 
index 01ca816..f788fd4 100644 (file)
@@ -31,7 +31,7 @@ class IgnoreListModel : public QAbstractItemModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IgnoreListModel(QObject *parent = 0);
+    IgnoreListModel(QObject *parent = nullptr);
 
     virtual QVariant data(const QModelIndex &index, int role) const;
     virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
 
     virtual QVariant data(const QModelIndex &index, int role) const;
     virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
index 172ea3b..66a3205 100644 (file)
@@ -40,7 +40,7 @@ class IgnoreListDelegate : public QStyledItemDelegate
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IgnoreListDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
+    IgnoreListDelegate(QWidget *parent = nullptr) : QStyledItemDelegate(parent) {}
     void paint(QPainter *painter, const QStyleOptionViewItem &option,
         const QModelIndex &index) const;
     bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option,
     void paint(QPainter *painter, const QStyleOptionViewItem &option,
         const QModelIndex &index) const;
     bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option,
@@ -53,7 +53,7 @@ class IgnoreListEditDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IgnoreListEditDlg(const IgnoreListManager::IgnoreListItem &item, QWidget *parent = 0, bool enabled = false);
+    IgnoreListEditDlg(const IgnoreListManager::IgnoreListItem &item, QWidget *parent = nullptr, bool enabled = false);
     inline IgnoreListManager::IgnoreListItem ignoreListItem() { return _ignoreListItem; }
     void enableOkButton(bool state);
 
     inline IgnoreListManager::IgnoreListItem ignoreListItem() { return _ignoreListItem; }
     void enableOkButton(bool state);
 
@@ -77,7 +77,7 @@ class IgnoreListSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    IgnoreListSettingsPage(QWidget *parent = 0);
+    IgnoreListSettingsPage(QWidget *parent = nullptr);
     ~IgnoreListSettingsPage();
     virtual inline bool hasDefaults() const { return false; }
     virtual inline bool needsCoreConnection() const { return true; }
     ~IgnoreListSettingsPage();
     virtual inline bool hasDefaults() const { return false; }
     virtual inline bool needsCoreConnection() const { return true; }
index 10e10da..7554820 100644 (file)
@@ -29,7 +29,7 @@ class InputWidgetSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    InputWidgetSettingsPage(QWidget *parent = 0);
+    InputWidgetSettingsPage(QWidget *parent = nullptr);
 
     inline bool hasDefaults() const { return true; }
 
 
     inline bool hasDefaults() const { return true; }
 
index 8cd584b..a8ef28d 100644 (file)
@@ -33,7 +33,7 @@ class ItemViewSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ItemViewSettingsPage(QWidget *parent = 0);
+    ItemViewSettingsPage(QWidget *parent = nullptr);
 
     inline bool hasDefaults() const { return true; }
 
 
     inline bool hasDefaults() const { return true; }
 
index e65302f..9e742c2 100644 (file)
@@ -163,7 +163,7 @@ void KeySequenceButton::keyReleaseEvent(QKeyEvent *e)
 
 KeySequenceWidget::KeySequenceWidget(QWidget *parent)
     : QWidget(parent),
 
 KeySequenceWidget::KeySequenceWidget(QWidget *parent)
     : QWidget(parent),
-    _shortcutsModel(0),
+    _shortcutsModel(nullptr),
     _isRecording(false),
     _modifierKeys(0)
 {
     _isRecording(false),
     _modifierKeys(0)
 {
index 1e58f75..5382ac9 100644 (file)
@@ -44,7 +44,7 @@ class KeySequenceWidget : public QWidget
 {
     Q_OBJECT
 public:
 {
     Q_OBJECT
 public:
-    KeySequenceWidget(QWidget *parent = 0);
+    KeySequenceWidget(QWidget *parent = nullptr);
 
     void setModel(ShortcutsModel *model);
 
 
     void setModel(ShortcutsModel *model);
 
@@ -95,7 +95,7 @@ class KeySequenceButton : public QPushButton
 {
     Q_OBJECT
 public:
 {
     Q_OBJECT
 public:
-    explicit KeySequenceButton(KeySequenceWidget *d, QWidget *parent = 0);
+    explicit KeySequenceButton(KeySequenceWidget *d, QWidget *parent = nullptr);
 
 protected:
     virtual bool event(QEvent *event);
 
 protected:
     virtual bool event(QEvent *event);
index 57d8ca0..478acd1 100644 (file)
@@ -40,7 +40,7 @@
 NetworksSettingsPage::NetworksSettingsPage(QWidget *parent)
     : SettingsPage(tr("IRC"), tr("Networks"), parent)
 #ifdef HAVE_SSL
 NetworksSettingsPage::NetworksSettingsPage(QWidget *parent)
     : SettingsPage(tr("IRC"), tr("Networks"), parent)
 #ifdef HAVE_SSL
-      , _cid(0)
+      , _cid(nullptr)
 #endif
 {
     ui.setupUi(this);
 #endif
 {
     ui.setupUi(this);
@@ -474,7 +474,7 @@ QListWidgetItem *NetworksSettingsPage::networkItem(NetworkId id) const
         QListWidgetItem *item = ui.networkList->item(i);
         if (item->data(Qt::UserRole).value<NetworkId>() == id) return item;
     }
         QListWidgetItem *item = ui.networkList->item(i);
         if (item->data(Qt::UserRole).value<NetworkId>() == id) return item;
     }
-    return 0;
+    return nullptr;
 }
 
 
 }
 
 
@@ -558,7 +558,7 @@ QListWidgetItem *NetworksSettingsPage::insertNetwork(NetworkId id)
 
 QListWidgetItem *NetworksSettingsPage::insertNetwork(const NetworkInfo &info)
 {
 
 QListWidgetItem *NetworksSettingsPage::insertNetwork(const NetworkInfo &info)
 {
-    QListWidgetItem *item = 0;
+    QListWidgetItem *item = nullptr;
     QList<QListWidgetItem *> items = ui.networkList->findItems(info.networkName, Qt::MatchExactly);
     if (!items.count()) item = new QListWidgetItem(disconnectedIcon, info.networkName, ui.networkList);
     else {
     QList<QListWidgetItem *> items = ui.networkList->findItems(info.networkName, Qt::MatchExactly);
     if (!items.count()) item = new QListWidgetItem(disconnectedIcon, info.networkName, ui.networkList);
     else {
index 1e32ccd..c1696ad 100644 (file)
@@ -38,7 +38,7 @@ class NetworksSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NetworksSettingsPage(QWidget *parent = 0);
+    NetworksSettingsPage(QWidget *parent = nullptr);
 
     virtual inline bool needsCoreConnection() const { return true; }
 
 
     virtual inline bool needsCoreConnection() const { return true; }
 
@@ -57,7 +57,7 @@ private slots:
     void networkConnectionError(const QString &msg);
 
     void displayNetwork(NetworkId);
     void networkConnectionError(const QString &msg);
 
     void displayNetwork(NetworkId);
-    void setItemState(NetworkId, QListWidgetItem *item = 0);
+    void setItemState(NetworkId, QListWidgetItem *item = nullptr);
 
     /**
      * Reset the capability-dependent settings to the default unknown states
 
     /**
      * Reset the capability-dependent settings to the default unknown states
@@ -166,7 +166,7 @@ class NetworkAddDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NetworkAddDlg(const QStringList &existing = QStringList(), QWidget *parent = 0);
+    NetworkAddDlg(const QStringList &existing = QStringList(), QWidget *parent = nullptr);
 
     NetworkInfo networkInfo() const;
 
 
     NetworkInfo networkInfo() const;
 
@@ -195,7 +195,7 @@ class NetworkEditDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NetworkEditDlg(const QString &old, const QStringList &existing = QStringList(), QWidget *parent = 0);
+    NetworkEditDlg(const QString &old, const QStringList &existing = QStringList(), QWidget *parent = nullptr);
 
     QString networkName() const;
 
 
     QString networkName() const;
 
@@ -214,7 +214,7 @@ class ServerEditDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ServerEditDlg(const Network::Server &server = Network::Server(), QWidget *parent = 0);
+    ServerEditDlg(const Network::Server &server = Network::Server(), QWidget *parent = nullptr);
 
     Network::Server serverData() const;
 
 
     Network::Server serverData() const;
 
@@ -241,7 +241,7 @@ class SaveNetworksDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SaveNetworksDlg(const QList<NetworkInfo> &toCreate, const QList<NetworkInfo> &toUpdate, const QList<NetworkId> &toRemove, QWidget *parent = 0);
+    SaveNetworksDlg(const QList<NetworkInfo> &toCreate, const QList<NetworkInfo> &toUpdate, const QList<NetworkId> &toRemove, QWidget *parent = nullptr);
 
 private slots:
     void clientEvent();
 
 private slots:
     void clientEvent();
index c30396e..7f899f6 100644 (file)
@@ -34,7 +34,7 @@ class NotificationsSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NotificationsSettingsPage(QWidget *parent = 0);
+    NotificationsSettingsPage(QWidget *parent = nullptr);
 
     bool hasDefaults() const;
 
 
     bool hasDefaults() const;
 
index 0d9873f..8516d2a 100644 (file)
@@ -28,7 +28,7 @@ class PreviewBufferView : public BufferView
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    PreviewBufferView(QWidget *parent = 0) : BufferView(parent) {}
+    PreviewBufferView(QWidget *parent = nullptr) : BufferView(parent) {}
 
 protected:
     virtual void keyPressEvent(QKeyEvent *event) { QTreeView::keyPressEvent(event); }
 
 protected:
     virtual void keyPressEvent(QKeyEvent *event) { QTreeView::keyPressEvent(event); }
index b3da741..a4a72da 100644 (file)
@@ -43,7 +43,7 @@ public:
         IsConfigurableRole
     };
 
         IsConfigurableRole
     };
 
-    ShortcutsModel(const QHash<QString, ActionCollection *> &actionCollections, QObject *parent = 0);
+    ShortcutsModel(const QHash<QString, ActionCollection *> &actionCollections, QObject *parent = nullptr);
     ~ShortcutsModel();
 
     QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
     ~ShortcutsModel();
 
     QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
@@ -80,7 +80,7 @@ signals:
 
 private:
     struct Item {
 
 private:
     struct Item {
-        inline Item() { parentItem = 0; collection = 0; action = 0; }
+        inline Item() { parentItem = nullptr; collection = nullptr; action = nullptr; }
         inline ~Item() { qDeleteAll(actionItems); }
         int row;
         Item *parentItem;
         inline ~Item() { qDeleteAll(actionItems); }
         int row;
         Item *parentItem;
index e6f27f8..13d8c09 100644 (file)
@@ -34,7 +34,7 @@ class ShortcutsFilter : public QSortFilterProxyModel
 {
     Q_OBJECT
 public:
 {
     Q_OBJECT
 public:
-    ShortcutsFilter(QObject *parent = 0);
+    ShortcutsFilter(QObject *parent = nullptr);
 
 public slots:
     void setFilterString(const QString &filterString);
 
 public slots:
     void setFilterString(const QString &filterString);
@@ -51,7 +51,7 @@ class ShortcutsSettingsPage : public SettingsPage
 {
     Q_OBJECT
 public:
 {
     Q_OBJECT
 public:
-    ShortcutsSettingsPage(const QHash<QString, ActionCollection *> &actionCollections, QWidget *parent = 0);
+    ShortcutsSettingsPage(const QHash<QString, ActionCollection *> &actionCollections, QWidget *parent = nullptr);
 
     inline bool hasDefaults() const { return true; }
 
 
     inline bool hasDefaults() const { return true; }
 
index 3256a67..ef513ce 100644 (file)
@@ -30,7 +30,7 @@ class SonnetSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SonnetSettingsPage(QWidget *parent = 0);
+    SonnetSettingsPage(QWidget *parent = nullptr);
 
     bool hasDefaults() const;
 
 
     bool hasDefaults() const;
 
index dccb856..2748bc2 100644 (file)
@@ -29,7 +29,7 @@ class TopicWidgetSettingsPage : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    TopicWidgetSettingsPage(QWidget *parent = 0);
+    TopicWidgetSettingsPage(QWidget *parent = nullptr);
 
     inline bool hasDefaults() const { return true; }
 
 
     inline bool hasDefaults() const { return true; }
 
index b814013..72c9349 100644 (file)
@@ -30,7 +30,7 @@ class SimpleNetworkEditor : public QWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SimpleNetworkEditor(QWidget *parent = 0);
+    SimpleNetworkEditor(QWidget *parent = nullptr);
 
     void displayNetworkInfo(const NetworkInfo &networkInfo);
     void saveToNetworkInfo(NetworkInfo &networkInfo);
 
     void displayNetworkInfo(const NetworkInfo &networkInfo);
     void saveToNetworkInfo(NetworkInfo &networkInfo);
index 01129e9..a8a2acf 100644 (file)
@@ -37,7 +37,7 @@ class SslInfoDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SslInfoDlg(const QSslSocket *socket, QWidget *parent = 0);
+    SslInfoDlg(const QSslSocket *socket, QWidget *parent = nullptr);
     inline const QSslSocket *socket() const { return _socket; }
 
 private slots:
     inline const QSslSocket *socket() const { return _socket; }
 
 private slots:
index 64e6f9c..ca858b8 100644 (file)
@@ -31,7 +31,7 @@ class SystrayNotificationBackend : public AbstractNotificationBackend
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SystrayNotificationBackend(QObject *parent = 0);
+    SystrayNotificationBackend(QObject *parent = nullptr);
 
     void notify(const Notification &);
     void close(uint notificationId);
 
     void notify(const Notification &);
     void close(uint notificationId);
@@ -61,7 +61,7 @@ class SystrayNotificationBackend::ConfigWidget : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ConfigWidget(QWidget *parent = 0);
+    ConfigWidget(QWidget *parent = nullptr);
     void save();
     void load();
     bool hasDefaults() const;
     void save();
     void load();
     bool hasDefaults() const;
index e92948e..ca49ee9 100644 (file)
@@ -33,7 +33,7 @@ class TaskbarNotificationBackend : public AbstractNotificationBackend
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    TaskbarNotificationBackend(QObject *parent = 0);
+    TaskbarNotificationBackend(QObject *parent = nullptr);
 
     void notify(const Notification &);
     void close(uint notificationId);
 
     void notify(const Notification &);
     void close(uint notificationId);
@@ -56,7 +56,7 @@ class TaskbarNotificationBackend::ConfigWidget : public SettingsPage
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ConfigWidget(QWidget *parent = 0);
+    ConfigWidget(QWidget *parent = nullptr);
     void save();
     void load();
     bool hasDefaults() const;
     void save();
     void load();
     bool hasDefaults() const;
index d9b429c..f054ff5 100644 (file)
@@ -30,7 +30,7 @@ class TopicWidget : public AbstractItemView
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    TopicWidget(QWidget *parent = 0);
+    TopicWidget(QWidget *parent = nullptr);
 
     void setTopic(const QModelIndex &index);
     void setCustomFont(const QFont &);
 
     void setTopic(const QModelIndex &index);
     void setCustomFont(const QFont &);
index 50167f1..a480467 100644 (file)
@@ -95,7 +95,7 @@ void VerticalDock::setDefaultTitleWidget()
 void VerticalDock::showTitle(bool show)
 {
     QWidget *oldDockTitle = titleBarWidget();
 void VerticalDock::showTitle(bool show)
 {
     QWidget *oldDockTitle = titleBarWidget();
-    QWidget *newDockTitle = 0;
+    QWidget *newDockTitle = nullptr;
 
     if (show)
         newDockTitle = new VerticalDockTitle(this);
 
     if (show)
         newDockTitle = new VerticalDockTitle(this);
index b5bce9d..4194fa7 100644 (file)
@@ -59,8 +59,8 @@ class VerticalDock : public QDockWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    VerticalDock(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0);
-    VerticalDock(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+    VerticalDock(const QString &title, QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr);
+    VerticalDock(QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr);
 
     void showTitle(bool show);
     void setDefaultTitleWidget();
 
     void showTitle(bool show);
     void setDefaultTitleWidget();
index 37b5fa7..06c0488 100644 (file)
@@ -58,7 +58,7 @@ public:
 #endif
 
 WebPreviewItem::WebPreviewItem(const QUrl &url)
 #endif
 
 WebPreviewItem::WebPreviewItem(const QUrl &url)
-    : QGraphicsItem(0), // needs to be a top level item as we otherwise cannot guarantee that it's on top of other chatlines
+    : QGraphicsItem(nullptr), // needs to be a top level item as we otherwise cannot guarantee that it's on top of other chatlines
     _boundingRect(0, 0, 400, 300)
 {
     qreal frameWidth = 5;
     _boundingRect(0, 0, 400, 300)
 {
     qreal frameWidth = 5;
index 46f14e8..925d7d0 100644 (file)
@@ -29,7 +29,7 @@ class WebPreviewItem : public QGraphicsItem
 {
 public:
     WebPreviewItem(const QUrl &url);
 {
 public:
     WebPreviewItem(const QUrl &url);
-    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
     virtual inline QRectF boundingRect() const { return _boundingRect; }
 
 private:
     virtual inline QRectF boundingRect() const { return _boundingRect; }
 
 private:
index 793b293..c1076f8 100644 (file)
@@ -22,8 +22,8 @@
 
 AbstractItemView::AbstractItemView(QWidget *parent)
     : QWidget(parent),
 
 AbstractItemView::AbstractItemView(QWidget *parent)
     : QWidget(parent),
-    _model(0),
-    _selectionModel(0)
+    _model(nullptr),
+    _selectionModel(nullptr)
 {
 }
 
 {
 }
 
@@ -31,7 +31,7 @@ AbstractItemView::AbstractItemView(QWidget *parent)
 void AbstractItemView::setModel(QAbstractItemModel *model)
 {
     if (_model) {
 void AbstractItemView::setModel(QAbstractItemModel *model)
 {
     if (_model) {
-        disconnect(_model, 0, this, 0);
+        disconnect(_model, nullptr, this, nullptr);
     }
     _model = model;
     connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
     }
     _model = model;
     connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
@@ -46,7 +46,7 @@ void AbstractItemView::setModel(QAbstractItemModel *model)
 void AbstractItemView::setSelectionModel(QItemSelectionModel *selectionModel)
 {
     if (_selectionModel) {
 void AbstractItemView::setSelectionModel(QItemSelectionModel *selectionModel)
 {
     if (_selectionModel) {
-        disconnect(_selectionModel, 0, this, 0);
+        disconnect(_selectionModel, nullptr, this, nullptr);
     }
     _selectionModel = selectionModel;
     connect(selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
     }
     _selectionModel = selectionModel;
     connect(selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
index a981667..785f4ad 100644 (file)
@@ -35,7 +35,7 @@ class UISUPPORT_EXPORT AbstractItemView : public QWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    AbstractItemView(QWidget *parent = 0);
+    AbstractItemView(QWidget *parent = nullptr);
 
     inline QAbstractItemModel *model() { return _model; }
     void setModel(QAbstractItemModel *model);
 
     inline QAbstractItemModel *model() { return _model; }
     void setModel(QAbstractItemModel *model);
index ba03a24..8b580a2 100644 (file)
@@ -47,8 +47,8 @@ public :
     Q_DECLARE_FLAGS(ShortcutTypes, ShortcutType)
 
     explicit Action(QObject *parent);
     Q_DECLARE_FLAGS(ShortcutTypes, ShortcutType)
 
     explicit Action(QObject *parent);
-    Action(const QString &text, QObject *parent, const QObject *receiver = 0, const char *slot = 0, const QKeySequence &shortcut = 0);
-    Action(const QIcon &icon, const QString &text, QObject *parent, const QObject *receiver = 0, const char *slot = 0, const QKeySequence &shortcut = 0);
+    Action(const QString &text, QObject *parent, const QObject *receiver = nullptr, const char *slot = nullptr, const QKeySequence &shortcut = 0);
+    Action(const QIcon &icon, const QString &text, QObject *parent, const QObject *receiver = nullptr, const char *slot = nullptr, const QKeySequence &shortcut = 0);
 
     QKeySequence shortcut(ShortcutTypes types = ActiveShortcut) const;
     void setShortcut(const QShortcut &shortcut, ShortcutTypes type = ShortcutTypes(ActiveShortcut | DefaultShortcut));
 
     QKeySequence shortcut(ShortcutTypes types = ActiveShortcut) const;
     void setShortcut(const QShortcut &shortcut, ShortcutTypes type = ShortcutTypes(ActiveShortcut | DefaultShortcut));
index 8928053..a3aa6d6 100644 (file)
@@ -137,7 +137,7 @@ void ActionCollection::removeAction(QAction *action)
 QAction *ActionCollection::takeAction(QAction *action)
 {
     if (!unlistAction(action))
 QAction *ActionCollection::takeAction(QAction *action)
 {
     if (!unlistAction(action))
-        return 0;
+        return nullptr;
 
     foreach(QWidget *widget, _associatedWidgets) {
         widget->removeAction(action);
 
     foreach(QWidget *widget, _associatedWidgets) {
         widget->removeAction(action);
index a675fdd..5992eb8 100644 (file)
@@ -75,13 +75,13 @@ public:
 
     QAction *addAction(const QString &name, QAction *action);
     Action *addAction(const QString &name, Action *action);
 
     QAction *addAction(const QString &name, QAction *action);
     Action *addAction(const QString &name, Action *action);
-    Action *addAction(const QString &name, const QObject *receiver = 0, const char *member = 0);
+    Action *addAction(const QString &name, const QObject *receiver = nullptr, const char *member = nullptr);
     void removeAction(QAction *action);
     QAction *takeAction(QAction *action);
 
     /// Create new action under the given name, add it to the collection and connect its triggered(bool) signal to the specified receiver.
     template<class ActionType>
     void removeAction(QAction *action);
     QAction *takeAction(QAction *action);
 
     /// Create new action under the given name, add it to the collection and connect its triggered(bool) signal to the specified receiver.
     template<class ActionType>
-    ActionType *add(const QString &name, const QObject *receiver = 0, const char *member = 0)
+    ActionType *add(const QString &name, const QObject *receiver = nullptr, const char *member = nullptr)
     {
         ActionType *a = new ActionType(this);
         if (receiver && member)
     {
         ActionType *a = new ActionType(this);
         if (receiver && member)
index 60c8039..1ec9505 100644 (file)
@@ -30,7 +30,7 @@ class UISUPPORT_EXPORT BufferHotListFilter : public QSortFilterProxyModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    BufferHotListFilter(QAbstractItemModel *source, QObject *parent = 0);
+    BufferHotListFilter(QAbstractItemModel *source, QObject *parent = nullptr);
 
     virtual inline int columnCount(const QModelIndex &) const { return 1; }
     BufferId hottestBuffer();
 
     virtual inline int columnCount(const QModelIndex &) const { return 1; }
     BufferId hottestBuffer();
index 969107c..0925b50 100644 (file)
@@ -147,8 +147,8 @@ void BufferView::setFilteredModel(QAbstractItemModel *model_, BufferViewConfig *
     }
 
     if (model()) {
     }
 
     if (model()) {
-        disconnect(this, 0, model(), 0);
-        disconnect(model(), 0, this, 0);
+        disconnect(this, nullptr, model(), nullptr);
+        disconnect(model(), nullptr, this, nullptr);
     }
 
     if (!model_) {
     }
 
     if (!model_) {
@@ -169,7 +169,7 @@ void BufferView::setConfig(BufferViewConfig *config)
         return;
 
     if (_config) {
         return;
 
     if (_config) {
-        disconnect(_config, 0, this, 0);
+        disconnect(_config, nullptr, this, nullptr);
     }
 
     _config = config;
     }
 
     _config = config;
@@ -262,7 +262,7 @@ void BufferView::dropEvent(QDropEvent *event)
         return TreeViewTouch::dropEvent(event);
 
     // Confirm that the user really wants to merge the buffers before doing so
         return TreeViewTouch::dropEvent(event);
 
     // Confirm that the user really wants to merge the buffers before doing so
-    int res = QMessageBox::question(0, tr("Merge buffers permanently?"),
+    int res = QMessageBox::question(nullptr, tr("Merge buffers permanently?"),
         tr("Do you want to merge the buffer \"%1\" permanently into buffer \"%2\"?\n This cannot be reversed!").arg(Client::networkModel()->bufferName(bufferId2)).arg(Client::networkModel()->bufferName(bufferId1)),
         QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
     if (res == QMessageBox::Yes) {
         tr("Do you want to merge the buffer \"%1\" permanently into buffer \"%2\"?\n This cannot be reversed!").arg(Client::networkModel()->bufferName(bufferId2)).arg(Client::networkModel()->bufferName(bufferId1)),
         QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
     if (res == QMessageBox::Yes) {
@@ -734,7 +734,7 @@ bool BufferViewDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, c
 // ==============================
 BufferViewDock::BufferViewDock(BufferViewConfig *config, QWidget *parent)
     : QDockWidget(parent),
 // ==============================
 BufferViewDock::BufferViewDock(BufferViewConfig *config, QWidget *parent)
     : QDockWidget(parent),
-    _childWidget(0),
+    _childWidget(nullptr),
     _widget(new QWidget(parent)),
     _filterEdit(new QLineEdit(parent)),
     _active(false),
     _widget(new QWidget(parent)),
     _filterEdit(new QLineEdit(parent)),
     _active(false),
@@ -764,7 +764,7 @@ BufferViewDock::BufferViewDock(BufferViewConfig *config, QWidget *parent)
 
 void BufferViewDock::setLocked(bool locked) {
     if (locked) {
 
 void BufferViewDock::setLocked(bool locked) {
     if (locked) {
-        setFeatures(0);
+        setFeatures(nullptr);
     }
     else {
         setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
     }
     else {
         setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
@@ -791,7 +791,7 @@ void BufferViewDock::onFilterReturnPressed()
 {
     if (_oldFocusItem) {
         _oldFocusItem->setFocus();
 {
     if (_oldFocusItem) {
         _oldFocusItem->setFocus();
-        _oldFocusItem = 0;
+        _oldFocusItem = nullptr;
     }
 
     if (!config()->showSearch()) {
     }
 
     if (!config()->showSearch()) {
@@ -894,7 +894,7 @@ BufferViewConfig *BufferViewDock::config() const
 {
     BufferView *view = bufferView();
     if (!view)
 {
     BufferView *view = bufferView();
     if (!view)
-        return 0;
+        return nullptr;
     else
         return view->config();
 }
     else
         return view->config();
 }
index 52210ca..52d4ffa 100644 (file)
@@ -48,7 +48,7 @@ public:
         Backward = -1
     };
 
         Backward = -1
     };
 
-    BufferView(QWidget *parent = 0);
+    BufferView(QWidget *parent = nullptr);
     void init();
 
     void setModel(QAbstractItemModel *model);
     void init();
 
     void setModel(QAbstractItemModel *model);
@@ -145,7 +145,7 @@ class BufferViewDelegate : public QStyledItemDelegate
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    BufferViewDelegate(QObject *parent = 0);
+    BufferViewDelegate(QObject *parent = nullptr);
     bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override;
 
     void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
     bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override;
 
     void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
index a73b091..51d9864 100644 (file)
@@ -39,7 +39,7 @@
 *****************************************/
 BufferViewFilter::BufferViewFilter(QAbstractItemModel *model, BufferViewConfig *config)
     : QSortFilterProxyModel(model),
 *****************************************/
 BufferViewFilter::BufferViewFilter(QAbstractItemModel *model, BufferViewConfig *config)
     : QSortFilterProxyModel(model),
-    _config(0),
+    _config(nullptr),
     _sortOrder(Qt::AscendingOrder),
     _showServerQueries(false),
     _editMode(false),
     _sortOrder(Qt::AscendingOrder),
     _showServerQueries(false),
     _editMode(false),
@@ -68,7 +68,7 @@ void BufferViewFilter::setConfig(BufferViewConfig *config)
         return;
 
     if (_config) {
         return;
 
     if (_config) {
-        disconnect(_config, 0, this, 0);
+        disconnect(_config, nullptr, this, nullptr);
     }
 
     _config = config;
     }
 
     _config = config;
index f53662a..69f8928 100644 (file)
@@ -52,7 +52,7 @@ public:
     };
     Q_DECLARE_FLAGS(Modes, Mode)
 
     };
     Q_DECLARE_FLAGS(Modes, Mode)
 
-    BufferViewFilter(QAbstractItemModel *model, BufferViewConfig *config = 0);
+    BufferViewFilter(QAbstractItemModel *model, BufferViewConfig *config = nullptr);
 
     virtual Qt::ItemFlags flags(const QModelIndex &index) const;
     virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
 
     virtual Qt::ItemFlags flags(const QModelIndex &index) const;
     virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
index bf97898..e01a0be 100644 (file)
@@ -26,7 +26,7 @@
 
 BufferViewOverlayFilter::BufferViewOverlayFilter(QAbstractItemModel *model, BufferViewOverlay *overlay)
     : QSortFilterProxyModel(model),
 
 BufferViewOverlayFilter::BufferViewOverlayFilter(QAbstractItemModel *model, BufferViewOverlay *overlay)
     : QSortFilterProxyModel(model),
-    _overlay(0)
+    _overlay(nullptr)
 {
     setOverlay(overlay);
     setSourceModel(model);
 {
     setOverlay(overlay);
     setSourceModel(model);
@@ -41,7 +41,7 @@ void BufferViewOverlayFilter::setOverlay(BufferViewOverlay *overlay)
         return;
 
     if (_overlay) {
         return;
 
     if (_overlay) {
-        disconnect(_overlay, 0, this, 0);
+        disconnect(_overlay, nullptr, this, nullptr);
     }
 
     _overlay = overlay;
     }
 
     _overlay = overlay;
@@ -59,7 +59,7 @@ void BufferViewOverlayFilter::setOverlay(BufferViewOverlay *overlay)
 
 void BufferViewOverlayFilter::overlayDestroyed()
 {
 
 void BufferViewOverlayFilter::overlayDestroyed()
 {
-    setOverlay(0);
+    setOverlay(nullptr);
 }
 
 
 }
 
 
index 2b43bf9..721d6cc 100644 (file)
@@ -33,7 +33,7 @@ class UISUPPORT_EXPORT BufferViewOverlayFilter : public QSortFilterProxyModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    BufferViewOverlayFilter(QAbstractItemModel *model, BufferViewOverlay *overlay = 0);
+    BufferViewOverlayFilter(QAbstractItemModel *model, BufferViewOverlay *overlay = nullptr);
 
     void setOverlay(BufferViewOverlay *overlay);
 
 
     void setOverlay(BufferViewOverlay *overlay);
 
index 5369222..7c01a40 100644 (file)
@@ -31,7 +31,7 @@ class UISUPPORT_EXPORT ClearableLineEdit : public QLineEdit
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ClearableLineEdit(QWidget *parent = 0);
+    ClearableLineEdit(QWidget *parent = nullptr);
 
 protected:
     void resizeEvent(QResizeEvent *event);
 
 protected:
     void resizeEvent(QResizeEvent *event);
index 0bd2032..c68fde2 100644 (file)
@@ -29,7 +29,7 @@ class UISUPPORT_EXPORT ClickableLabel : public QLabel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ClickableLabel(QWidget *parent = 0);
+    ClickableLabel(QWidget *parent = nullptr);
 
 signals:
     void clicked();
 
 signals:
     void clicked();
index 48811f6..852717d 100644 (file)
@@ -30,8 +30,8 @@ class UISUPPORT_EXPORT ColorButton : public QToolButton
     Q_PROPERTY(QColor color READ color WRITE setColor USER true)
 
 public :
     Q_PROPERTY(QColor color READ color WRITE setColor USER true)
 
 public :
-    explicit ColorButton(QWidget *parent = 0);
-    explicit ColorButton(const QColor &c, QWidget *parent = 0);
+    explicit ColorButton(QWidget *parent = nullptr);
+    explicit ColorButton(const QColor &c, QWidget *parent = nullptr);
 
     void setColor(const QColor &color);
     QColor color() const;
 
     void setColor(const QColor &color);
     QColor color() const;
index 3bd7b3d..6ef3868 100644 (file)
@@ -105,7 +105,7 @@ ContextMenuActionProvider::ContextMenuActionProvider(QObject *parent) : NetworkM
     hideEventsMenu->addSeparator();
     hideEventsMenu->addAction(action(HideApplyToAll));
     hideEventsMenu->addAction(action(HideUseDefaults));
     hideEventsMenu->addSeparator();
     hideEventsMenu->addAction(action(HideApplyToAll));
     hideEventsMenu->addAction(action(HideUseDefaults));
-    _hideEventsMenuAction = new Action(tr("Hide Events"), 0);
+    _hideEventsMenuAction = new Action(tr("Hide Events"), nullptr);
     _hideEventsMenuAction->setMenu(hideEventsMenu);
 
     QMenu *nickCtcpMenu = new QMenu();
     _hideEventsMenuAction->setMenu(hideEventsMenu);
 
     QMenu *nickCtcpMenu = new QMenu();
@@ -113,7 +113,7 @@ ContextMenuActionProvider::ContextMenuActionProvider(QObject *parent) : NetworkM
     nickCtcpMenu->addAction(action(NickCtcpVersion));
     nickCtcpMenu->addAction(action(NickCtcpTime));
     nickCtcpMenu->addAction(action(NickCtcpClientinfo));
     nickCtcpMenu->addAction(action(NickCtcpVersion));
     nickCtcpMenu->addAction(action(NickCtcpTime));
     nickCtcpMenu->addAction(action(NickCtcpClientinfo));
-    _nickCtcpMenuAction = new Action(tr("CTCP"), 0);
+    _nickCtcpMenuAction = new Action(tr("CTCP"), nullptr);
     _nickCtcpMenuAction->setMenu(nickCtcpMenu);
 
     QMenu *nickModeMenu = new QMenu();
     _nickCtcpMenuAction->setMenu(nickCtcpMenu);
 
     QMenu *nickModeMenu = new QMenu();
@@ -128,11 +128,11 @@ ContextMenuActionProvider::ContextMenuActionProvider(QObject *parent) : NetworkM
     nickModeMenu->addAction(action(NickKick));
     nickModeMenu->addAction(action(NickBan));
     nickModeMenu->addAction(action(NickKickBan));
     nickModeMenu->addAction(action(NickKick));
     nickModeMenu->addAction(action(NickBan));
     nickModeMenu->addAction(action(NickKickBan));
-    _nickModeMenuAction = new Action(tr("Actions"), 0);
+    _nickModeMenuAction = new Action(tr("Actions"), nullptr);
     _nickModeMenuAction->setMenu(nickModeMenu);
 
     QMenu *ignoreMenu = new QMenu();
     _nickModeMenuAction->setMenu(nickModeMenu);
 
     QMenu *ignoreMenu = new QMenu();
-    _nickIgnoreMenuAction = new Action(tr("Ignore"), 0);
+    _nickIgnoreMenuAction = new Action(tr("Ignore"), nullptr);
     _nickIgnoreMenuAction->setMenu(ignoreMenu);
 
     // These are disabled actions used as descriptions
     _nickIgnoreMenuAction->setMenu(ignoreMenu);
 
     // These are disabled actions used as descriptions
@@ -171,7 +171,7 @@ void ContextMenuActionProvider::addActions(QMenu *menu, const QModelIndex &index
 {
     if (!index.isValid())
         return;
 {
     if (!index.isValid())
         return;
-    addActions(menu, QList<QModelIndex>() << index, 0, QString(), receiver, method, isCustomBufferView);
+    addActions(menu, QList<QModelIndex>() << index, nullptr, QString(), receiver, method, isCustomBufferView);
 }
 
 
 }
 
 
@@ -191,7 +191,7 @@ void ContextMenuActionProvider::addActions(QMenu *menu, MessageFilter *filter, B
 
 void ContextMenuActionProvider::addActions(QMenu *menu, const QList<QModelIndex> &indexList, QObject *receiver,  const char *method, bool isCustomBufferView)
 {
 
 void ContextMenuActionProvider::addActions(QMenu *menu, const QList<QModelIndex> &indexList, QObject *receiver,  const char *method, bool isCustomBufferView)
 {
-    addActions(menu, indexList, 0, QString(), receiver, method, isCustomBufferView);
+    addActions(menu, indexList, nullptr, QString(), receiver, method, isCustomBufferView);
 }
 
 
 }
 
 
index a9c76bf..c95a3c1 100644 (file)
@@ -29,7 +29,7 @@ class UISUPPORT_EXPORT ContextMenuActionProvider : public NetworkModelController
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ContextMenuActionProvider(QObject *parent = 0);
+    ContextMenuActionProvider(QObject *parent = nullptr);
     virtual ~ContextMenuActionProvider();
 
     //! Provide a list of actions applying to the given item
     virtual ~ContextMenuActionProvider();
 
     //! Provide a list of actions applying to the given item
@@ -44,11 +44,11 @@ public:
      * @param slot     The receiving slot name; should be "mySlot" rather than SLOT(mySlot(QAction *))
      * @return A list of actions applying to the given item
      */
      * @param slot     The receiving slot name; should be "mySlot" rather than SLOT(mySlot(QAction *))
      * @return A list of actions applying to the given item
      */
-    void addActions(QMenu *, const QModelIndex &index, QObject *receiver = 0, const char *slot = 0, bool allowBufferHide = false);
-    void addActions(QMenu *, const QList<QModelIndex> &indexList, QObject *receiver = 0, const char *slot = 0, bool allowBufferHide = false);
-    void addActions(QMenu *, BufferId id, QObject *receiver = 0, const char *slot = 0);
-    void addActions(QMenu *, MessageFilter *filter, BufferId msgBuffer, QObject *receiver = 0, const char *slot = 0);
-    void addActions(QMenu *, MessageFilter *filter, BufferId msgBuffer, const QString &chanOrNick, QObject *receiver = 0, const char *slot = 0);
+    void addActions(QMenu *, const QModelIndex &index, QObject *receiver = nullptr, const char *slot = nullptr, bool allowBufferHide = false);
+    void addActions(QMenu *, const QList<QModelIndex> &indexList, QObject *receiver = nullptr, const char *slot = nullptr, bool allowBufferHide = false);
+    void addActions(QMenu *, BufferId id, QObject *receiver = nullptr, const char *slot = nullptr);
+    void addActions(QMenu *, MessageFilter *filter, BufferId msgBuffer, QObject *receiver = nullptr, const char *slot = nullptr);
+    void addActions(QMenu *, MessageFilter *filter, BufferId msgBuffer, const QString &chanOrNick, QObject *receiver = nullptr, const char *slot = nullptr);
 
 private:
 
 
 private:
 
index e93b662..aef7b1b 100644 (file)
@@ -25,7 +25,7 @@
 
 FlatProxyModel::FlatProxyModel(QObject *parent)
     : QAbstractProxyModel(parent),
 
 FlatProxyModel::FlatProxyModel(QObject *parent)
     : QAbstractProxyModel(parent),
-    _rootSourceItem(0)
+    _rootSourceItem(nullptr)
 {
 }
 
 {
 }
 
@@ -96,7 +96,7 @@ QItemSelection FlatProxyModel::mapSelectionFromSource(const QItemSelection &sour
         QModelIndex currentParent = currentRange.topLeft().parent();
         Q_ASSERT(currentParent == currentRange.bottomRight().parent());
 
         QModelIndex currentParent = currentRange.topLeft().parent();
         Q_ASSERT(currentParent == currentRange.bottomRight().parent());
 
-        SourceItem *parentItem = 0;
+        SourceItem *parentItem = nullptr;
         if (!itemLookup.contains(currentParent)) {
             parentItem = sourceToInternal(currentParent);
             itemLookup[currentParent] = parentItem;
         if (!itemLookup.contains(currentParent)) {
             parentItem = sourceToInternal(currentParent);
             itemLookup[currentParent] = parentItem;
@@ -178,8 +178,8 @@ QItemSelection FlatProxyModel::mapSelectionToSource(const QItemSelection &proxyS
     for (int i = 0; i < proxySelection.count(); i++) {
         const QItemSelectionRange &range = proxySelection[i];
 
     for (int i = 0; i < proxySelection.count(); i++) {
         const QItemSelectionRange &range = proxySelection[i];
 
-        SourceItem *topLeftItem = 0;
-        SourceItem *bottomRightItem = 0;
+        SourceItem *topLeftItem = nullptr;
+        SourceItem *bottomRightItem = nullptr;
         SourceItem *currentItem = static_cast<SourceItem *>(range.topLeft().internalPointer());
         int row = range.topLeft().row();
         int left = range.topLeft().column();
         SourceItem *currentItem = static_cast<SourceItem *>(range.topLeft().internalPointer());
         int row = range.topLeft().row();
         int left = range.topLeft().column();
@@ -195,8 +195,8 @@ QItemSelection FlatProxyModel::mapSelectionToSource(const QItemSelection &proxyS
             else {
                 Q_ASSERT(topLeftItem && bottomRightItem);
                 sourceSelection << QItemSelectionRange(mapToSource(createIndex(topLeftItem->pos(), left, topLeftItem)), mapToSource(createIndex(bottomRightItem->pos(), right, bottomRightItem)));
             else {
                 Q_ASSERT(topLeftItem && bottomRightItem);
                 sourceSelection << QItemSelectionRange(mapToSource(createIndex(topLeftItem->pos(), left, topLeftItem)), mapToSource(createIndex(bottomRightItem->pos(), right, bottomRightItem)));
-                topLeftItem = 0;
-                bottomRightItem = 0;
+                topLeftItem = nullptr;
+                bottomRightItem = nullptr;
             }
 
             // update loop vars
             }
 
             // update loop vars
@@ -216,7 +216,7 @@ QItemSelection FlatProxyModel::mapSelectionToSource(const QItemSelection &proxyS
 void FlatProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
 {
     if (QAbstractProxyModel::sourceModel()) {
 void FlatProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
 {
     if (QAbstractProxyModel::sourceModel()) {
-        disconnect(QAbstractProxyModel::sourceModel(), 0, this, 0);
+        disconnect(QAbstractProxyModel::sourceModel(), nullptr, this, nullptr);
     }
 
     QAbstractProxyModel::setSourceModel(sourceModel);
     }
 
     QAbstractProxyModel::setSourceModel(sourceModel);
@@ -271,7 +271,7 @@ void FlatProxyModel::insertSubTree(const QModelIndex &source_idx, bool emitInser
     SourceItem *lastItem = insertSubTreeHelper(newSubTree, newSubTree, source_idx);
 
     Q_ASSERT(lastItem);
     SourceItem *lastItem = insertSubTreeHelper(newSubTree, newSubTree, source_idx);
 
     Q_ASSERT(lastItem);
-    Q_ASSERT(lastItem->next() == 0);
+    Q_ASSERT(lastItem->next() == nullptr);
 
     if (emitInsert)
         beginInsertRows(QModelIndex(), newSubTree->pos(), lastItem->pos());
 
     if (emitInsert)
         beginInsertRows(QModelIndex(), newSubTree->pos(), lastItem->pos());
@@ -310,7 +310,7 @@ void FlatProxyModel::insertSubTree(const QModelIndex &source_idx, bool emitInser
 FlatProxyModel::SourceItem *FlatProxyModel::insertSubTreeHelper(SourceItem *parentItem, SourceItem *lastItem_, const QModelIndex &source_idx)
 {
     SourceItem *lastItem = lastItem_;
 FlatProxyModel::SourceItem *FlatProxyModel::insertSubTreeHelper(SourceItem *parentItem, SourceItem *lastItem_, const QModelIndex &source_idx)
 {
     SourceItem *lastItem = lastItem_;
-    SourceItem *newItem = 0;
+    SourceItem *newItem = nullptr;
     for (int row = 0; row < sourceModel()->rowCount(source_idx); row++) {
         newItem = new SourceItem(row, parentItem);
         newItem->setPos(lastItem->pos() + 1);
     for (int row = 0; row < sourceModel()->rowCount(source_idx); row++) {
         newItem = new SourceItem(row, parentItem);
         newItem->setPos(lastItem->pos() + 1);
@@ -525,7 +525,7 @@ void FlatProxyModel::on_rowsAboutToBeInserted(const QModelIndex &parent, int sta
 
     SourceItem *nextItem = prevItem->next();
 
 
     SourceItem *nextItem = prevItem->next();
 
-    SourceItem *newItem = 0;
+    SourceItem *newItem = nullptr;
     int newPos = prevItem->pos() + 1;
     for (int row = start; row <= end; row++) {
         newItem = new SourceItem(row, sourceItem);
     int newPos = prevItem->pos() + 1;
     for (int row = start; row <= end; row++) {
         newItem = new SourceItem(row, sourceItem);
@@ -685,7 +685,7 @@ void FlatProxyModel::checkChildCount(const QModelIndex &index, const SourceItem
 FlatProxyModel::SourceItem::SourceItem(int row, SourceItem *parent)
     : _parent(parent),
     _pos(-1),
 FlatProxyModel::SourceItem::SourceItem(int row, SourceItem *parent)
     : _parent(parent),
     _pos(-1),
-    _next(0)
+    _next(nullptr)
 {
     if (parent) {
         parent->_childs.insert(row, this);
 {
     if (parent) {
         parent->_childs.insert(row, this);
index ca362b9..aa594cc 100644 (file)
@@ -29,7 +29,7 @@ class UISUPPORT_EXPORT FlatProxyModel : public QAbstractProxyModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    FlatProxyModel(QObject *parent = 0);
+    FlatProxyModel(QObject *parent = nullptr);
 
     virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
     virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
 
     virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
     virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
@@ -97,7 +97,7 @@ public:
 class FlatProxyModel::SourceItem
 {
 public:
 class FlatProxyModel::SourceItem
 {
 public:
-    SourceItem(int row = 0, SourceItem *parent = 0);
+    SourceItem(int row = 0, SourceItem *parent = nullptr);
     ~SourceItem();
 
     inline SourceItem *parent() const { return _parent; }
     ~SourceItem();
 
     inline SourceItem *parent() const { return _parent; }
index 1359f7d..c36a1fd 100644 (file)
@@ -31,7 +31,7 @@ class UISUPPORT_EXPORT FontSelector : public QWidget
     Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
 
 public :
     Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
 
 public :
-        FontSelector(QWidget *parent = 0);
+        FontSelector(QWidget *parent = nullptr);
 
     inline const QFont &selectedFont() const { return _font; }
 
 
     inline const QFont &selectedFont() const { return _font; }
 
index 6136ecf..74ca040 100644 (file)
 #  include <QX11Info>
 #endif
 
 #  include <QX11Info>
 #endif
 
-QWidget *GraphicalUi::_mainWidget = 0;
+QWidget *GraphicalUi::_mainWidget = nullptr;
 QHash<QString, ActionCollection *> GraphicalUi::_actionCollections;
 QHash<QString, ActionCollection *> GraphicalUi::_actionCollections;
-ContextMenuActionProvider *GraphicalUi::_contextMenuActionProvider = 0;
-ToolBarActionProvider *GraphicalUi::_toolBarActionProvider = 0;
-UiStyle *GraphicalUi::_uiStyle = 0;
+ContextMenuActionProvider *GraphicalUi::_contextMenuActionProvider = nullptr;
+ToolBarActionProvider *GraphicalUi::_toolBarActionProvider = nullptr;
+UiStyle *GraphicalUi::_uiStyle = nullptr;
 
 
 GraphicalUi::GraphicalUi(QObject *parent) : AbstractUi(parent), Singleton<GraphicalUi>(this)
 
 
 GraphicalUi::GraphicalUi(QObject *parent) : AbstractUi(parent), Singleton<GraphicalUi>(this)
index ebf9871..b97371e 100644 (file)
@@ -77,7 +77,7 @@ public:
     static bool isMainWidgetVisible();
 
 protected:
     static bool isMainWidgetVisible();
 
 protected:
-    GraphicalUi(QObject *parent = 0);
+    GraphicalUi(QObject *parent = nullptr);
     virtual void init();
 
     //! This is the widget we associate global actions with, typically the main window
     virtual void init();
 
     //! This is the widget we associate global actions with, typically the main window
index 63b67eb..121a959 100644 (file)
@@ -49,7 +49,7 @@ public:
         MultiLine
     };
 
         MultiLine
     };
 
-    MultiLineEdit(QWidget *parent = 0);
+    MultiLineEdit(QWidget *parent = nullptr);
     ~MultiLineEdit();
 
     void setCustomFont(const QFont &); // should be used instead setFont(), so we can set our size correctly
     ~MultiLineEdit();
 
     void setCustomFont(const QFont &); // should be used instead setFont(), so we can set our size correctly
@@ -85,7 +85,7 @@ public slots:
     void setMaxHeight(int numLines);
     void setEmacsMode(bool enable = true);
     void setScrollBarsEnabled(bool enable = true);
     void setMaxHeight(int numLines);
     void setEmacsMode(bool enable = true);
     void setScrollBarsEnabled(bool enable = true);
-    void setPasteProtectionEnabled(bool enable = true, QWidget *msgBoxParent = 0);
+    void setPasteProtectionEnabled(bool enable = true, QWidget *msgBoxParent = nullptr);
     void setLineWrapEnabled(bool enable = false);
 
     inline void setHistory(QStringList history) { _history = history; }
     void setLineWrapEnabled(bool enable = false);
 
     inline void setHistory(QStringList history) { _history = history; }
index 94dd8d9..69797bc 100644 (file)
@@ -42,8 +42,8 @@
 NetworkModelController::NetworkModelController(QObject *parent)
     : QObject(parent),
     _actionCollection(new ActionCollection(this)),
 NetworkModelController::NetworkModelController(QObject *parent)
     : QObject(parent),
     _actionCollection(new ActionCollection(this)),
-    _messageFilter(0),
-    _receiver(0)
+    _messageFilter(nullptr),
+    _receiver(nullptr)
 {
     connect(_actionCollection, SIGNAL(actionTriggered(QAction *)), SLOT(actionTriggered(QAction *)));
 }
 {
     connect(_actionCollection, SIGNAL(actionTriggered(QAction *)), SLOT(actionTriggered(QAction *)));
 }
@@ -175,7 +175,7 @@ void NetworkModelController::removeBuffers(const QModelIndexList &indexList)
     }
     QString msg;
     if (inactive.count()) {
     }
     QString msg;
     if (inactive.count()) {
-        msg = tr("Do you want to delete the following buffer(s) permanently?", 0, inactive.count());
+        msg = tr("Do you want to delete the following buffer(s) permanently?", "", inactive.count());
         msg += "<ul>";
         int count = 0;
         foreach(BufferInfo info, inactive) {
         msg += "<ul>";
         int count = 0;
         foreach(BufferInfo info, inactive) {
@@ -193,7 +193,7 @@ void NetworkModelController::removeBuffers(const QModelIndexList &indexList)
         if (inactive.count() != indexList.count())
             msg += tr("<br>Active channel buffers cannot be deleted, please part the channel first.");
 
         if (inactive.count() != indexList.count())
             msg += tr("<br>Active channel buffers cannot be deleted, please part the channel first.");
 
-        if (QMessageBox::question(0, tr("Remove buffers permanently?"), msg, QMessageBox::Yes|QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) {
+        if (QMessageBox::question(nullptr, tr("Remove buffers permanently?"), msg, QMessageBox::Yes|QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) {
             foreach(BufferInfo info, inactive)
             Client::removeBuffer(info.bufferId());
         }
             foreach(BufferInfo info, inactive)
             Client::removeBuffer(info.bufferId());
         }
@@ -238,9 +238,9 @@ void NetworkModelController::actionTriggered(QAction *action)
 void NetworkModelController::handleNetworkAction(ActionType type, QAction *)
 {
     if (type == NetworkConnectAllWithDropdown || type == NetworkDisconnectAllWithDropdown || type == NetworkConnectAll || type == NetworkDisconnectAll) {
 void NetworkModelController::handleNetworkAction(ActionType type, QAction *)
 {
     if (type == NetworkConnectAllWithDropdown || type == NetworkDisconnectAllWithDropdown || type == NetworkConnectAll || type == NetworkDisconnectAll) {
-        if (type == NetworkConnectAllWithDropdown && QMessageBox::question(0, tr("Question"), tr("Really Connect to all IRC Networks?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::No)
+        if (type == NetworkConnectAllWithDropdown && QMessageBox::question(nullptr, tr("Question"), tr("Really Connect to all IRC Networks?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::No)
             return;
             return;
-        if (type == NetworkDisconnectAllWithDropdown && QMessageBox::question(0, tr("Question"), tr("Really disconnect from all IRC Networks?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No)
+        if (type == NetworkDisconnectAllWithDropdown && QMessageBox::question(nullptr, tr("Question"), tr("Really disconnect from all IRC Networks?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No)
             return;
         foreach(NetworkId id, Client::networkIds()) {
             const Network *net = Client::network(id);
             return;
         foreach(NetworkId id, Client::networkIds()) {
             const Network *net = Client::network(id);
index ea7ab65..c7351c4 100644 (file)
@@ -37,7 +37,7 @@ class UISUPPORT_EXPORT NetworkModelController : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NetworkModelController(QObject *parent = 0);
+    NetworkModelController(QObject *parent = nullptr);
     virtual ~NetworkModelController();
 
     // don't change enums without doublechecking masks etc. in code
     virtual ~NetworkModelController();
 
     // don't change enums without doublechecking masks etc. in code
@@ -198,7 +198,7 @@ class NetworkModelController::JoinDlg : public QDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    JoinDlg(const QModelIndex &index, QWidget *parent = 0);
+    JoinDlg(const QModelIndex &index, QWidget *parent = nullptr);
 
     QString channelName() const;
     QString channelPassword() const;
 
     QString channelName() const;
     QString channelPassword() const;
index 2bd783b..d9e84ec 100644 (file)
@@ -76,7 +76,7 @@ void NickView::init()
 void NickView::setModel(QAbstractItemModel *model_)
 {
     if (model())
 void NickView::setModel(QAbstractItemModel *model_)
 {
     if (model())
-        disconnect(model(), 0, this, 0);
+        disconnect(model(), nullptr, this, nullptr);
 
     TreeViewTouch::setModel(model_);
     init();
 
     TreeViewTouch::setModel(model_);
     init();
index 4bdc7d0..ee53d82 100644 (file)
@@ -32,7 +32,7 @@ class UISUPPORT_EXPORT NickView : public TreeViewTouch
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NickView(QWidget *parent = 0);
+    NickView(QWidget *parent = nullptr);
 
 protected:
     virtual void rowsInserted(const QModelIndex &parent, int start, int end);
 
 protected:
     virtual void rowsInserted(const QModelIndex &parent, int start, int end);
index b8c0551..952271e 100644 (file)
@@ -34,7 +34,7 @@ class UISUPPORT_EXPORT NickViewFilter : public QSortFilterProxyModel
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    NickViewFilter(const BufferId &bufferId, NetworkModel *parent = 0);
+    NickViewFilter(const BufferId &bufferId, NetworkModel *parent = nullptr);
 
     virtual QVariant data(const QModelIndex &index, int role) const;
     QVariant icon(const QModelIndex &index) const;
 
     virtual QVariant data(const QModelIndex &index, int role) const;
     QVariant icon(const QModelIndex &index) const;
index 08baf2c..4e8cff2 100644 (file)
@@ -29,7 +29,7 @@ class UISUPPORT_EXPORT ResizingStackedWidget : public QStackedWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ResizingStackedWidget(QWidget *parent = 0);
+    ResizingStackedWidget(QWidget *parent = nullptr);
 
     virtual QSize sizeHint() const;
 
 
     virtual QSize sizeHint() const;
 
index c6c28cd..523cfa2 100644 (file)
@@ -61,7 +61,7 @@ class UISUPPORT_EXPORT SettingsPage : public QWidget
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    SettingsPage(const QString &category, const QString &name, QWidget *parent = 0);
+    SettingsPage(const QString &category, const QString &name, QWidget *parent = nullptr);
     virtual ~SettingsPage() {};
 
     //! The category of this settings page.
     virtual ~SettingsPage() {};
 
     //! The category of this settings page.
index 6bcdb93..2cd7390 100644 (file)
@@ -38,7 +38,7 @@ public:
         ResizeOnHover
     };
 
         ResizeOnHover
     };
 
-    StyledLabel(QWidget *parent = 0);
+    StyledLabel(QWidget *parent = nullptr);
 
     void setText(const QString &text);
     void setCustomFont(const QFont &font);
 
     void setText(const QString &text);
     void setCustomFont(const QFont &font);
index a341be9..9ea3601 100644 (file)
@@ -31,7 +31,7 @@ class UISUPPORT_EXPORT ToolBarActionProvider : public NetworkModelController
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    ToolBarActionProvider(QObject *parent = 0);
+    ToolBarActionProvider(QObject *parent = nullptr);
     virtual ~ToolBarActionProvider();
 
     enum ToolBarType {
     virtual ~ToolBarActionProvider();
 
     enum ToolBarType {
@@ -54,7 +54,7 @@ protected:
 private slots:
     void networkCreated(NetworkId id);
     void networkRemoved(NetworkId id);
 private slots:
     void networkCreated(NetworkId id);
     void networkRemoved(NetworkId id);
-    void networkUpdated(const Network *net = 0);
+    void networkUpdated(const Network *net = nullptr);
     void connectOrDisconnectNet();
 
     void currentBufferChanged(const QModelIndex &);
     void connectOrDisconnectNet();
 
     void currentBufferChanged(const QModelIndex &);
index 7b94039..f089c96 100644 (file)
@@ -32,7 +32,7 @@ class UISUPPORT_EXPORT TreeViewTouch : public QTreeView
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    explicit TreeViewTouch(QWidget *parent = 0);
+    explicit TreeViewTouch(QWidget *parent = nullptr);
 
 protected:
 
 
 protected:
 
index 6febcd5..9e58992 100644 (file)
@@ -46,7 +46,7 @@ class UISUPPORT_EXPORT UiStyle : public QObject
     Q_ENUMS(SenderPrefixModes)
 
 public:
     Q_ENUMS(SenderPrefixModes)
 
 public:
-    UiStyle(QObject *parent = 0);
+    UiStyle(QObject *parent = nullptr);
     virtual ~UiStyle();
 
     //! This enumerates the possible formats a text element may have. */
     virtual ~UiStyle();
 
     //! This enumerates the possible formats a text element may have. */