Commit a3340d39 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent 127b2b2c
......@@ -47,17 +47,17 @@ public:
/**
* Overloading the KCModule load() function.
*/
void load();
void load() Q_DECL_OVERRIDE;
/**
* Overloading the KCModule save() function.
*/
void save();
void save() Q_DECL_OVERRIDE;
/**
* Overloading the KCModule defaults() function.
*/
void defaults();
void defaults() Q_DECL_OVERRIDE;
private:
void loadSoftware();
......
......@@ -76,7 +76,7 @@ class DeviceListing : public QTreeWidget
private:
void populateListing(const show=RELEVANT);
QTreeWidgetItem *createListItems(const Solid::DeviceInterface::Type &);
void contextMenuEvent(QContextMenuEvent *);
void contextMenuEvent(QContextMenuEvent *) Q_DECL_OVERRIDE;
void createMenuActions();
QMap<Solid::DeviceInterface::Type, SolDevice *> deviceMap;
......
......@@ -37,11 +37,11 @@ class SolProcessorDevice : public SolDevice
public:
SolProcessorDevice(const Solid::DeviceInterface::Type &);
SolProcessorDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout();
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
private:
void setDefaultDeviceText();
void setDefaultListing(const Solid::DeviceInterface::Type &);
void setDefaultDeviceText() Q_DECL_OVERRIDE;
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
};
......@@ -53,11 +53,11 @@ class SolStorageDevice : public SolDevice
SolStorageDevice(const Solid::DeviceInterface::Type &);
SolStorageDevice(QTreeWidgetItem *, const Solid::Device &, const storageChildren & = CREATECHILDREN);
QVListLayout *infoPanelLayout();
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
private:
void setDefaultDeviceText();
void setDefaultListing(const Solid::DeviceInterface::Type &);
void setDefaultDeviceText() Q_DECL_OVERRIDE;
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
};
class SolVolumeDevice : public SolDevice
......@@ -66,10 +66,10 @@ class SolVolumeDevice : public SolDevice
public:
SolVolumeDevice(const Solid::DeviceInterface::Type &);
SolVolumeDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout();
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
private:
void setDefaultListing(const Solid::DeviceInterface::Type &);
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
};
class SolMediaPlayerDevice : public SolDevice
......@@ -78,10 +78,10 @@ class SolMediaPlayerDevice : public SolDevice
public:
SolMediaPlayerDevice(const Solid::DeviceInterface::Type &);
SolMediaPlayerDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout();
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
private:
void setDefaultListing(const Solid::DeviceInterface::Type &);
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
};
class SolCameraDevice : public SolDevice
......@@ -90,10 +90,10 @@ class SolCameraDevice : public SolDevice
public:
SolCameraDevice(const Solid::DeviceInterface::Type &);
SolCameraDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout();
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
private:
void setDefaultListing(const Solid::DeviceInterface::Type &);
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
};
class SolBatteryDevice : public SolDevice
......@@ -102,10 +102,10 @@ class SolBatteryDevice : public SolDevice
public:
SolBatteryDevice(const Solid::DeviceInterface::Type &);
SolBatteryDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout();
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
private:
void setDefaultListing(const Solid::DeviceInterface::Type &);
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
};
#endif //SOLDEVICETYPES
......@@ -44,9 +44,9 @@ public:
Q_INVOKABLE Solid::Battery *get(int index) const;
Q_INVOKABLE QString udi(int index) const;
QVariant data(const QModelIndex &index, int role) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
QHash<int, QByteArray> roleNames() const;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
signals:
void countChanged();
......
......@@ -38,8 +38,8 @@ class KInfoListWidget : public KCModule
public:
KInfoListWidget(const QString &_title, QWidget *parent, bool _getlistbox (QTreeWidget*) = NULL);
virtual void load();
virtual QString quickHelp() const;
void load() Q_DECL_OVERRIDE;
QString quickHelp() const Q_DECL_OVERRIDE;
private:
QTreeWidget* tree;
......
......@@ -42,7 +42,7 @@ public:
explicit KCMMemory(QWidget *parent = NULL, const QVariantList &list = QVariantList());
~KCMMemory();
QString quickHelp() const;
QString quickHelp() const Q_DECL_OVERRIDE;
private Q_SLOTS:
void updateMemoryText();
......
......@@ -39,7 +39,7 @@ public:
protected:
virtual void paintEvent(QPaintEvent* event);
void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
private:
bool colorsInitialized;
......
......@@ -39,7 +39,7 @@ public:
protected:
virtual void paintEvent(QPaintEvent* event);
void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
private:
bool colorsInitialized;
......
......@@ -39,7 +39,7 @@ public:
protected:
virtual void paintEvent(QPaintEvent* event);
void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
private:
bool colorsInitialized;
......
......@@ -34,8 +34,8 @@ public:
explicit KCMPci(QWidget *parent = NULL, const QVariantList &list = QVariantList());
~KCMPci();
virtual void load();
virtual QString quickHelp() const;
void load() Q_DECL_OVERRIDE;
QString quickHelp() const Q_DECL_OVERRIDE;
private:
QTreeWidget* tree;
......
......@@ -33,8 +33,8 @@ Q_OBJECT
public:
SambaContainer(QWidget *parent=0, const QVariantList &list = QVariantList());
virtual ~SambaContainer();
virtual void load();
virtual void save();
void load() Q_DECL_OVERRIDE;
void save() Q_DECL_OVERRIDE;
private:
KConfig config;
......
......@@ -26,7 +26,7 @@ public:
explicit USBViewer(QWidget *parent = 0L, const QVariantList &list=QVariantList());
void load();
void load() Q_DECL_OVERRIDE;
protected Q_SLOTS:
......
......@@ -64,7 +64,7 @@ protected:
* @param event The event object.
* @returns true if the event was handled in this filter, or false if it was not.
*/
virtual bool eventFilter( QObject* watched, QEvent* event );
bool eventFilter( QObject* watched, QEvent* event ) Q_DECL_OVERRIDE;
private Q_SLOTS:
void prepareToolTip();
......
......@@ -71,7 +71,7 @@ class KInfoCenter : public KXmlGuiWindow
* @param watched object being watched
* @param event event object containing event information
*/
bool eventFilter(QObject *watched, QEvent *event);
bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
public Q_SLOTS:
......
......@@ -63,23 +63,23 @@ class InfoKcmModel : public QAbstractItemModel
* @param parent parent of object
* @return index of object
*/
QModelIndex index(int row, int column, const QModelIndex& parent) const;
QModelIndex index(int row, int column, const QModelIndex& parent) const Q_DECL_OVERRIDE;
QModelIndex index(int row, int column, KcmTreeItem *parent) const;
/**
* Get parent of item in model
*/
QModelIndex parent(const QModelIndex& index) const;
QModelIndex parent(const QModelIndex& index) const Q_DECL_OVERRIDE;
/**
* Get amount of rows under parent
*/
int rowCount(const QModelIndex& parent) const;
int rowCount(const QModelIndex& parent) const Q_DECL_OVERRIDE;
/**
* Get amount of columns under parent
*/
int columnCount(const QModelIndex& parent) const;
int columnCount(const QModelIndex& parent) const Q_DECL_OVERRIDE;
/**
* Get the stored data for a role
......@@ -87,17 +87,17 @@ class InfoKcmModel : public QAbstractItemModel
* @param index objects index
* @param role role to retrieve data about
*/
QVariant data(const QModelIndex& index, int role) const;
QVariant data(const QModelIndex& index, int role) const Q_DECL_OVERRIDE;
/**
* Get header information
*/
QVariant headerData(int, Qt::Orientation, int) const;
QVariant headerData(int, Qt::Orientation, int) const Q_DECL_OVERRIDE;
/**
* Get set flags for a treeitem
*/
Qt::ItemFlags flags(const QModelIndex &) const;
Qt::ItemFlags flags(const QModelIndex &) const Q_DECL_OVERRIDE;
/**
* Get the first valid item on the treeview
......
......@@ -47,7 +47,7 @@ class InfoKcmProxyModel : public QSortFilterProxyModel
* Check if left item is less than right item
* Uses X-KDE-Weight for measurements
*/
bool lessThan(const QModelIndex &, const QModelIndex &) const;
bool lessThan(const QModelIndex &, const QModelIndex &) const Q_DECL_OVERRIDE;
private:
......@@ -55,7 +55,7 @@ class InfoKcmProxyModel : public QSortFilterProxyModel
* Filter out rows
* Used in search implementation
*/
bool filterAcceptsRow(int, const QModelIndex &) const;
bool filterAcceptsRow(int, const QModelIndex &) const Q_DECL_OVERRIDE;
};
#endif // INFOKCMPROXYMODEL
......@@ -51,43 +51,43 @@ class KcmCategoryItem : public KcmTreeItem
/**
* Get data of tree item
*/
QString data() const;
QString data() const Q_DECL_OVERRIDE;
/**
* Get category of tree item.
* Set in X-KDE-KInfoCenter-Category
*/
QString category() const;
QString category() const Q_DECL_OVERRIDE;
/**
* Gets the item type.
*/
itemType type() const;
itemType type() const Q_DECL_OVERRIDE;
/**
* Get tree item KCMs Data
*/
KCModuleInfo kcm() const;
KCModuleInfo kcm() const Q_DECL_OVERRIDE;
/**
* Get tree items KCM's weight
*/
int weight();
int weight() Q_DECL_OVERRIDE;
/**
* Get icon tied to KCM
*/
QIcon icon() const;
QIcon icon() const Q_DECL_OVERRIDE;
/**
* Get whatsThis information from KCM
*/
QString whatsThis() const;
QString whatsThis() const Q_DECL_OVERRIDE;
/**
* Get KCM tree item keywords
*/
QStringList keywords() const;
QStringList keywords() const Q_DECL_OVERRIDE;
private:
......
......@@ -125,7 +125,7 @@ class SidePanel : public QTreeView
/**
* Create treeview item menu
*/
void contextMenuEvent(QContextMenuEvent *event);
void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE;
InfoKcmModel *m_model;
InfoKcmProxyModel *m_proxyModel;
......
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