Commit 8fbebfd4 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use override

parent 1907b6e2
......@@ -41,11 +41,11 @@ class SettingsBase : public KXmlGuiWindow
public:
explicit SettingsBase(QWidget * parent = nullptr);
~SettingsBase();
bool queryClose() Q_DECL_OVERRIDE;
~SettingsBase() override;
bool queryClose() override;
protected:
QSize sizeHint() const Q_DECL_OVERRIDE;
QSize sizeHint() const override;
private Q_SLOTS:
void initApplication();
......
......@@ -35,7 +35,7 @@ class SystemSettingsApp : public QApplication
public:
SystemSettingsApp(int& argc, char* argv[]);
~SystemSettingsApp();
~SystemSettingsApp() override;
void setMainWindow(SettingsBase * main);
......
......@@ -45,7 +45,7 @@ public:
* @param parent The view which will have the tooltips displayed for.
*/
explicit ToolTipManager(QAbstractItemView* parent);
virtual ~ToolTipManager();
~ToolTipManager() override;
public Q_SLOTS:
/**
......@@ -56,7 +56,7 @@ public Q_SLOTS:
void hideToolTip();
protected:
bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
bool eventFilter(QObject* watched, QEvent* event) override;
private Q_SLOTS:
void prepareToolTip();
......
......@@ -31,7 +31,7 @@ class CategoryList : public QWidget
public:
explicit CategoryList( QWidget *parent, QAbstractItemModel *model );
virtual ~CategoryList();
~CategoryList() override;
void changeModule( const QModelIndex &newItem);
......
......@@ -31,27 +31,27 @@ class ClassicMode : public BaseMode
public:
ClassicMode(QObject * parent, const QVariantList& );
~ClassicMode();
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;
~ClassicMode() override;
void initEvent() override;
void leaveModuleView() override;
QWidget * mainWidget() override;
KAboutData * aboutData() override;
ModuleView * moduleView() const override;
protected:
QList<QAbstractItemView*> views() const Q_DECL_OVERRIDE;
bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
QList<QAbstractItemView*> views() const override;
bool eventFilter(QObject* watched, QEvent* event) override;
public Q_SLOTS:
void expandColumns();
void searchChanged( const QString& text ) Q_DECL_OVERRIDE;
void searchChanged( const QString& text ) override;
void selectModule( const QModelIndex& selectedModule );
void changeModule( const QModelIndex& activeModule );
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;
void saveState() override;
void giveFocus() override;
void addConfiguration( KConfigDialog * config ) override;
void loadConfiguration() override;
void saveConfiguration() override;
private Q_SLOTS:
void moduleLoaded();
......
......@@ -55,7 +55,7 @@ public:
* Normal destructor that handles cleanup. Any objects created through BaseData must be assumed
* to be invalid afterwards.
*/
~BaseData();
~BaseData() override;
/**
* Provides the shared MenuItem which lists all categories and modules, for use with MenuModel.
......
......@@ -67,7 +67,7 @@ public:
* Normal destructor. Plugin developers only need destroy what they created
* not what is provided by BaseMode itself.
*/
virtual ~BaseMode();
~BaseMode() override;
/**
* These flags are used to control the presence of the Search and Configure actions on the toolbar
......
......@@ -33,10 +33,10 @@ class ExternalAppModule : public QWidget
public:
explicit ExternalAppModule(QWidget * parent = 0, KCModuleInfo * module = 0);
~ExternalAppModule();
~ExternalAppModule() override;
protected:
void showEvent(QShowEvent * event) Q_DECL_OVERRIDE;
void showEvent(QShowEvent * event) override;
private Q_SLOTS:
void runExternal();
......
......@@ -53,7 +53,7 @@ public:
/**
* Destroys the MenuModel. The menuRoot will not be destroyed.
*/
~MenuModel();
~MenuModel() override;
/**
* Please see Qt QAbstractItemModel documentation for more details.\n
......@@ -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 Q_DECL_OVERRIDE;
QVariant data( const QModelIndex &index, int role ) const 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 Q_DECL_OVERRIDE;
Qt::ItemFlags flags( const QModelIndex &index ) const 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 Q_DECL_OVERRIDE;
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const 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 Q_DECL_OVERRIDE;
QModelIndex parent( const QModelIndex &index ) const 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 Q_DECL_OVERRIDE;
int rowCount( const QModelIndex &parent = QModelIndex() ) const 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 Q_DECL_OVERRIDE;
int columnCount( const QModelIndex &parent = QModelIndex() ) const 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 Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const 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.
*/
bool lessThan( const QModelIndex &left, const QModelIndex &right ) const Q_DECL_OVERRIDE;
bool lessThan( const QModelIndex &left, const QModelIndex &right ) const 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.
*/
bool subSortLessThan( const QModelIndex &left, const QModelIndex &right ) const Q_DECL_OVERRIDE;
bool subSortLessThan( const QModelIndex &left, const QModelIndex &right ) const 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.
*/
bool filterAcceptsRow( int source_column, const QModelIndex &source_parent ) const Q_DECL_OVERRIDE;
bool filterAcceptsRow( int source_column, const QModelIndex &source_parent ) const 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 Q_DECL_OVERRIDE;
Qt::ItemFlags flags( const QModelIndex &index ) const override;
/**
* Please see Qt QAbstractItemModel documentation for more details.\n
......
......@@ -62,7 +62,7 @@ public:
*
* @warning The user will not be prompted to save changes if any exist.\n
*/
~ModuleView();
~ModuleView() override;
/**
* Provides the module information, which is used to set the caption of the window when either the
......@@ -127,7 +127,7 @@ public Q_SLOTS:
/**
* Reimplemented for internal reasons.\n
*/
void keyPressEvent( QKeyEvent * event ) Q_DECL_OVERRIDE;
void keyPressEvent( QKeyEvent * event ) override;
private:
bool resolveChanges( KCModuleProxy *currentProxy );
......
......@@ -27,9 +27,9 @@ class CategorizedView : public KCategorizedView
public:
CategorizedView( QWidget *parent = 0 );
void setModel( QAbstractItemModel *model ) Q_DECL_OVERRIDE;
void setModel( QAbstractItemModel *model ) override;
protected:
void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE;
void wheelEvent(QWheelEvent *) override;
};
#endif
......@@ -35,11 +35,11 @@ public:
void drawCategory(const QModelIndex &index,
int sortRole,
const QStyleOption &option,
QPainter *painter) const Q_DECL_OVERRIDE;
QPainter *painter) const override;
int categoryHeight(const QModelIndex &index, const QStyleOption &option) const Q_DECL_OVERRIDE;
int leftMargin() const Q_DECL_OVERRIDE;
int rightMargin() const Q_DECL_OVERRIDE;
int categoryHeight(const QModelIndex &index, const QStyleOption &option) const override;
int leftMargin() const override;
int rightMargin() const override;
};
#endif
......@@ -33,20 +33,20 @@ class IconMode : public BaseMode
public:
IconMode(QObject * parent, const QVariantList& );
~IconMode();
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;
~IconMode() override;
QWidget * mainWidget() override;
void initEvent() override;
void giveFocus() override;
void leaveModuleView() override;
KAboutData * aboutData() override;
ModuleView * moduleView() const override;
protected:
QList<QAbstractItemView*> views() const Q_DECL_OVERRIDE;
bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
QList<QAbstractItemView*> views() const override;
bool eventFilter(QObject* watched, QEvent* event) override;
public Q_SLOTS:
void searchChanged( const QString& text ) Q_DECL_OVERRIDE;
void searchChanged( const QString& text ) override;
private Q_SLOTS:
void changeModule( const QModelIndex& activeModule );
......
......@@ -27,9 +27,9 @@ class CategorizedView : public KCategorizedView
public:
CategorizedView( QWidget *parent = 0 );
void setModel( QAbstractItemModel *model ) Q_DECL_OVERRIDE;
void setModel( QAbstractItemModel *model ) override;
protected:
void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE;
void wheelEvent(QWheelEvent *) override;
};
#endif
......@@ -35,11 +35,11 @@ public:
void drawCategory(const QModelIndex &index,
int sortRole,
const QStyleOption &option,
QPainter *painter) const Q_DECL_OVERRIDE;
QPainter *painter) const override;
int categoryHeight(const QModelIndex &index, const QStyleOption &option) const Q_DECL_OVERRIDE;
int leftMargin() const Q_DECL_OVERRIDE;
int rightMargin() const Q_DECL_OVERRIDE;
int categoryHeight(const QModelIndex &index, const QStyleOption &option) const override;
int leftMargin() const override;
int rightMargin() const override;
};
#endif
......@@ -28,12 +28,12 @@ class SidebarDelegate : public QAbstractItemDelegate
public:
explicit SidebarDelegate(QObject *parent = nullptr);
~SidebarDelegate();
~SidebarDelegate() override;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
protected:
void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const;
......
......@@ -162,7 +162,7 @@ public:
updateModel();
}
QHash<int, QByteArray> roleNames() const
QHash<int, QByteArray> roleNames() const override
{
QHash<int, QByteArray> roleNames;
roleNames.insert(Qt::DisplayRole, "display");
......
......@@ -34,7 +34,7 @@ class FocusHackWidget : public QWidget {
Q_OBJECT
public:
FocusHackWidget(QWidget *parent = nullptr);
~FocusHackWidget();
~FocusHackWidget() override;
public Q_SLOTS:
void focusNext();
......@@ -54,12 +54,12 @@ class SidebarMode : public BaseMode
public:
SidebarMode(QObject * parent, const QVariantList& );
~SidebarMode();
QWidget * mainWidget() Q_DECL_OVERRIDE;
void initEvent() Q_DECL_OVERRIDE;
void giveFocus() Q_DECL_OVERRIDE;
KAboutData * aboutData() Q_DECL_OVERRIDE;
ModuleView * moduleView() const Q_DECL_OVERRIDE;
~SidebarMode() override;
QWidget * mainWidget() override;
void initEvent() override;
void giveFocus() override;
KAboutData * aboutData() override;
ModuleView * moduleView() const override;
QAbstractItemModel *categoryModel() const;
QAbstractItemModel *subCategoryModel() const;
QAbstractItemModel *mostUsedModel() const;
......@@ -80,8 +80,8 @@ public:
Q_INVOKABLE void loadMostUsed(int index);
protected:
QList<QAbstractItemView*> views() const Q_DECL_OVERRIDE;
bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
QList<QAbstractItemView*> views() const override;
bool eventFilter(QObject* watched, QEvent* event) override;
private Q_SLOTS:
void changeModule( const QModelIndex& activeModule );
......
......@@ -46,7 +46,7 @@ public:
* @param parent The view which will have the tooltips displayed for.
*/
explicit ToolTipManager(QAbstractItemModel *model, QWidget* parent);
virtual ~ToolTipManager();
~ToolTipManager() override;
public Q_SLOTS:
/**
......@@ -58,7 +58,7 @@ public Q_SLOTS:
void requestToolTip(const QModelIndex& index, const QRect &rect);
protected:
bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
bool eventFilter(QObject* watched, QEvent* event) override;
private Q_SLOTS:
void prepareToolTip();
......
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