modernize: Prefer default member init over ctor init
[quassel.git] / src / qtui / inputwidget.h
index b4aaf0f..7ac1d4b 100644 (file)
@@ -41,8 +41,8 @@ class InputWidget : public AbstractItemView
     Q_OBJECT
 
 public:
-    InputWidget(QWidget *parent = 0);
-    virtual ~InputWidget();
+    InputWidget(QWidget *parent = nullptr);
+    ~InputWidget() override;
 
     const Network *currentNetwork() const;
 
@@ -92,17 +92,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 &current, 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 &current, 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 +183,9 @@ private:
     struct HistoryState {
         QStringList history;
         QHash<int, QString> tempHistory;
-        qint32 idx;
+        qint32 idx{0};
         QString inputLine;
-        inline HistoryState() : idx(0) {};
+        inline HistoryState()  {};
     };
 
     QMap<BufferId, HistoryState> historyMap;
@@ -198,6 +197,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;
 };