Commit 2ff10f2f authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent 84287a2f
......@@ -42,10 +42,10 @@ class SettingsBase : public KXmlGuiWindow
public:
explicit SettingsBase(QWidget * parent = 0);
~SettingsBase();
bool queryClose();
bool queryClose() Q_DECL_OVERRIDE;
protected:
virtual QSize sizeHint() const;
QSize sizeHint() const Q_DECL_OVERRIDE;
private Q_SLOTS:
void initApplication();
......
......@@ -57,7 +57,7 @@ public Q_SLOTS:
void hideToolTip();
protected:
virtual bool eventFilter(QObject* watched, QEvent* event);
bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
private Q_SLOTS:
void prepareToolTip();
......
......@@ -32,25 +32,25 @@ class ClassicMode : public BaseMode
public:
ClassicMode(QObject * parent, const QVariantList& );
~ClassicMode();
void initEvent();
void leaveModuleView();
QWidget * mainWidget();
KAboutData * aboutData();
ModuleView * moduleView() const;
void initEvent() Q_DECL_OVERRIDE;
void leaveModuleView() Q_DECL_OVERRIDE;
QWidget * mainWidget() Q_DECL_OVERRIDE;
KAboutData * aboutData() Q_DECL_OVERRIDE;
ModuleView * moduleView() const Q_DECL_OVERRIDE;
protected:
QList<QAbstractItemView*> views() const;
QList<QAbstractItemView*> views() const Q_DECL_OVERRIDE;
public Q_SLOTS:
void expandColumns();
void searchChanged( const QString& text );
void searchChanged( const QString& text ) Q_DECL_OVERRIDE;
void selectModule( const QModelIndex& selectedModule );
void changeModule( const QModelIndex& activeModule );
void saveState();
void giveFocus();
void addConfiguration( KConfigDialog * config );
void loadConfiguration();
void saveConfiguration();
void saveState() Q_DECL_OVERRIDE;
void giveFocus() Q_DECL_OVERRIDE;
void addConfiguration( KConfigDialog * config ) Q_DECL_OVERRIDE;
void loadConfiguration() Q_DECL_OVERRIDE;
void saveConfiguration() Q_DECL_OVERRIDE;
private Q_SLOTS:
void moduleLoaded();
......
......@@ -36,7 +36,7 @@ public:
~ExternalAppModule();
protected:
void showEvent(QShowEvent * event);
void showEvent(QShowEvent * event) Q_DECL_OVERRIDE;
private Q_SLOTS:
void runExternal();
......
......@@ -63,7 +63,7 @@ public:
* @param role The information role you want information about.
* @returns The data requested for the role provided from the QModelIndex provided.
*/
QVariant data( const QModelIndex &index, int role ) const;
QVariant data( const QModelIndex &index, int role ) const Q_DECL_OVERRIDE;
/**
* Please see Qt QAbstractItemModel documentation for more details.\n
......@@ -72,7 +72,7 @@ public:
*
* @returns The flags for the QModelIndex provided.
*/
Qt::ItemFlags flags( const QModelIndex &index ) const;
Qt::ItemFlags flags( const QModelIndex &index ) const Q_DECL_OVERRIDE;
/**
* Please see Qt QAbstractItemModel documentation for more details.\n
......@@ -83,7 +83,7 @@ public:
* @param parent The parent of the requested child.
* @returns The QModelIndex for the item requested.
*/
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE;
/**
* Please see Qt QAbstractItemModel documentation for more details.\n
......@@ -92,7 +92,7 @@ public:
* @param index The child of the parent.
* @returns A QModelIndex for the parent.
*/
QModelIndex parent( const QModelIndex &index ) const;
QModelIndex parent( const QModelIndex &index ) const Q_DECL_OVERRIDE;
/**
* Please see Qt QAbstractItemModel documentation for more details.\n
......@@ -101,7 +101,7 @@ public:
* @param parent The QModelIndex the count is performed on.
* @returns The number of rows ( children ) in the parent.
*/
int rowCount( const QModelIndex &parent = QModelIndex() ) const;
int rowCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE;
/**
* Please see Qt QAbstractItemModel documentation for more details.\n
......@@ -110,7 +110,7 @@ public:
* @param parent This is ignored, as the count is always 1.
* @returns The number of columns ( 1 ) in the parent.
*/
int columnCount( const QModelIndex &parent = QModelIndex() ) const;
int columnCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE;
/**
* Makes the MenuItem specified be hidden from the list, while still showing its children.\n
......
......@@ -50,7 +50,7 @@ public:
*/
MenuProxyModel( QObject *parent = 0 );
QHash<int, QByteArray> roleNames() const;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
/**
* Please see the Qt QSortFilterProxyModel documentation for further information.\n
......@@ -60,7 +60,7 @@ public:
* @param right the QModelIndex to compare aganist.
* @returns true if the left is below the right.
*/
virtual bool lessThan( const QModelIndex &left, const QModelIndex &right ) const;
bool lessThan( const QModelIndex &left, const QModelIndex &right ) const Q_DECL_OVERRIDE;
/**
* Please see the KDE KCategorizedSortFilterProxyModel documentation for futher information.\n
......@@ -70,7 +70,7 @@ public:
* @param right the QModelIndex to compare aganist.
* @returns true if the left is below the right.
*/
virtual bool subSortLessThan( const QModelIndex &left, const QModelIndex &right ) const;
bool subSortLessThan( const QModelIndex &left, const QModelIndex &right ) const Q_DECL_OVERRIDE;
/**
* Please see the Qt QSortFilterProxyModel documentation for futher information.\n
......@@ -80,7 +80,7 @@ public:
* @param source_parent Please see QSortFilterProxyModel documentation.
* @returns true if the row should be displayed, false if it should not.
*/
virtual bool filterAcceptsRow( int source_column, const QModelIndex &source_parent ) const;
bool filterAcceptsRow( int source_column, const QModelIndex &source_parent ) const Q_DECL_OVERRIDE;
/**
* Please see Qt QAbstractItemModel documentation for more details.\n
......@@ -89,7 +89,7 @@ public:
*
* @returns The flags for the QModelIndex provided.
*/
Qt::ItemFlags flags( const QModelIndex &index ) const;
Qt::ItemFlags flags( const QModelIndex &index ) const Q_DECL_OVERRIDE;
/**
* Please see Qt QAbstractItemModel documentation for more details.\n
......
......@@ -127,7 +127,7 @@ public Q_SLOTS:
/**
* Reimplemented for internal reasons.\n
*/
void keyPressEvent( QKeyEvent * event );
void keyPressEvent( QKeyEvent * event ) Q_DECL_OVERRIDE;
private:
bool resolveChanges( KCModuleProxy *currentProxy );
......
......@@ -27,9 +27,9 @@ class CategorizedView : public KCategorizedView
public:
CategorizedView( QWidget *parent = 0 );
virtual void setModel( QAbstractItemModel *model );
void setModel( QAbstractItemModel *model ) Q_DECL_OVERRIDE;
protected:
virtual void wheelEvent(QWheelEvent *);
void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE;
};
#endif
......@@ -32,14 +32,14 @@ class CategoryDrawer : public KCategoryDrawer
public:
CategoryDrawer(KCategorizedView *view);
virtual void drawCategory(const QModelIndex &index,
void drawCategory(const QModelIndex &index,
int sortRole,
const QStyleOption &option,
QPainter *painter) const;
QPainter *painter) const Q_DECL_OVERRIDE;
virtual int categoryHeight(const QModelIndex &index, const QStyleOption &option) const;
virtual int leftMargin() const;
virtual int rightMargin() const;
int categoryHeight(const QModelIndex &index, const QStyleOption &option) const Q_DECL_OVERRIDE;
int leftMargin() const Q_DECL_OVERRIDE;
int rightMargin() const Q_DECL_OVERRIDE;
};
#endif
......@@ -34,18 +34,18 @@ class IconMode : public BaseMode
public:
IconMode(QObject * parent, const QVariantList& );
~IconMode();
QWidget * mainWidget();
void initEvent();
void giveFocus();
void leaveModuleView();
KAboutData * aboutData();
ModuleView * moduleView() const;
QWidget * mainWidget() Q_DECL_OVERRIDE;
void initEvent() Q_DECL_OVERRIDE;
void giveFocus() Q_DECL_OVERRIDE;
void leaveModuleView() Q_DECL_OVERRIDE;
KAboutData * aboutData() Q_DECL_OVERRIDE;
ModuleView * moduleView() const Q_DECL_OVERRIDE;
protected:
QList<QAbstractItemView*> views() const;
QList<QAbstractItemView*> views() const Q_DECL_OVERRIDE;
public Q_SLOTS:
void searchChanged( const QString& text );
void searchChanged( const QString& text ) Q_DECL_OVERRIDE;
private Q_SLOTS:
void changeModule( const QModelIndex& activeModule );
......
......@@ -27,9 +27,9 @@ class CategorizedView : public KCategorizedView
public:
CategorizedView( QWidget *parent = 0 );
virtual void setModel( QAbstractItemModel *model );
void setModel( QAbstractItemModel *model ) Q_DECL_OVERRIDE;
protected:
virtual void wheelEvent(QWheelEvent *);
void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE;
};
#endif
......@@ -32,14 +32,14 @@ class CategoryDrawer : public KCategoryDrawer
public:
CategoryDrawer(KCategorizedView *view);
virtual void drawCategory(const QModelIndex &index,
void drawCategory(const QModelIndex &index,
int sortRole,
const QStyleOption &option,
QPainter *painter) const;
QPainter *painter) const Q_DECL_OVERRIDE;
virtual int categoryHeight(const QModelIndex &index, const QStyleOption &option) const;
virtual int leftMargin() const;
virtual int rightMargin() const;
int categoryHeight(const QModelIndex &index, const QStyleOption &option) const Q_DECL_OVERRIDE;
int leftMargin() const Q_DECL_OVERRIDE;
int rightMargin() const Q_DECL_OVERRIDE;
};
#endif
......@@ -41,12 +41,12 @@ class SidebarMode : public BaseMode
public:
SidebarMode(QObject * parent, const QVariantList& );
~SidebarMode();
QWidget * mainWidget();
void initEvent();
void giveFocus();
void leaveModuleView();
KAboutData * aboutData();
ModuleView * moduleView() const;
QWidget * mainWidget() Q_DECL_OVERRIDE;
void initEvent() Q_DECL_OVERRIDE;
void giveFocus() Q_DECL_OVERRIDE;
void leaveModuleView() Q_DECL_OVERRIDE;
KAboutData * aboutData() Q_DECL_OVERRIDE;
ModuleView * moduleView() const Q_DECL_OVERRIDE;
QAbstractItemModel *categoryModel() const;
QAbstractItemModel *subCategoryModel() const;
......@@ -63,8 +63,8 @@ public:
Q_INVOKABLE void hideToolTip();
protected:
QList<QAbstractItemView*> views() const;
bool eventFilter(QObject* watched, QEvent* event);
QList<QAbstractItemView*> views() const Q_DECL_OVERRIDE;
bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
private Q_SLOTS:
void changeModule( const QModelIndex& activeModule );
......
......@@ -59,7 +59,7 @@ public Q_SLOTS:
void requestToolTip(const QModelIndex& index, const QRect &rect);
protected:
virtual bool eventFilter(QObject* watched, QEvent* event);
bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
private Q_SLOTS:
void prepareToolTip();
......
Markdown is supported
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