X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Finputwidget.h;h=47b876f36e7d0380073d1970e84a00a6f5792eb9;hb=c194ed5fb3d15e14b9364f9796d3521910dc72fe;hp=b4aaf0f5f10f2705bdf79eb6d910287152d1de3b;hpb=b7447afe8e836376776dac26704e227a678d2913;p=quassel.git diff --git a/src/qtui/inputwidget.h b/src/qtui/inputwidget.h index b4aaf0f5..47b876f3 100644 --- a/src/qtui/inputwidget.h +++ b/src/qtui/inputwidget.h @@ -41,8 +41,7 @@ class InputWidget : public AbstractItemView Q_OBJECT public: - InputWidget(QWidget *parent = 0); - virtual ~InputWidget(); + InputWidget(QWidget *parent = nullptr); const Network *currentNetwork() const; @@ -92,17 +91,16 @@ public slots: void clearFormat(); protected: - virtual bool eventFilter(QObject *watched, QEvent *event); + bool eventFilter(QObject *watched, QEvent *event) override; protected slots: - virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); - virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end); - virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); + void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override; + void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end) override; + void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override; private slots: void setCustomFont(const QVariant &font); void setUseCustomFont(const QVariant &); - void setEnableSpellCheck(const QVariant &); void setEnableEmacsMode(const QVariant &); void setShowNickSelector(const QVariant &); void setShowStyleButtons(const QVariant &); @@ -184,9 +182,8 @@ private: struct HistoryState { QStringList history; QHash tempHistory; - qint32 idx; + qint32 idx{0}; QString inputLine; - inline HistoryState() : idx(0) {}; }; QMap historyMap; @@ -198,6 +195,6 @@ class MouseWheelFilter : public QObject Q_OBJECT public: - MouseWheelFilter(QObject *parent = 0); - virtual bool eventFilter(QObject *obj, QEvent *event); + MouseWheelFilter(QObject *parent = nullptr); + bool eventFilter(QObject *obj, QEvent *event) override; };