Commit 852fb0da authored by Laurent Montel's avatar Laurent Montel 😁

Warning--

parent 5db30eca
......@@ -42,22 +42,22 @@ public:
/**
* Destructor.
*/
~Module();
~Module() override;
/**
* Overloading the KCModule load() function.
*/
void load() Q_DECL_OVERRIDE;
void load() override;
/**
* Overloading the KCModule save() function.
*/
void save() Q_DECL_OVERRIDE;
void save() override;
/**
* Overloading the KCModule defaults() function.
*/
void defaults() Q_DECL_OVERRIDE;
void defaults() override;
private:
void loadSoftware();
......
......@@ -156,7 +156,7 @@ void DeviceListing::deviceAddedSlot(const QString &udi)
// Incase of bad index
if (deviceMap[deviceType] == nullptr) {
QTreeWidgetItem *topItem = topLevelItem(0);
if (topItem == 0) {
if (!topItem) {
delete solhelp;
return;
}
......
......@@ -60,7 +60,7 @@ private:
public:
DeviceListing(QWidget *, InfoPanel *, DevInfoPlugin *);
~DeviceListing();
~DeviceListing() override;
static QTreeWidgetItem *getTreeWidgetItemFromUdi(QTreeWidget *widget, const QString &udi)
{
......@@ -79,7 +79,7 @@ public:
private:
void populateListing(const show = RELEVANT);
QTreeWidgetItem *createListItems(const Solid::DeviceInterface::Type &);
void contextMenuEvent(QContextMenuEvent *) Q_DECL_OVERRIDE;
void contextMenuEvent(QContextMenuEvent *) override;
void createMenuActions();
QMap<Solid::DeviceInterface::Type, SolDevice *> deviceMap;
......
......@@ -35,11 +35,11 @@ class SolProcessorDevice : public SolDevice
public:
SolProcessorDevice(const Solid::DeviceInterface::Type &);
SolProcessorDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
QVListLayout *infoPanelLayout() override;
private:
void setDefaultDeviceText() Q_DECL_OVERRIDE;
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
void setDefaultDeviceText() override;
void setDefaultListing(const Solid::DeviceInterface::Type &) override;
};
class SolStorageDevice : public SolDevice
......@@ -52,11 +52,11 @@ public:
SolStorageDevice(const Solid::DeviceInterface::Type &);
SolStorageDevice(QTreeWidgetItem *, const Solid::Device &,
const storageChildren & = CREATECHILDREN);
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
QVListLayout *infoPanelLayout() override;
private:
void setDefaultDeviceText() Q_DECL_OVERRIDE;
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
void setDefaultDeviceText() override;
void setDefaultListing(const Solid::DeviceInterface::Type &) override;
};
class SolVolumeDevice : public SolDevice
......@@ -64,10 +64,10 @@ class SolVolumeDevice : public SolDevice
public:
SolVolumeDevice(const Solid::DeviceInterface::Type &);
SolVolumeDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
QVListLayout *infoPanelLayout() override;
private:
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
void setDefaultListing(const Solid::DeviceInterface::Type &) override;
};
class SolMediaPlayerDevice : public SolDevice
......@@ -75,10 +75,10 @@ class SolMediaPlayerDevice : public SolDevice
public:
SolMediaPlayerDevice(const Solid::DeviceInterface::Type &);
SolMediaPlayerDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
QVListLayout *infoPanelLayout() override;
private:
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
void setDefaultListing(const Solid::DeviceInterface::Type &) override;
};
class SolCameraDevice : public SolDevice
......@@ -86,10 +86,10 @@ class SolCameraDevice : public SolDevice
public:
SolCameraDevice(const Solid::DeviceInterface::Type &);
SolCameraDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
QVListLayout *infoPanelLayout() override;
private:
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
void setDefaultListing(const Solid::DeviceInterface::Type &) override;
};
class SolBatteryDevice : public SolDevice
......@@ -97,10 +97,10 @@ class SolBatteryDevice : public SolDevice
public:
SolBatteryDevice(const Solid::DeviceInterface::Type &);
SolBatteryDevice(QTreeWidgetItem *, const Solid::Device &);
QVListLayout *infoPanelLayout() Q_DECL_OVERRIDE;
QVListLayout *infoPanelLayout() override;
private:
void setDefaultListing(const Solid::DeviceInterface::Type &) Q_DECL_OVERRIDE;
void setDefaultListing(const Solid::DeviceInterface::Type &) 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 Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QHash<int, QByteArray> roleNames() const override;
signals:
void countChanged();
......
......@@ -71,8 +71,8 @@ public:
void load();
void classBegin() Q_DECL_OVERRIDE;
void componentComplete() Q_DECL_OVERRIDE;
void classBegin() override;
void componentComplete() override;
QVariantList asPoints() const;
int count() const;
......
......@@ -62,9 +62,9 @@ public:
qreal total() const { return m_total; }
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;
QVariant data(const QModelIndex &index, int role) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QHash<int, QByteArray> roleNames() const override;
public slots:
void reload();
......
......@@ -38,8 +38,8 @@ class KInfoListWidget : public KCModule
public:
KInfoListWidget(const QString &_title, QWidget *parent, bool _getlistbox (QTreeWidget*) = nullptr);
void load() Q_DECL_OVERRIDE;
QString quickHelp() const Q_DECL_OVERRIDE;
void load() override;
QString quickHelp() const override;
private:
QTreeWidget* tree;
......
......@@ -42,7 +42,7 @@ public:
explicit KCMMemory(QWidget *parent = nullptr, const QVariantList &list = QVariantList());
~KCMMemory();
QString quickHelp() const Q_DECL_OVERRIDE;
QString quickHelp() const override;
private Q_SLOTS:
void updateMemoryText();
......
......@@ -39,7 +39,7 @@ public:
protected:
void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent* event) override;
private:
bool colorsInitialized;
......
......@@ -39,7 +39,7 @@ public:
protected:
void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent* event) override;
private:
bool colorsInitialized;
......
......@@ -39,7 +39,7 @@ public:
protected:
void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent* event) override;
private:
bool colorsInitialized;
......
......@@ -32,10 +32,10 @@ class KCMPci : public KCModule {
public:
explicit KCMPci(QWidget *parent = nullptr, const QVariantList &list = QVariantList());
~KCMPci();
~KCMPci() override;
void load() Q_DECL_OVERRIDE;
QString quickHelp() const Q_DECL_OVERRIDE;
void load() override;
QString quickHelp() const override;
private:
QTreeWidget* tree;
......
......@@ -33,8 +33,8 @@ Q_OBJECT
public:
SambaContainer(QWidget *parent=nullptr, const QVariantList &list = QVariantList());
virtual ~SambaContainer();
void load() Q_DECL_OVERRIDE;
void save() Q_DECL_OVERRIDE;
void load() override;
void save() override;
private:
KConfig config;
......
......@@ -26,7 +26,7 @@ public:
explicit USBViewer(QWidget *parent = nullptr, const QVariantList &list=QVariantList());
void load() Q_DECL_OVERRIDE;
void load() override;
protected Q_SLOTS:
......
......@@ -49,7 +49,7 @@
int my_reset_handler(raw1394handle_t handle, unsigned int) {
View1394* view1394=(View1394*)raw1394_get_userdata(handle);
if (view1394!=0)
if (view1394)
view1394->rescanBus();
return 0;
}
......@@ -118,7 +118,7 @@ bool View1394::readConfigRom(raw1394handle_t handle, nodeid_t nodeid, quadlet_t&
}
tv.tv_sec=0;
tv.tv_usec=10*1000;
select(0, 0, 0, 0, &tv);
select(0, nullptr, nullptr, nullptr, &tv);
}
if (firstQuad==0)
return false;
......@@ -168,7 +168,7 @@ void View1394::rescanBus() {
m_view->m_listview->clear();
raw1394handle_t handle=raw1394_new_handle();
if (handle==NULL) {
if (handle==nullptr) {
m_insideRescanBus=false;
return;
}
......
......@@ -46,7 +46,7 @@ public:
* @param parent The view which will have the tooltips displayed for.
*/
explicit ToolTipManager(QAbstractItemView* parent);
virtual ~ToolTipManager();
~ToolTipManager() override;
public 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.
*/
bool eventFilter( QObject* watched, QEvent* event ) Q_DECL_OVERRIDE;
bool eventFilter( QObject* watched, QEvent* event ) override;
private Q_SLOTS:
void prepareToolTip();
......
......@@ -62,7 +62,7 @@ class KInfoCenter : public KXmlGuiWindow
/**
* Destory KInfoCenter object
*/
~KInfoCenter();
~KInfoCenter() override;
/**
* Event filter to move KCMContainer to be level with
......@@ -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) Q_DECL_OVERRIDE;
bool eventFilter(QObject *watched, QEvent *event) override;
public Q_SLOTS:
......
......@@ -53,7 +53,7 @@ class InfoKcmModel : public QAbstractItemModel
*/
explicit InfoKcmModel(QObject *parent);
~InfoKcmModel();
~InfoKcmModel() override;
/**
* Get index of item in model
......@@ -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 Q_DECL_OVERRIDE;
QModelIndex index(int row, int column, const QModelIndex& parent) const override;
QModelIndex index(int row, int column, KcmTreeItem *parent) const;
/**
* Get parent of item in model
*/
QModelIndex parent(const QModelIndex& index) const Q_DECL_OVERRIDE;
QModelIndex parent(const QModelIndex& index) const override;
/**
* Get amount of rows under parent
*/
int rowCount(const QModelIndex& parent) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex& parent) const override;
/**
* Get amount of columns under parent
*/
int columnCount(const QModelIndex& parent) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex& parent) const 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 Q_DECL_OVERRIDE;
QVariant data(const QModelIndex& index, int role) const override;
/**
* Get header information
*/
QVariant headerData(int, Qt::Orientation, int) const Q_DECL_OVERRIDE;
QVariant headerData(int, Qt::Orientation, int) const override;
/**
* Get set flags for a treeitem
*/
Qt::ItemFlags flags(const QModelIndex &) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex &) const 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 Q_DECL_OVERRIDE;
bool lessThan(const QModelIndex &, const QModelIndex &) const override;
private:
......@@ -55,7 +55,7 @@ class InfoKcmProxyModel : public QSortFilterProxyModel
* Filter out rows
* Used in search implementation
*/
bool filterAcceptsRow(int, const QModelIndex &) const Q_DECL_OVERRIDE;
bool filterAcceptsRow(int, const QModelIndex &) const override;
};
#endif // INFOKCMPROXYMODEL
......@@ -51,43 +51,43 @@ class KcmCategoryItem : public KcmTreeItem
/**
* Get data of tree item
*/
QString data() const Q_DECL_OVERRIDE;
QString data() const override;
/**
* Get category of tree item.
* Set in X-KDE-KInfoCenter-Category
*/
QString category() const Q_DECL_OVERRIDE;
QString category() const override;
/**
* Gets the item type.
*/
itemType type() const Q_DECL_OVERRIDE;
itemType type() const override;
/**
* Get tree item KCMs Data
*/
KCModuleInfo kcm() const Q_DECL_OVERRIDE;
KCModuleInfo kcm() const override;
/**
* Get tree items KCM's weight
*/
int weight() const Q_DECL_OVERRIDE;
int weight() const override;
/**
* Get icon tied to KCM
*/
QIcon icon() const Q_DECL_OVERRIDE;
QIcon icon() const override;
/**
* Get whatsThis information from KCM
*/
QString whatsThis() const Q_DECL_OVERRIDE;
QString whatsThis() const override;
/**
* Get KCM tree item keywords
*/
QStringList keywords() const Q_DECL_OVERRIDE;
QStringList keywords() const override;
private:
......
......@@ -54,7 +54,7 @@ class SidePanel : public QTreeView
/**
* Destory SidePanel object
*/
~SidePanel();
~SidePanel() override;
/**
* Select the first valid item in TreeView
......@@ -128,7 +128,7 @@ Q_SIGNALS:
/**
* Create treeview item menu
*/
void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE;
void contextMenuEvent(QContextMenuEvent *event) 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