From: Manuel Nickschas Date: Thu, 6 Sep 2018 23:08:09 +0000 (+0200) Subject: modernize: Use '= default' instead of empty ctor/dtor bodies X-Git-Tag: test-travis-01~140 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=c194ed5fb3d15e14b9364f9796d3521910dc72fe modernize: Use '= default' instead of empty ctor/dtor bodies Also remove lots of unnecessary, empty ctors and dtors. --- diff --git a/src/client/abstractui.h b/src/client/abstractui.h index 2231f55f..0a89121c 100644 --- a/src/client/abstractui.h +++ b/src/client/abstractui.h @@ -39,7 +39,6 @@ class CLIENT_EXPORT AbstractUi : public QObject public: AbstractUi(QObject *parent = nullptr) : QObject(parent) {} - ~AbstractUi() override {} virtual void init() = 0; // called after the client is initialized virtual MessageModel *createMessageModel(QObject *parent) = 0; virtual AbstractMessageProcessor *createMessageProcessor(QObject *parent) = 0; diff --git a/src/client/backlogrequester.h b/src/client/backlogrequester.h index 3fb46806..420ef5d1 100644 --- a/src/client/backlogrequester.h +++ b/src/client/backlogrequester.h @@ -41,7 +41,7 @@ public: }; BacklogRequester(bool buffering, RequesterType requesterType, ClientBacklogManager *backlogManger); - virtual inline ~BacklogRequester() {} + virtual ~BacklogRequester() = default; inline bool isBuffering() { return _isBuffering; } inline RequesterType type() { return _requesterType; } diff --git a/src/client/clientsettings.cpp b/src/client/clientsettings.cpp index cf0cb8d7..47a89814 100644 --- a/src/client/clientsettings.cpp +++ b/src/client/clientsettings.cpp @@ -37,11 +37,6 @@ ClientSettings::ClientSettings(QString g) : Settings(g, Quassel::buildInfo().cli } -ClientSettings::~ClientSettings() -{ -} - - /***********************************************************************************************/ CoreAccountSettings::CoreAccountSettings(QString subgroup) diff --git a/src/client/clientsettings.h b/src/client/clientsettings.h index a8980efa..c22eef8c 100644 --- a/src/client/clientsettings.h +++ b/src/client/clientsettings.h @@ -31,8 +31,6 @@ class QSslSocket; class CLIENT_EXPORT ClientSettings : public Settings { -public: - ~ClientSettings() override; protected: ClientSettings(QString group = "General"); diff --git a/src/client/coreaccount.h b/src/client/coreaccount.h index d4aed0f3..b69552c5 100644 --- a/src/client/coreaccount.h +++ b/src/client/coreaccount.h @@ -36,7 +36,7 @@ class CLIENT_EXPORT CoreAccount public: CoreAccount(AccountId accountId = 0); - virtual ~CoreAccount() {}; + virtual ~CoreAccount() = default; inline bool isValid() const { return accountId().isValid(); } inline AccountId accountId() const { return _accountId; } diff --git a/src/client/messagemodel.h b/src/client/messagemodel.h index 75259da7..f27379c1 100644 --- a/src/client/messagemodel.h +++ b/src/client/messagemodel.h @@ -135,16 +135,15 @@ QModelIndex MessageModel::index(int row, int column, const QModelIndex &parent) // ************************************************** // MessageModelItem // ************************************************** +//! Creates a MessageModelItem from a Message object. +/** This baseclass implementation takes care of all Message data *except* the stylable strings. + * Subclasses need to provide Qt::DisplayRole at least, which should describe the plaintext + * strings without formattings (e.g. for searching purposes). + */ class CLIENT_EXPORT MessageModelItem { public: - //! Creates a MessageModelItem from a Message object. - /** This baseclass implementation takes care of all Message data *except* the stylable strings. - * Subclasses need to provide Qt::DisplayRole at least, which should describe the plaintext - * strings without formattings (e.g. for searching purposes). - */ - MessageModelItem() {} - inline virtual ~MessageModelItem() {} + inline virtual ~MessageModelItem() = default; virtual QVariant data(int column, int role) const; virtual bool setData(int column, const QVariant &value, int role); diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index e456f6fd..768a2959 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -238,11 +238,6 @@ SimpleTreeItem::SimpleTreeItem(QList data, AbstractTreeItem *parent) } -SimpleTreeItem::~SimpleTreeItem() -{ -} - - QVariant SimpleTreeItem::data(int column, int role) const { if (column >= columnCount() || role != Qt::DisplayRole) diff --git a/src/client/treemodel.h b/src/client/treemodel.h index db7e5abb..fcb6bd2d 100644 --- a/src/client/treemodel.h +++ b/src/client/treemodel.h @@ -107,7 +107,6 @@ class CLIENT_EXPORT SimpleTreeItem : public AbstractTreeItem public: SimpleTreeItem(QList data, AbstractTreeItem *parent = nullptr); - ~SimpleTreeItem() override; QVariant data(int column, int role) const override; bool setData(int column, const QVariant &value, int role) override; diff --git a/src/common/event.h b/src/common/event.h index 02caa832..b6525872 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -33,7 +33,7 @@ class COMMON_EXPORT Event { public: explicit Event(EventManager::EventType type = EventManager::Invalid); - virtual ~Event() {} + virtual ~Event() = default; inline EventManager::EventType type() const { return _type; } diff --git a/src/common/expressionmatch.h b/src/common/expressionmatch.h index a22b34bf..689d14f9 100644 --- a/src/common/expressionmatch.h +++ b/src/common/expressionmatch.h @@ -45,7 +45,7 @@ public: /** * Construct an empty ExpressionMatch */ - ExpressionMatch() {} + ExpressionMatch() = default; /** * Construct an Expression match with the given parameters diff --git a/src/common/highlightrulemanager.h b/src/common/highlightrulemanager.h index 5a2d4a87..0db44fc5 100644 --- a/src/common/highlightrulemanager.h +++ b/src/common/highlightrulemanager.h @@ -61,7 +61,7 @@ public: /** * Construct an empty highlight rule */ - HighlightRule() {} + HighlightRule() = default; /** * Construct a highlight rule with the given parameters diff --git a/src/common/ignorelistmanager.h b/src/common/ignorelistmanager.h index bd096087..79acff65 100644 --- a/src/common/ignorelistmanager.h +++ b/src/common/ignorelistmanager.h @@ -66,7 +66,7 @@ public: /** * Construct an empty ignore rule */ - IgnoreListItem() {} + IgnoreListItem() = default; /** * Construct an ignore rule with the given parameters diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index dd47f851..c4e45d56 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -44,11 +44,6 @@ IrcChannel::IrcChannel(const QString &channelname, Network *network) } -IrcChannel::~IrcChannel() -{ -} - - // ==================== // PUBLIC: // ==================== diff --git a/src/common/ircchannel.h b/src/common/ircchannel.h index 906d52f0..4c50700c 100644 --- a/src/common/ircchannel.h +++ b/src/common/ircchannel.h @@ -45,7 +45,6 @@ class COMMON_EXPORT IrcChannel : public SyncableObject public : IrcChannel(const QString &channelname, Network *network); - ~IrcChannel() override; bool isKnownUser(IrcUser *ircuser) const; bool isValidChannelUserMode(const QString &mode) const; diff --git a/src/common/ircuser.cpp b/src/common/ircuser.cpp index 16837006..52023efb 100644 --- a/src/common/ircuser.cpp +++ b/src/common/ircuser.cpp @@ -52,11 +52,6 @@ IrcUser::IrcUser(const QString &hostmask, Network *network) : SyncableObject(net } -IrcUser::~IrcUser() -{ -} - - // ==================== // PUBLIC: // ==================== diff --git a/src/common/ircuser.h b/src/common/ircuser.h index 968ca7a2..a880d4bc 100644 --- a/src/common/ircuser.h +++ b/src/common/ircuser.h @@ -60,8 +60,7 @@ class COMMON_EXPORT IrcUser : public SyncableObject Q_PROPERTY(QString userModes READ userModes WRITE setUserModes) public : - IrcUser(const QString &hostmask, Network *network); - ~IrcUser() override; + IrcUser(const QString &hostmask, Network *network); inline QString user() const { return _user; } inline QString host() const { return _host; } diff --git a/src/common/nickhighlightmatcher.h b/src/common/nickhighlightmatcher.h index 78a8e8fa..ec4df0d5 100644 --- a/src/common/nickhighlightmatcher.h +++ b/src/common/nickhighlightmatcher.h @@ -47,7 +47,7 @@ public: /** * Construct an empty NicknameMatcher */ - NickHighlightMatcher() {} + NickHighlightMatcher() = default; /** * Construct a configured NicknameMatcher diff --git a/src/common/protocol.h b/src/common/protocol.h index 47dabd9b..dcb7fa6c 100644 --- a/src/common/protocol.h +++ b/src/common/protocol.h @@ -139,7 +139,6 @@ struct SetupFailed : public HandshakeMessage struct SetupDone : public HandshakeMessage { - inline SetupDone() {} }; @@ -164,14 +163,13 @@ struct LoginFailed : public HandshakeMessage struct LoginSuccess : public HandshakeMessage { - inline LoginSuccess() {} }; // TODO: more generic format struct SessionState : public HandshakeMessage { - inline SessionState() {} // needed for QMetaType (for the mono client) + inline SessionState() = default; // needed for QMetaType (for the mono client) inline SessionState(QVariantList identities, QVariantList bufferInfos, QVariantList networkIds) : identities(std::move(identities)), bufferInfos(std::move(bufferInfos)), networkIds(std::move(networkIds)) {} diff --git a/src/common/settings.h b/src/common/settings.h index 5a2a6b7e..1a0fa6d7 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -101,7 +101,7 @@ public: protected: inline Settings(QString group_, QString appName_) : group(std::move(group_)), appName(std::move(appName_)) {} - inline virtual ~Settings() {} + inline virtual ~Settings() = default; inline void setGroup(const QString &group_) { group = group_; } diff --git a/src/common/signalproxy.cpp b/src/common/signalproxy.cpp index 0cc79944..9a290fca 100644 --- a/src/common/signalproxy.cpp +++ b/src/common/signalproxy.cpp @@ -72,7 +72,7 @@ private: int signalId{-1}; QByteArray signature; Signal(QObject *sender, int sigId, QByteArray signature) : sender(sender), signalId(sigId), signature(std::move(signature)) {} - Signal() {} + Signal() = default; }; SignalProxy *_proxy; diff --git a/src/common/signalproxy.h b/src/common/signalproxy.h index a9486171..6cab74ae 100644 --- a/src/common/signalproxy.h +++ b/src/common/signalproxy.h @@ -232,7 +232,7 @@ class SignalProxy::ExtendedMetaObject { public: MethodDescriptor(const QMetaMethod &method); - MethodDescriptor() {} + MethodDescriptor() = default; inline const QByteArray &methodName() const { return _methodName; } inline const QList &argTypes() const { return _argTypes; } diff --git a/src/core/abstractsqlstorage.cpp b/src/core/abstractsqlstorage.cpp index 10c0f50d..ca1fa996 100644 --- a/src/core/abstractsqlstorage.cpp +++ b/src/core/abstractsqlstorage.cpp @@ -400,10 +400,6 @@ AbstractSqlStorage::Connection::~Connection() // ======================================== // AbstractSqlMigrator // ======================================== -AbstractSqlMigrator::AbstractSqlMigrator() -{ -} - void AbstractSqlMigrator::newQuery(const QString &query, QSqlDatabase db) { diff --git a/src/core/abstractsqlstorage.h b/src/core/abstractsqlstorage.h index 2224d5c9..efd1ce39 100644 --- a/src/core/abstractsqlstorage.h +++ b/src/core/abstractsqlstorage.h @@ -171,7 +171,6 @@ public: QString sender; QString realname; QString avatarurl; - SenderMO() {} }; struct IdentityMO { @@ -307,8 +306,7 @@ public: CoreState }; - AbstractSqlMigrator(); - virtual ~AbstractSqlMigrator() {} + virtual ~AbstractSqlMigrator() = default; static QString migrationObject(MigrationObject moType); diff --git a/src/core/cipher.cpp b/src/core/cipher.cpp index 88a4c506..c5a40c21 100644 --- a/src/core/cipher.cpp +++ b/src/core/cipher.cpp @@ -30,9 +30,6 @@ Cipher::Cipher(QByteArray key, QString cipherType) } -Cipher::~Cipher() -{} - bool Cipher::setKey(QByteArray key) { if (key.isEmpty()) { diff --git a/src/core/cipher.h b/src/core/cipher.h index 2cd80860..e873ff7d 100644 --- a/src/core/cipher.h +++ b/src/core/cipher.h @@ -22,7 +22,6 @@ class Cipher public: Cipher(); explicit Cipher(QByteArray key, QString cipherType = QString("blowfish")); - ~Cipher(); QByteArray decrypt(QByteArray cipher); QByteArray decryptTopic(QByteArray cipher); bool encrypt(QByteArray &cipher); diff --git a/src/core/coresettings.cpp b/src/core/coresettings.cpp index 27b0c7c8..a914856c 100644 --- a/src/core/coresettings.cpp +++ b/src/core/coresettings.cpp @@ -27,11 +27,6 @@ CoreSettings::CoreSettings(const QString group) : Settings(group, Quassel::build } -CoreSettings::~CoreSettings() -{ -} - - void CoreSettings::setStorageSettings(const QVariant &data) { setLocalValue("StorageSettings", data); diff --git a/src/core/coresettings.h b/src/core/coresettings.h index 8132cfb5..ac70a36c 100644 --- a/src/core/coresettings.h +++ b/src/core/coresettings.h @@ -26,7 +26,6 @@ class CoreSettings : public Settings { public: - ~CoreSettings() override; CoreSettings(const QString group = "Core"); void setStorageSettings(const QVariant &data); diff --git a/src/core/coreuserinputhandler.h b/src/core/coreuserinputhandler.h index 94d8464a..a45fcaec 100644 --- a/src/core/coreuserinputhandler.h +++ b/src/core/coreuserinputhandler.h @@ -124,7 +124,7 @@ private: BufferInfo bufferInfo; QString command; Command(BufferInfo info, QString command) : bufferInfo(std::move(info)), command(std::move(command)) {} - Command() {} + Command() = default; }; QHash _delayedCommands; diff --git a/src/core/ctcpparser.h b/src/core/ctcpparser.h index 7fd2a837..0118be24 100644 --- a/src/core/ctcpparser.h +++ b/src/core/ctcpparser.h @@ -89,7 +89,7 @@ private: QString bufferName; QList replies; - CtcpReply() {} + CtcpReply() = default; CtcpReply(CoreNetwork *net, QString buf) : network(net), bufferName(std::move(buf)) {} }; diff --git a/src/core/postgresqlstorage.cpp b/src/core/postgresqlstorage.cpp index 6b2642bd..6b971042 100644 --- a/src/core/postgresqlstorage.cpp +++ b/src/core/postgresqlstorage.cpp @@ -32,11 +32,6 @@ PostgreSqlStorage::PostgreSqlStorage(QObject *parent) } -PostgreSqlStorage::~PostgreSqlStorage() -{ -} - - std::unique_ptr PostgreSqlStorage::createMigrationWriter() { auto writer = new PostgreSqlMigrationWriter(); diff --git a/src/core/postgresqlstorage.h b/src/core/postgresqlstorage.h index 599bb548..2ea1e284 100644 --- a/src/core/postgresqlstorage.h +++ b/src/core/postgresqlstorage.h @@ -31,7 +31,6 @@ class PostgreSqlStorage : public AbstractSqlStorage public: PostgreSqlStorage(QObject *parent = nullptr); - ~PostgreSqlStorage() override; std::unique_ptr createMigrationWriter() override; diff --git a/src/core/sqlauthenticator.cpp b/src/core/sqlauthenticator.cpp index 201fd95f..969f2d02 100644 --- a/src/core/sqlauthenticator.cpp +++ b/src/core/sqlauthenticator.cpp @@ -32,11 +32,6 @@ SqlAuthenticator::SqlAuthenticator(QObject *parent) } -SqlAuthenticator::~SqlAuthenticator() -{ -} - - bool SqlAuthenticator::isAvailable() const { // FIXME: probably this should query the current storage (see the ::init routine too). diff --git a/src/core/sqlauthenticator.h b/src/core/sqlauthenticator.h index 3f24705e..8336151b 100644 --- a/src/core/sqlauthenticator.h +++ b/src/core/sqlauthenticator.h @@ -28,7 +28,6 @@ class SqlAuthenticator : public Authenticator public: SqlAuthenticator(QObject *parent = nullptr); - ~SqlAuthenticator() override; public slots: /* General */ diff --git a/src/core/sqlitestorage.cpp b/src/core/sqlitestorage.cpp index b5551733..b39c1873 100644 --- a/src/core/sqlitestorage.cpp +++ b/src/core/sqlitestorage.cpp @@ -34,11 +34,6 @@ SqliteStorage::SqliteStorage(QObject *parent) } -SqliteStorage::~SqliteStorage() -{ -} - - bool SqliteStorage::isAvailable() const { if (!QSqlDatabase::isDriverAvailable("QSQLITE")) return false; diff --git a/src/core/sqlitestorage.h b/src/core/sqlitestorage.h index c88a3c6d..58ae08c8 100644 --- a/src/core/sqlitestorage.h +++ b/src/core/sqlitestorage.h @@ -32,7 +32,6 @@ class SqliteStorage : public AbstractSqlStorage public: SqliteStorage(QObject *parent = nullptr); - ~SqliteStorage() override; std::unique_ptr createMigrationReader() override; diff --git a/src/core/storage.h b/src/core/storage.h index da09a2a2..85d2cad1 100644 --- a/src/core/storage.h +++ b/src/core/storage.h @@ -34,7 +34,6 @@ class Storage : public QObject public: Storage(QObject *parent = nullptr); - ~Storage() override {}; enum State { IsReady, // ready to go diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index 79ee339b..b88ac27e 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -949,11 +949,6 @@ ContentsChatItem::WrapColumnFinder::WrapColumnFinder(const ChatItem *_item) } -ContentsChatItem::WrapColumnFinder::~WrapColumnFinder() -{ -} - - qint16 ContentsChatItem::WrapColumnFinder::nextWrapColumn(qreal width) { if (wordidx >= wrapList.count()) diff --git a/src/qtui/chatitem.h b/src/qtui/chatitem.h index a945795e..5a231466 100644 --- a/src/qtui/chatitem.h +++ b/src/qtui/chatitem.h @@ -257,7 +257,6 @@ class ContentsChatItem::WrapColumnFinder { public: WrapColumnFinder(const ChatItem *parent); - ~WrapColumnFinder(); qint16 nextWrapColumn(qreal width); diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 78c33c88..1544284a 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -147,11 +147,6 @@ ChatScene::ChatScene(QAbstractItemModel *model, QString idString, qreal width, C } -ChatScene::~ChatScene() -{ -} - - ChatView *ChatScene::chatView() const { return _chatView; diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index 29e3d9e5..52580716 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -73,7 +73,6 @@ public: }; ChatScene(QAbstractItemModel *model, QString idString, qreal width, ChatView *parent); - ~ChatScene() override; inline QAbstractItemModel *model() const { return _model; } inline MessageFilter *filter() const { return qobject_cast(_model); } @@ -292,7 +291,6 @@ private: QRectF urlRect; PreviewState previewState{NoPreview}; QTimer timer; - WebPreview() {} }; WebPreview webPreview; #endif // HAVE_WEBKIT || HAVE_WEBENGINE diff --git a/src/qtui/debugconsole.cpp b/src/qtui/debugconsole.cpp index 3a64b05e..a5a6eee8 100644 --- a/src/qtui/debugconsole.cpp +++ b/src/qtui/debugconsole.cpp @@ -32,11 +32,6 @@ DebugConsole::DebugConsole(QWidget *parent) } -DebugConsole::~DebugConsole() -{ -} - - void DebugConsole::on_evalButton_clicked() { if (ui.selectCore->isChecked()) { diff --git a/src/qtui/debugconsole.h b/src/qtui/debugconsole.h index a2904e80..0033b416 100644 --- a/src/qtui/debugconsole.h +++ b/src/qtui/debugconsole.h @@ -29,7 +29,6 @@ class DebugConsole : public QDialog public: DebugConsole(QWidget *parent = nullptr); - ~DebugConsole() override; public slots: void scriptResult(QString result); diff --git a/src/qtui/inputwidget.cpp b/src/qtui/inputwidget.cpp index 3233f044..a8322076 100644 --- a/src/qtui/inputwidget.cpp +++ b/src/qtui/inputwidget.cpp @@ -154,11 +154,6 @@ InputWidget::InputWidget(QWidget *parent) } -InputWidget::~InputWidget() -{ -} - - void InputWidget::setUseCustomFont(const QVariant &v) { if (v.toBool()) { diff --git a/src/qtui/inputwidget.h b/src/qtui/inputwidget.h index 7ac1d4b7..47b876f3 100644 --- a/src/qtui/inputwidget.h +++ b/src/qtui/inputwidget.h @@ -42,7 +42,6 @@ class InputWidget : public AbstractItemView public: InputWidget(QWidget *parent = nullptr); - ~InputWidget() override; const Network *currentNetwork() const; @@ -185,7 +184,6 @@ private: QHash tempHistory; qint32 idx{0}; QString inputLine; - inline HistoryState() {}; }; QMap historyMap; diff --git a/src/qtui/qtuimessageprocessor.h b/src/qtui/qtuimessageprocessor.h index bf437660..3b331324 100644 --- a/src/qtui/qtuimessageprocessor.h +++ b/src/qtui/qtuimessageprocessor.h @@ -77,7 +77,7 @@ private: /** * Construct an empty highlight rule */ - LegacyHighlightRule() {} + LegacyHighlightRule() = default; /** * Construct a highlight rule with the given parameters diff --git a/src/qtui/qtuistyle.cpp b/src/qtui/qtuistyle.cpp index 7516c224..fd10e24a 100644 --- a/src/qtui/qtuistyle.cpp +++ b/src/qtui/qtuistyle.cpp @@ -42,8 +42,6 @@ QtUiStyle::QtUiStyle(QObject *parent) : UiStyle(parent) } -QtUiStyle::~QtUiStyle() {} - void QtUiStyle::updateUseCustomTimestampFormat() { ChatViewSettings s; diff --git a/src/qtui/qtuistyle.h b/src/qtui/qtuistyle.h index 903c78ed..f15ed1d2 100644 --- a/src/qtui/qtuistyle.h +++ b/src/qtui/qtuistyle.h @@ -30,7 +30,6 @@ class QtUiStyle : public UiStyle public: QtUiStyle(QObject *parent = nullptr); - ~QtUiStyle() override; virtual inline qreal firstColumnSeparator() const { return 6; } virtual inline qreal secondColumnSeparator() const { return 6; } @@ -59,7 +58,7 @@ private slots: * Updates knowledge of the current timestamp format */ void updateTimestampFormatString(); - + /** * Updates knowledge of how to display sender prefix modes */ diff --git a/src/uisupport/abstractbuffercontainer.cpp b/src/uisupport/abstractbuffercontainer.cpp index ac5e4636..f6e8de7b 100644 --- a/src/uisupport/abstractbuffercontainer.cpp +++ b/src/uisupport/abstractbuffercontainer.cpp @@ -30,11 +30,6 @@ AbstractBufferContainer::AbstractBufferContainer(QWidget *parent) } -AbstractBufferContainer::~AbstractBufferContainer() -{ -} - - void AbstractBufferContainer::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end) { Q_ASSERT(model()); diff --git a/src/uisupport/abstractbuffercontainer.h b/src/uisupport/abstractbuffercontainer.h index d0d9c8ba..9c02f26e 100644 --- a/src/uisupport/abstractbuffercontainer.h +++ b/src/uisupport/abstractbuffercontainer.h @@ -35,7 +35,6 @@ class UISUPPORT_EXPORT AbstractBufferContainer : public AbstractItemView public: AbstractBufferContainer(QWidget *parent); - ~AbstractBufferContainer() override; inline BufferId currentBuffer() const { return _currentBuffer; } @@ -83,6 +82,6 @@ private: class AbstractChatView { public: - virtual ~AbstractChatView() {}; + virtual ~AbstractChatView() = default; virtual MsgId lastMsgId() const = 0; }; diff --git a/src/uisupport/abstractnotificationbackend.h b/src/uisupport/abstractnotificationbackend.h index 86d09736..5f00daa7 100644 --- a/src/uisupport/abstractnotificationbackend.h +++ b/src/uisupport/abstractnotificationbackend.h @@ -54,7 +54,6 @@ public: }; inline AbstractNotificationBackend(QObject *parent) : QObject(parent) {}; - ~AbstractNotificationBackend() override {}; virtual void notify(const Notification &) = 0; virtual void close(uint notificationId) { Q_UNUSED(notificationId); } diff --git a/src/uisupport/actioncollection.cpp b/src/uisupport/actioncollection.cpp index a3aa6d69..2cc03e10 100644 --- a/src/uisupport/actioncollection.cpp +++ b/src/uisupport/actioncollection.cpp @@ -37,11 +37,6 @@ ActionCollection::ActionCollection(QObject *parent) : QObject(parent) } -ActionCollection::~ActionCollection() -{ -} - - void ActionCollection::clear() { _actionByName.clear(); diff --git a/src/uisupport/actioncollection.h b/src/uisupport/actioncollection.h index 10f7d933..d26c3577 100644 --- a/src/uisupport/actioncollection.h +++ b/src/uisupport/actioncollection.h @@ -43,7 +43,6 @@ class UISUPPORT_EXPORT ActionCollection : public QObject public: explicit ActionCollection(QObject *parent); - ~ActionCollection() override; /// Clears the entire action collection, deleting all actions. void clear(); diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp index 876f0b9e..e60d069c 100644 --- a/src/uisupport/multilineedit.cpp +++ b/src/uisupport/multilineedit.cpp @@ -73,10 +73,6 @@ MultiLineEdit::MultiLineEdit(QWidget *parent) } -MultiLineEdit::~MultiLineEdit() -{ -} - #if defined HAVE_SONNET && !defined HAVE_KDE Sonnet::Highlighter *MultiLineEdit::highlighter() const { diff --git a/src/uisupport/multilineedit.h b/src/uisupport/multilineedit.h index a8d2d130..bd061726 100644 --- a/src/uisupport/multilineedit.h +++ b/src/uisupport/multilineedit.h @@ -50,7 +50,6 @@ public: }; MultiLineEdit(QWidget *parent = nullptr); - ~MultiLineEdit() override; void setCustomFont(const QFont &); // should be used instead setFont(), so we can set our size correctly diff --git a/src/uisupport/networkmodelcontroller.cpp b/src/uisupport/networkmodelcontroller.cpp index d7dc64ee..3b29c938 100644 --- a/src/uisupport/networkmodelcontroller.cpp +++ b/src/uisupport/networkmodelcontroller.cpp @@ -47,11 +47,6 @@ NetworkModelController::NetworkModelController(QObject *parent) } -NetworkModelController::~NetworkModelController() -{ -} - - Action *NetworkModelController::registerAction(ActionType type, const QString &text, bool checkable) { return registerAction(type, QPixmap(), text, checkable); diff --git a/src/uisupport/networkmodelcontroller.h b/src/uisupport/networkmodelcontroller.h index 05117801..05d4ee36 100644 --- a/src/uisupport/networkmodelcontroller.h +++ b/src/uisupport/networkmodelcontroller.h @@ -38,7 +38,6 @@ class UISUPPORT_EXPORT NetworkModelController : public QObject public: NetworkModelController(QObject *parent = nullptr); - ~NetworkModelController() override; // don't change enums without doublechecking masks etc. in code enum ActionType { diff --git a/src/uisupport/settingspage.h b/src/uisupport/settingspage.h index fe71d739..730418e7 100644 --- a/src/uisupport/settingspage.h +++ b/src/uisupport/settingspage.h @@ -62,7 +62,6 @@ class UISUPPORT_EXPORT SettingsPage : public QWidget public: SettingsPage(QString category, QString name, QWidget *parent = nullptr); - ~SettingsPage() override {}; //! The category of this settings page. inline virtual QString category() const { return _category; } diff --git a/src/uisupport/toolbaractionprovider.cpp b/src/uisupport/toolbaractionprovider.cpp index 0ae1078d..9342628f 100644 --- a/src/uisupport/toolbaractionprovider.cpp +++ b/src/uisupport/toolbaractionprovider.cpp @@ -68,11 +68,6 @@ ToolBarActionProvider::ToolBarActionProvider(QObject *parent) } -ToolBarActionProvider::~ToolBarActionProvider() -{ -} - - void ToolBarActionProvider::disconnectedFromCore() { _currentBuffer = QModelIndex(); diff --git a/src/uisupport/toolbaractionprovider.h b/src/uisupport/toolbaractionprovider.h index 3a1f2d81..9d80d37b 100644 --- a/src/uisupport/toolbaractionprovider.h +++ b/src/uisupport/toolbaractionprovider.h @@ -32,7 +32,6 @@ class UISUPPORT_EXPORT ToolBarActionProvider : public NetworkModelController public: ToolBarActionProvider(QObject *parent = nullptr); - ~ToolBarActionProvider() override; enum ToolBarType { MainToolBar,