Also remove lots of unnecessary, empty ctors and dtors.
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;
};
BacklogRequester(bool buffering, RequesterType requesterType, ClientBacklogManager *backlogManger);
- virtual inline ~BacklogRequester() {}
+ virtual ~BacklogRequester() = default;
inline bool isBuffering() { return _isBuffering; }
inline RequesterType type() { return _requesterType; }
}
-ClientSettings::~ClientSettings()
-{
-}
-
-
/***********************************************************************************************/
CoreAccountSettings::CoreAccountSettings(QString subgroup)
class CLIENT_EXPORT ClientSettings : public Settings
{
-public:
- ~ClientSettings() override;
protected:
ClientSettings(QString group = "General");
public:
CoreAccount(AccountId accountId = 0);
- virtual ~CoreAccount() {};
+ virtual ~CoreAccount() = default;
inline bool isValid() const { return accountId().isValid(); }
inline AccountId accountId() const { return _accountId; }
// **************************************************
// 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);
}
-SimpleTreeItem::~SimpleTreeItem()
-{
-}
-
-
QVariant SimpleTreeItem::data(int column, int role) const
{
if (column >= columnCount() || role != Qt::DisplayRole)
public:
SimpleTreeItem(QList<QVariant> data, AbstractTreeItem *parent = nullptr);
- ~SimpleTreeItem() override;
QVariant data(int column, int role) const override;
bool setData(int column, const QVariant &value, int role) override;
{
public:
explicit Event(EventManager::EventType type = EventManager::Invalid);
- virtual ~Event() {}
+ virtual ~Event() = default;
inline EventManager::EventType type() const { return _type; }
/**
* Construct an empty ExpressionMatch
*/
- ExpressionMatch() {}
+ ExpressionMatch() = default;
/**
* Construct an Expression match with the given parameters
/**
* Construct an empty highlight rule
*/
- HighlightRule() {}
+ HighlightRule() = default;
/**
* Construct a highlight rule with the given parameters
/**
* Construct an empty ignore rule
*/
- IgnoreListItem() {}
+ IgnoreListItem() = default;
/**
* Construct an ignore rule with the given parameters
}
-IrcChannel::~IrcChannel()
-{
-}
-
-
// ====================
// PUBLIC:
// ====================
public :
IrcChannel(const QString &channelname, Network *network);
- ~IrcChannel() override;
bool isKnownUser(IrcUser *ircuser) const;
bool isValidChannelUserMode(const QString &mode) const;
}
-IrcUser::~IrcUser()
-{
-}
-
-
// ====================
// PUBLIC:
// ====================
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; }
/**
* Construct an empty NicknameMatcher
*/
- NickHighlightMatcher() {}
+ NickHighlightMatcher() = default;
/**
* Construct a configured NicknameMatcher
struct SetupDone : public HandshakeMessage
{
- inline SetupDone() {}
};
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)) {}
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_; }
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;
{
public:
MethodDescriptor(const QMetaMethod &method);
- MethodDescriptor() {}
+ MethodDescriptor() = default;
inline const QByteArray &methodName() const { return _methodName; }
inline const QList<int> &argTypes() const { return _argTypes; }
// ========================================
// AbstractSqlMigrator
// ========================================
-AbstractSqlMigrator::AbstractSqlMigrator()
-{
-}
-
void AbstractSqlMigrator::newQuery(const QString &query, QSqlDatabase db)
{
QString sender;
QString realname;
QString avatarurl;
- SenderMO() {}
};
struct IdentityMO {
CoreState
};
- AbstractSqlMigrator();
- virtual ~AbstractSqlMigrator() {}
+ virtual ~AbstractSqlMigrator() = default;
static QString migrationObject(MigrationObject moType);
}
-Cipher::~Cipher()
-{}
-
bool Cipher::setKey(QByteArray key)
{
if (key.isEmpty()) {
public:
Cipher();
explicit Cipher(QByteArray key, QString cipherType = QString("blowfish"));
- ~Cipher();
QByteArray decrypt(QByteArray cipher);
QByteArray decryptTopic(QByteArray cipher);
bool encrypt(QByteArray &cipher);
}
-CoreSettings::~CoreSettings()
-{
-}
-
-
void CoreSettings::setStorageSettings(const QVariant &data)
{
setLocalValue("StorageSettings", data);
class CoreSettings : public Settings
{
public:
- ~CoreSettings() override;
CoreSettings(const QString group = "Core");
void setStorageSettings(const QVariant &data);
BufferInfo bufferInfo;
QString command;
Command(BufferInfo info, QString command) : bufferInfo(std::move(info)), command(std::move(command)) {}
- Command() {}
+ Command() = default;
};
QHash<int, Command> _delayedCommands;
QString bufferName;
QList<QByteArray> replies;
- CtcpReply() {}
+ CtcpReply() = default;
CtcpReply(CoreNetwork *net, QString buf) : network(net), bufferName(std::move(buf)) {}
};
}
-PostgreSqlStorage::~PostgreSqlStorage()
-{
-}
-
-
std::unique_ptr<AbstractSqlMigrationWriter> PostgreSqlStorage::createMigrationWriter()
{
auto writer = new PostgreSqlMigrationWriter();
public:
PostgreSqlStorage(QObject *parent = nullptr);
- ~PostgreSqlStorage() override;
std::unique_ptr<AbstractSqlMigrationWriter> createMigrationWriter() override;
}
-SqlAuthenticator::~SqlAuthenticator()
-{
-}
-
-
bool SqlAuthenticator::isAvailable() const
{
// FIXME: probably this should query the current storage (see the ::init routine too).
public:
SqlAuthenticator(QObject *parent = nullptr);
- ~SqlAuthenticator() override;
public slots:
/* General */
}
-SqliteStorage::~SqliteStorage()
-{
-}
-
-
bool SqliteStorage::isAvailable() const
{
if (!QSqlDatabase::isDriverAvailable("QSQLITE")) return false;
public:
SqliteStorage(QObject *parent = nullptr);
- ~SqliteStorage() override;
std::unique_ptr<AbstractSqlMigrationReader> createMigrationReader() override;
public:
Storage(QObject *parent = nullptr);
- ~Storage() override {};
enum State {
IsReady, // ready to go
}
-ContentsChatItem::WrapColumnFinder::~WrapColumnFinder()
-{
-}
-
-
qint16 ContentsChatItem::WrapColumnFinder::nextWrapColumn(qreal width)
{
if (wordidx >= wrapList.count())
{
public:
WrapColumnFinder(const ChatItem *parent);
- ~WrapColumnFinder();
qint16 nextWrapColumn(qreal width);
}
-ChatScene::~ChatScene()
-{
-}
-
-
ChatView *ChatScene::chatView() const
{
return _chatView;
};
ChatScene(QAbstractItemModel *model, QString idString, qreal width, ChatView *parent);
- ~ChatScene() override;
inline QAbstractItemModel *model() const { return _model; }
inline MessageFilter *filter() const { return qobject_cast<MessageFilter *>(_model); }
QRectF urlRect;
PreviewState previewState{NoPreview};
QTimer timer;
- WebPreview() {}
};
WebPreview webPreview;
#endif // HAVE_WEBKIT || HAVE_WEBENGINE
}
-DebugConsole::~DebugConsole()
-{
-}
-
-
void DebugConsole::on_evalButton_clicked()
{
if (ui.selectCore->isChecked()) {
public:
DebugConsole(QWidget *parent = nullptr);
- ~DebugConsole() override;
public slots:
void scriptResult(QString result);
}
-InputWidget::~InputWidget()
-{
-}
-
-
void InputWidget::setUseCustomFont(const QVariant &v)
{
if (v.toBool()) {
public:
InputWidget(QWidget *parent = nullptr);
- ~InputWidget() override;
const Network *currentNetwork() const;
QHash<int, QString> tempHistory;
qint32 idx{0};
QString inputLine;
- inline HistoryState() {};
};
QMap<BufferId, HistoryState> historyMap;
/**
* Construct an empty highlight rule
*/
- LegacyHighlightRule() {}
+ LegacyHighlightRule() = default;
/**
* Construct a highlight rule with the given parameters
}
-QtUiStyle::~QtUiStyle() {}
-
void QtUiStyle::updateUseCustomTimestampFormat()
{
ChatViewSettings s;
public:
QtUiStyle(QObject *parent = nullptr);
- ~QtUiStyle() override;
virtual inline qreal firstColumnSeparator() const { return 6; }
virtual inline qreal secondColumnSeparator() const { return 6; }
* Updates knowledge of the current timestamp format
*/
void updateTimestampFormatString();
-
+
/**
* Updates knowledge of how to display sender prefix modes
*/
}
-AbstractBufferContainer::~AbstractBufferContainer()
-{
-}
-
-
void AbstractBufferContainer::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
{
Q_ASSERT(model());
public:
AbstractBufferContainer(QWidget *parent);
- ~AbstractBufferContainer() override;
inline BufferId currentBuffer() const { return _currentBuffer; }
class AbstractChatView
{
public:
- virtual ~AbstractChatView() {};
+ virtual ~AbstractChatView() = default;
virtual MsgId lastMsgId() const = 0;
};
};
inline AbstractNotificationBackend(QObject *parent) : QObject(parent) {};
- ~AbstractNotificationBackend() override {};
virtual void notify(const Notification &) = 0;
virtual void close(uint notificationId) { Q_UNUSED(notificationId); }
}
-ActionCollection::~ActionCollection()
-{
-}
-
-
void ActionCollection::clear()
{
_actionByName.clear();
public:
explicit ActionCollection(QObject *parent);
- ~ActionCollection() override;
/// Clears the entire action collection, deleting all actions.
void clear();
}
-MultiLineEdit::~MultiLineEdit()
-{
-}
-
#if defined HAVE_SONNET && !defined HAVE_KDE
Sonnet::Highlighter *MultiLineEdit::highlighter() const
{
};
MultiLineEdit(QWidget *parent = nullptr);
- ~MultiLineEdit() override;
void setCustomFont(const QFont &); // should be used instead setFont(), so we can set our size correctly
}
-NetworkModelController::~NetworkModelController()
-{
-}
-
-
Action *NetworkModelController::registerAction(ActionType type, const QString &text, bool checkable)
{
return registerAction(type, QPixmap(), text, checkable);
public:
NetworkModelController(QObject *parent = nullptr);
- ~NetworkModelController() override;
// don't change enums without doublechecking masks etc. in code
enum ActionType {
public:
SettingsPage(QString category, QString name, QWidget *parent = nullptr);
- ~SettingsPage() override {};
//! The category of this settings page.
inline virtual QString category() const { return _category; }
}
-ToolBarActionProvider::~ToolBarActionProvider()
-{
-}
-
-
void ToolBarActionProvider::disconnectedFromCore()
{
_currentBuffer = QModelIndex();
public:
ToolBarActionProvider(QObject *parent = nullptr);
- ~ToolBarActionProvider() override;
enum ToolBarType {
MainToolBar,