Commit 8cb82291 authored by David Faure's avatar David Faure
Browse files

Add Q_DECL_OVERRIDE where appropriate (thanks to gcc's -Wsuggest-override)

parent 8a4a4a16
...@@ -52,8 +52,8 @@ private: ...@@ -52,8 +52,8 @@ private:
QDate & string2Date(const QString &, QDate * ); QDate & string2Date(const QString &, QDate * );
protected: protected:
bool eventFilter (QObject*, QEvent*); bool eventFilter (QObject*, QEvent*) Q_DECL_OVERRIDE;
virtual void mousePressEvent (QMouseEvent * e); void mousePressEvent (QMouseEvent * e) Q_DECL_OVERRIDE;
protected Q_SLOTS: protected Q_SLOTS:
void dateEnteredEvent(const QDate &d=QDate()); void dateEnteredEvent(const QDate &d=QDate());
......
...@@ -66,15 +66,15 @@ class KFindItemModel: public QAbstractTableModel ...@@ -66,15 +66,15 @@ class KFindItemModel: public QAbstractTableModel
void clear(); void clear();
Qt::DropActions supportedDropActions() const { return Qt::CopyAction | Qt::MoveAction; } Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE { return Qt::CopyAction | Qt::MoveAction; }
Qt::ItemFlags flags(const QModelIndex &) const; Qt::ItemFlags flags(const QModelIndex &) const Q_DECL_OVERRIDE;
QMimeData * mimeData(const QModelIndexList &) const; QMimeData * mimeData(const QModelIndexList &) const Q_DECL_OVERRIDE;
int columnCount ( const QModelIndex & parent = QModelIndex() ) const { Q_UNUSED(parent); return 6; } int columnCount ( const QModelIndex & parent = QModelIndex() ) const Q_DECL_OVERRIDE { Q_UNUSED(parent); return 6; }
int rowCount ( const QModelIndex & parent = QModelIndex() ) const; int rowCount ( const QModelIndex & parent = QModelIndex() ) const Q_DECL_OVERRIDE;
QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const; QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
KFindItem itemAtIndex( const QModelIndex & index ) const; KFindItem itemAtIndex( const QModelIndex & index ) const;
...@@ -94,7 +94,7 @@ class KFindSortFilterProxyModel: public QSortFilterProxyModel ...@@ -94,7 +94,7 @@ class KFindSortFilterProxyModel: public QSortFilterProxyModel
QSortFilterProxyModel(parent){} QSortFilterProxyModel(parent){}
protected: protected:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const; bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
}; };
...@@ -136,7 +136,7 @@ class KFindTreeView: public QTreeView ...@@ -136,7 +136,7 @@ class KFindTreeView: public QTreeView
void updateMouseButtons(); void updateMouseButtons();
protected: protected:
void dragMoveEvent( QDragMoveEvent *e ) { e->accept(); } void dragMoveEvent( QDragMoveEvent *e ) Q_DECL_OVERRIDE { e->accept(); }
Q_SIGNALS: Q_SIGNALS:
void resultSelected(bool); void resultSelected(bool);
......
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
void setURL( const QUrl & url ); void setURL( const QUrl & url );
virtual QSize sizeHint() const; QSize sizeHint() const Q_DECL_OVERRIDE;
public Q_SLOTS: public Q_SLOTS:
void setFocus(); void setFocus();
...@@ -147,7 +147,7 @@ public: ...@@ -147,7 +147,7 @@ public:
KDigitValidator(QWidget * parent); KDigitValidator(QWidget * parent);
~KDigitValidator(); ~KDigitValidator();
QValidator::State validate(QString & input, int &) const; QValidator::State validate(QString & input, int &) const Q_DECL_OVERRIDE;
private: private:
QRegExp *r; QRegExp *r;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment