diff options
| author | Kevin Funk <[email protected]> | 2017-11-20 23:25:06 +0100 |
|---|---|---|
| committer | Kevin Funk <[email protected]> | 2017-11-20 23:25:48 +0100 |
| commit | 464b13f3828e5cdd03438d0881c3a62c7cda6333 (patch) | |
| tree | 724c10c4e06ac3030666f2604066b6cbcc83ffd0 /src/panels | |
| parent | 5bee1889e1682f1e7ffe55e49beaf4544eaf7157 (diff) | |
Modernize: Use override where possible
Also use override instead of Q_DECL_OVERRIDE
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/folders/foldersitemlistwidget.h | 4 | ||||
| -rw-r--r-- | src/panels/folders/folderspanel.cpp | 4 | ||||
| -rw-r--r-- | src/panels/folders/folderspanel.h | 8 | ||||
| -rw-r--r-- | src/panels/folders/treeviewcontextmenu.h | 2 | ||||
| -rw-r--r-- | src/panels/information/filemetadataconfigurationdialog.h | 2 | ||||
| -rw-r--r-- | src/panels/information/informationpanel.h | 10 | ||||
| -rw-r--r-- | src/panels/information/informationpanelcontent.h | 4 | ||||
| -rw-r--r-- | src/panels/information/phononwidget.cpp | 2 | ||||
| -rw-r--r-- | src/panels/information/phononwidget.h | 4 | ||||
| -rw-r--r-- | src/panels/information/pixmapviewer.h | 6 | ||||
| -rw-r--r-- | src/panels/panel.h | 4 | ||||
| -rw-r--r-- | src/panels/places/placesitem.h | 10 | ||||
| -rw-r--r-- | src/panels/places/placesitemeditdialog.h | 4 | ||||
| -rw-r--r-- | src/panels/places/placesitemlistgroupheader.h | 6 | ||||
| -rw-r--r-- | src/panels/places/placesitemlistwidget.h | 6 | ||||
| -rw-r--r-- | src/panels/places/placesitemmodel.h | 16 | ||||
| -rw-r--r-- | src/panels/places/placesitemsignalhandler.h | 2 | ||||
| -rw-r--r-- | src/panels/places/placespanel.h | 8 | ||||
| -rw-r--r-- | src/panels/terminal/terminalpanel.h | 6 |
19 files changed, 54 insertions, 54 deletions
diff --git a/src/panels/folders/foldersitemlistwidget.h b/src/panels/folders/foldersitemlistwidget.h index 2278762e3..5a4595c4a 100644 --- a/src/panels/folders/foldersitemlistwidget.h +++ b/src/panels/folders/foldersitemlistwidget.h @@ -31,10 +31,10 @@ class FoldersItemListWidget : public KFileItemListWidget public: FoldersItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent); - virtual ~FoldersItemListWidget(); + ~FoldersItemListWidget() override; protected: - virtual QPalette::ColorRole normalTextColorRole() const Q_DECL_OVERRIDE; + QPalette::ColorRole normalTextColorRole() const override; }; #endif diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index eef27ce47..6659c7c91 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -91,7 +91,7 @@ void FoldersPanel::setLimitFoldersPanelToHome(bool enable) bool FoldersPanel::limitFoldersPanelToHome() const { - return FoldersPanelSettings::limitFoldersPanelToHome(); + return limitFoldersPanelToHome(); } void FoldersPanel::setAutoScrolling(bool enable) @@ -325,7 +325,7 @@ void FoldersPanel::loadTree(const QUrl& url) QUrl baseUrl; if (url.isLocalFile()) { const bool isInHomeFolder = Dolphin::homeUrl().isParentOf(url) || (Dolphin::homeUrl() == url); - if (FoldersPanelSettings::limitFoldersPanelToHome() && isInHomeFolder) { + if (limitFoldersPanelToHome() && isInHomeFolder) { baseUrl = Dolphin::homeUrl(); } else { // Use the root directory as base for local URLs (#150941) diff --git a/src/panels/folders/folderspanel.h b/src/panels/folders/folderspanel.h index ab6c41b34..75a603681 100644 --- a/src/panels/folders/folderspanel.h +++ b/src/panels/folders/folderspanel.h @@ -40,7 +40,7 @@ class FoldersPanel : public Panel public: explicit FoldersPanel(QWidget* parent = nullptr); - virtual ~FoldersPanel(); + ~FoldersPanel() override; void setShowHiddenFiles(bool show); void setLimitFoldersPanelToHome(bool enable); @@ -59,13 +59,13 @@ signals: protected: /** @see Panel::urlChanged() */ - virtual bool urlChanged() Q_DECL_OVERRIDE; + bool urlChanged() override; /** @see QWidget::showEvent() */ - virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent* event) override; /** @see QWidget::keyPressEvent() */ - virtual void keyPressEvent(QKeyEvent* event) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent* event) override; private slots: void slotItemActivated(int index); diff --git a/src/panels/folders/treeviewcontextmenu.h b/src/panels/folders/treeviewcontextmenu.h index 93ddd7aef..3e61c4941 100644 --- a/src/panels/folders/treeviewcontextmenu.h +++ b/src/panels/folders/treeviewcontextmenu.h @@ -45,7 +45,7 @@ public: TreeViewContextMenu(FoldersPanel* parent, const KFileItem& fileInfo); - virtual ~TreeViewContextMenu(); + ~TreeViewContextMenu() override; /** Opens the context menu modal. */ void open(); diff --git a/src/panels/information/filemetadataconfigurationdialog.h b/src/panels/information/filemetadataconfigurationdialog.h index 13562ef5c..f471d545f 100644 --- a/src/panels/information/filemetadataconfigurationdialog.h +++ b/src/panels/information/filemetadataconfigurationdialog.h @@ -44,7 +44,7 @@ class FileMetaDataConfigurationDialog : public QDialog public: explicit FileMetaDataConfigurationDialog(QWidget* parent = 0); - virtual ~FileMetaDataConfigurationDialog(); + ~FileMetaDataConfigurationDialog() override; /** * Sets the items, for which the visibility of the meta data should diff --git a/src/panels/information/informationpanel.h b/src/panels/information/informationpanel.h index a698e544f..89a1bc3d2 100644 --- a/src/panels/information/informationpanel.h +++ b/src/panels/information/informationpanel.h @@ -37,7 +37,7 @@ class InformationPanel : public Panel public: explicit InformationPanel(QWidget* parent = nullptr); - virtual ~InformationPanel(); + ~InformationPanel() override; signals: void urlActivated(const QUrl& url); @@ -59,16 +59,16 @@ public slots: protected: /** @see Panel::urlChanged() */ - virtual bool urlChanged() Q_DECL_OVERRIDE; + bool urlChanged() override; /** @see QWidget::showEvent() */ - virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent* event) override; /** @see QWidget::resizeEvent() */ - virtual void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent* event) override; /** @see QWidget::contextMenuEvent() */ - virtual void contextMenuEvent(QContextMenuEvent* event) Q_DECL_OVERRIDE; + void contextMenuEvent(QContextMenuEvent* event) override; private slots: /** diff --git a/src/panels/information/informationpanelcontent.h b/src/panels/information/informationpanelcontent.h index 533e9de3b..925e89a2b 100644 --- a/src/panels/information/informationpanelcontent.h +++ b/src/panels/information/informationpanelcontent.h @@ -58,7 +58,7 @@ class InformationPanelContent : public QWidget public: explicit InformationPanelContent(QWidget* parent = 0); - virtual ~InformationPanelContent(); + ~InformationPanelContent() override; /** * Shows the meta information for the item \p item. @@ -85,7 +85,7 @@ signals: protected: /** @see QObject::eventFilter() */ - virtual bool eventFilter(QObject* obj, QEvent* event) Q_DECL_OVERRIDE; + bool eventFilter(QObject* obj, QEvent* event) override; private slots: /** diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp index 3a3268cb3..a71a77897 100644 --- a/src/panels/information/phononwidget.cpp +++ b/src/panels/information/phononwidget.cpp @@ -52,7 +52,7 @@ class EmbeddedVideoPlayer : public Phonon::VideoWidget updateGeometry(); } - QSize sizeHint() const Q_DECL_OVERRIDE + QSize sizeHint() const override { return m_sizeHint.isValid() ? m_sizeHint : Phonon::VideoWidget::sizeHint(); } diff --git a/src/panels/information/phononwidget.h b/src/panels/information/phononwidget.h index 837a66888..940239144 100644 --- a/src/panels/information/phononwidget.h +++ b/src/panels/information/phononwidget.h @@ -63,8 +63,8 @@ class PhononWidget : public QWidget void hasVideoChanged(bool hasVideo); protected: - virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; - virtual void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent *event) override; + void hideEvent(QHideEvent *event) override; private slots: void stateChanged(Phonon::State); diff --git a/src/panels/information/pixmapviewer.h b/src/panels/information/pixmapviewer.h index ddc183351..f6b456ee6 100644 --- a/src/panels/information/pixmapviewer.h +++ b/src/panels/information/pixmapviewer.h @@ -62,7 +62,7 @@ public: explicit PixmapViewer(QWidget* parent, Transition transition = DefaultTransition); - virtual ~PixmapViewer(); + ~PixmapViewer() override; void setPixmap(const QPixmap& pixmap); QPixmap pixmap() const; @@ -71,10 +71,10 @@ public: * of the parent widget. Per default no size hint is given. */ void setSizeHint(const QSize& size); - virtual QSize sizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const override; protected: - virtual void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent* event) override; private Q_SLOTS: void checkPendingPixmaps(); diff --git a/src/panels/panel.h b/src/panels/panel.h index d3460bf13..f706c3b82 100644 --- a/src/panels/panel.h +++ b/src/panels/panel.h @@ -36,7 +36,7 @@ class Panel : public QWidget public: explicit Panel(QWidget* parent = 0); - virtual ~Panel(); + ~Panel() override; /** Returns the current set URL of the active Dolphin view. */ QUrl url() const; @@ -49,7 +49,7 @@ public: void setCustomContextMenuActions(const QList<QAction*>& actions); QList<QAction*> customContextMenuActions() const; - virtual QSize sizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const override; public slots: /** diff --git a/src/panels/places/placesitem.h b/src/panels/places/placesitem.h index d1b5b5d96..7d1ab610a 100644 --- a/src/panels/places/placesitem.h +++ b/src/panels/places/placesitem.h @@ -49,7 +49,7 @@ public: }; explicit PlacesItem(const KBookmark& bookmark, PlacesItem* parent = 0); - virtual ~PlacesItem(); + ~PlacesItem() override; void setUrl(const QUrl& url); QUrl url() const; @@ -82,12 +82,12 @@ public: PlacesItemSignalHandler* signalHandler() const; protected: - virtual void onDataValueChanged(const QByteArray& role, + void onDataValueChanged(const QByteArray& role, const QVariant& current, - const QVariant& previous) Q_DECL_OVERRIDE; + const QVariant& previous) override; - virtual void onDataChanged(const QHash<QByteArray, QVariant>& current, - const QHash<QByteArray, QVariant>& previous) Q_DECL_OVERRIDE; + void onDataChanged(const QHash<QByteArray, QVariant>& current, + const QHash<QByteArray, QVariant>& previous) override; private: PlacesItem(const PlacesItem& item); diff --git a/src/panels/places/placesitemeditdialog.h b/src/panels/places/placesitemeditdialog.h index f2d69781a..5f61eede2 100644 --- a/src/panels/places/placesitemeditdialog.h +++ b/src/panels/places/placesitemeditdialog.h @@ -39,7 +39,7 @@ class PlacesItemEditDialog: public QDialog public: explicit PlacesItemEditDialog(QWidget* parent = 0); - virtual ~PlacesItemEditDialog(); + ~PlacesItemEditDialog() override; void setIcon(const QString& icon); QString icon() const; @@ -54,7 +54,7 @@ public: bool allowGlobal() const; protected: - virtual bool event(QEvent* event) Q_DECL_OVERRIDE; + bool event(QEvent* event) override; private slots: void slotUrlChanged(const QString& text); diff --git a/src/panels/places/placesitemlistgroupheader.h b/src/panels/places/placesitemlistgroupheader.h index ec845e0ae..f3cdaa6a6 100644 --- a/src/panels/places/placesitemlistgroupheader.h +++ b/src/panels/places/placesitemlistgroupheader.h @@ -28,12 +28,12 @@ class PlacesItemListGroupHeader : public KStandardItemListGroupHeader public: PlacesItemListGroupHeader(QGraphicsWidget* parent = 0); - virtual ~PlacesItemListGroupHeader(); + ~PlacesItemListGroupHeader() override; protected: - virtual void paintSeparator(QPainter* painter, const QColor& color) Q_DECL_OVERRIDE; + void paintSeparator(QPainter* painter, const QColor& color) override; - virtual QPalette::ColorRole normalTextColorRole() const Q_DECL_OVERRIDE; + QPalette::ColorRole normalTextColorRole() const override; }; #endif diff --git a/src/panels/places/placesitemlistwidget.h b/src/panels/places/placesitemlistwidget.h index e9e6a0767..3be5dde7c 100644 --- a/src/panels/places/placesitemlistwidget.h +++ b/src/panels/places/placesitemlistwidget.h @@ -32,11 +32,11 @@ class PlacesItemListWidget : public KStandardItemListWidget public: PlacesItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent); - virtual ~PlacesItemListWidget(); + ~PlacesItemListWidget() override; protected: - virtual bool isHidden() const Q_DECL_OVERRIDE; - virtual QPalette::ColorRole normalTextColorRole() const Q_DECL_OVERRIDE; + bool isHidden() const override; + QPalette::ColorRole normalTextColorRole() const override; }; #endif diff --git a/src/panels/places/placesitemmodel.h b/src/panels/places/placesitemmodel.h index 7dd49bf5a..9c91f7b08 100644 --- a/src/panels/places/placesitemmodel.h +++ b/src/panels/places/placesitemmodel.h @@ -51,7 +51,7 @@ class PlacesItemModel: public KStandardItemModel public: explicit PlacesItemModel(QObject* parent = 0); - virtual ~PlacesItemModel(); + ~PlacesItemModel() override; /** * @return A new instance of a places item with the given @@ -107,9 +107,9 @@ public: bool storageSetupNeeded(int index) const; void requestStorageSetup(int index); - virtual QMimeData* createMimeData(const KItemSet& indexes) const Q_DECL_OVERRIDE; + QMimeData* createMimeData(const KItemSet& indexes) const override; - virtual bool supportsDropping(int index) const Q_DECL_OVERRIDE; + bool supportsDropping(int index) const override; void dropMimeDataBefore(int index, const QMimeData* mimeData); @@ -121,7 +121,7 @@ public: */ static QUrl convertedUrl(const QUrl& url); - virtual void clear() Q_DECL_OVERRIDE; + void clear() override; void proceedWithTearDown(); @@ -132,7 +132,7 @@ public: */ void saveBookmarks(); - bool isDir(int index) const Q_DECL_OVERRIDE; + bool isDir(int index) const override; signals: void errorMessage(const QString& message); void storageSetupDone(int index, bool success); @@ -140,9 +140,9 @@ signals: void storageTearDownExternallyRequested(const QString& mountPath); protected: - virtual void onItemInserted(int index) Q_DECL_OVERRIDE; - virtual void onItemRemoved(int index, KStandardItem* removedItem) Q_DECL_OVERRIDE; - virtual void onItemChanged(int index, const QSet<QByteArray>& changedRoles) Q_DECL_OVERRIDE; + void onItemInserted(int index) override; + void onItemRemoved(int index, KStandardItem* removedItem) override; + void onItemChanged(int index, const QSet<QByteArray>& changedRoles) override; private slots: void slotDeviceAdded(const QString& udi); diff --git a/src/panels/places/placesitemsignalhandler.h b/src/panels/places/placesitemsignalhandler.h index 6110f717d..49c8e43c9 100644 --- a/src/panels/places/placesitemsignalhandler.h +++ b/src/panels/places/placesitemsignalhandler.h @@ -48,7 +48,7 @@ class PlacesItemSignalHandler: public QObject public: explicit PlacesItemSignalHandler(PlacesItem* item, QObject* parent = nullptr); - virtual ~PlacesItemSignalHandler(); + ~PlacesItemSignalHandler() override; public slots: /** diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h index 4e525a037..f5c90b1f9 100644 --- a/src/panels/places/placespanel.h +++ b/src/panels/places/placespanel.h @@ -40,7 +40,7 @@ class PlacesPanel : public Panel public: explicit PlacesPanel(QWidget* parent); - virtual ~PlacesPanel(); + ~PlacesPanel() override; void proceedWithTearDown(); signals: @@ -51,11 +51,11 @@ signals: void storageTearDownExternallyRequested(const QString& mountPath); protected: - virtual bool urlChanged() Q_DECL_OVERRIDE; - virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE; + bool urlChanged() override; + void showEvent(QShowEvent* event) override; public slots: - virtual void readSettings() Q_DECL_OVERRIDE; + void readSettings() override; private slots: void slotItemActivated(int index); diff --git a/src/panels/terminal/terminalpanel.h b/src/panels/terminal/terminalpanel.h index db5658e53..4c0b93a17 100644 --- a/src/panels/terminal/terminalpanel.h +++ b/src/panels/terminal/terminalpanel.h @@ -46,7 +46,7 @@ class TerminalPanel : public Panel public: explicit TerminalPanel(QWidget* parent = nullptr); - virtual ~TerminalPanel(); + ~TerminalPanel() override; /** * @brief This function is used to set the terminal panels's cwd to @@ -68,9 +68,9 @@ signals: void changeUrl(const QUrl& url); protected: - virtual bool urlChanged() Q_DECL_OVERRIDE; + bool urlChanged() override; - virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent* event) override; private slots: void slotMostLocalUrlResult(KJob* job); |
