summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-06-02 07:33:16 +0200
committerMontel Laurent <[email protected]>2017-06-02 07:33:16 +0200
commit0171d3e994b94f39525e5139d235607e24e85e11 (patch)
tree23afc6bd13d4bed03647bf255a54a96641b8ab53
parent3985e63f77fd0dbb4ddeda9f8f17257cfc216961 (diff)
Use Q_DECL_OVERRIDE
-rw-r--r--app/filtercontroller.cpp2
-rw-r--r--app/filtercontroller.h16
-rw-r--r--app/folderviewcontextmanageritem.cpp6
-rw-r--r--app/imagemetainfodialog.cpp8
-rw-r--r--app/infocontextmanageritem.cpp8
-rw-r--r--app/semanticinfocontextmanageritem.cpp2
-rw-r--r--app/sidebar.cpp4
-rw-r--r--app/sidebar.h4
-rw-r--r--app/splitter.h4
-rw-r--r--app/startmainpage.cpp6
-rw-r--r--app/viewmainpage.h2
-rw-r--r--importer/importdialog.h2
-rw-r--r--importer/thumbnailpage.cpp10
-rw-r--r--lib/abstractimageoperation.cpp2
-rw-r--r--lib/binder.h2
-rw-r--r--lib/crop/cropimageoperation.cpp2
-rw-r--r--lib/documentview/videoviewadapter.cpp2
-rw-r--r--lib/fullscreenbar.h4
-rw-r--r--lib/historymodel.cpp2
-rw-r--r--lib/redeyereduction/redeyereductionimageoperation.cpp2
-rw-r--r--lib/resize/resizeimageoperation.cpp2
-rw-r--r--lib/semanticinfo/tagwidget.cpp4
-rw-r--r--lib/thumbnailview/thumbnailbarview.h6
-rw-r--r--lib/widgetfloater.h2
-rw-r--r--tests/auto/contextmanagertest.cpp2
25 files changed, 53 insertions, 53 deletions
diff --git a/app/filtercontroller.cpp b/app/filtercontroller.cpp
index 93cfb6d..361b4f1 100644
--- a/app/filtercontroller.cpp
+++ b/app/filtercontroller.cpp
@@ -265,7 +265,7 @@ public:
}
protected:
- virtual void paintEvent(QPaintEvent*)
+ void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE
{
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
diff --git a/app/filtercontroller.h b/app/filtercontroller.h
index 44697f3..78ff82c 100644
--- a/app/filtercontroller.h
+++ b/app/filtercontroller.h
@@ -73,12 +73,12 @@ public:
, mMode(Contains)
{}
- virtual bool needsSemanticInfo() const
+ bool needsSemanticInfo() const Q_DECL_OVERRIDE
{
return false;
}
- virtual bool acceptsIndex(const QModelIndex& index) const
+ bool acceptsIndex(const QModelIndex& index) const Q_DECL_OVERRIDE
{
if (mText.isEmpty()) {
return true;
@@ -141,12 +141,12 @@ public:
, mMode(GreaterOrEqual)
{}
- virtual bool needsSemanticInfo() const
+ bool needsSemanticInfo() const Q_DECL_OVERRIDE
{
return false;
}
- virtual bool acceptsIndex(const QModelIndex& index) const
+ bool acceptsIndex(const QModelIndex& index) const Q_DECL_OVERRIDE
{
if (!mDate.isValid()) {
return true;
@@ -215,12 +215,12 @@ public:
, mRating(0)
, mMode(GreaterOrEqual) {}
- virtual bool needsSemanticInfo() const
+ bool needsSemanticInfo() const Q_DECL_OVERRIDE
{
return true;
}
- virtual bool acceptsIndex(const QModelIndex& index) const
+ bool acceptsIndex(const QModelIndex& index) const Q_DECL_OVERRIDE
{
SemanticInfo info = model()->semanticInfoForSourceIndex(index);
switch (mMode) {
@@ -278,12 +278,12 @@ public:
, mWantMatchingTag(true)
{}
- virtual bool needsSemanticInfo() const
+ bool needsSemanticInfo() const Q_DECL_OVERRIDE
{
return true;
}
- virtual bool acceptsIndex(const QModelIndex& index) const
+ bool acceptsIndex(const QModelIndex& index) const Q_DECL_OVERRIDE
{
if (mTag.isEmpty()) {
return true;
diff --git a/app/folderviewcontextmanageritem.cpp b/app/folderviewcontextmanageritem.cpp
index 5593c18..1c7150a 100644
--- a/app/folderviewcontextmanageritem.cpp
+++ b/app/folderviewcontextmanageritem.cpp
@@ -52,7 +52,7 @@ public:
{}
protected:
- void dragEnterEvent(QDragEnterEvent* event)
+ void dragEnterEvent(QDragEnterEvent* event) Q_DECL_OVERRIDE
{
QAbstractItemView::dragEnterEvent(event);
setDirtyRegion(mDropRect);
@@ -61,7 +61,7 @@ protected:
}
}
- void dragMoveEvent(QDragMoveEvent* event)
+ void dragMoveEvent(QDragMoveEvent* event) Q_DECL_OVERRIDE
{
QAbstractItemView::dragMoveEvent(event);
@@ -80,7 +80,7 @@ protected:
}
}
- void dropEvent(QDropEvent* event)
+ void dropEvent(QDropEvent* event) Q_DECL_OVERRIDE
{
const QList<QUrl> urlList = KUrlMimeData::urlsFromMimeData(event->mimeData());
const QModelIndex index = indexAt(event->pos());
diff --git a/app/imagemetainfodialog.cpp b/app/imagemetainfodialog.cpp
index 660eba2..c74eedc 100644
--- a/app/imagemetainfodialog.cpp
+++ b/app/imagemetainfodialog.cpp
@@ -51,7 +51,7 @@ public:
{}
protected:
- virtual void paint(QPainter* painter, const QStyleOptionViewItem& _option, const QModelIndex& index) const
+ void paint(QPainter* painter, const QStyleOptionViewItem& _option, const QModelIndex& index) const Q_DECL_OVERRIDE
{
QStyleOptionViewItem option = _option;
if (!index.parent().isValid()) {
@@ -64,7 +64,7 @@ protected:
}
}
- virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
+ QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE
{
QSize sh = QStyledItemDelegate::sizeHint(option, index);
if (!index.parent().isValid()) {
@@ -85,7 +85,7 @@ public:
{}
protected:
- virtual void rowsInserted(const QModelIndex& parent, int start, int end)
+ void rowsInserted(const QModelIndex& parent, int start, int end) Q_DECL_OVERRIDE
{
QTreeView::rowsInserted(parent, start, end);
if (!parent.isValid()) {
@@ -95,7 +95,7 @@ protected:
}
}
- virtual void reset()
+ void reset() Q_DECL_OVERRIDE
{
QTreeView::reset();
if (model()) {
diff --git a/app/infocontextmanageritem.cpp b/app/infocontextmanageritem.cpp
index 62102e3..51b57f3 100644
--- a/app/infocontextmanageritem.cpp
+++ b/app/infocontextmanageritem.cpp
@@ -118,14 +118,14 @@ public:
setSizePolicy(policy);
}
- QSize sizeHint() const
+ QSize sizeHint() const Q_DECL_OVERRIDE
{
int width = 150;
int height = heightForWidth(width);
return QSize(width, height);
}
- int heightForWidth(int w) const
+ int heightForWidth(int w) const Q_DECL_OVERRIDE
{
int height = 0;
Q_FOREACH(Row* row, mRows) {
@@ -175,13 +175,13 @@ public:
}
protected:
- void showEvent(QShowEvent* event)
+ void showEvent(QShowEvent* event) Q_DECL_OVERRIDE
{
QWidget::showEvent(event);
layoutRows();
}
- void resizeEvent(QResizeEvent* event)
+ void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE
{
QWidget::resizeEvent(event);
layoutRows();
diff --git a/app/semanticinfocontextmanageritem.cpp b/app/semanticinfocontextmanageritem.cpp
index c5f8e91..745feaf 100644
--- a/app/semanticinfocontextmanageritem.cpp
+++ b/app/semanticinfocontextmanageritem.cpp
@@ -101,7 +101,7 @@ public:
setMinimumSize(pix.size());
}
- void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*)
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE
{
painter->drawPixmap(
(size().width() - mPix.width()) / 2,
diff --git a/app/sidebar.cpp b/app/sidebar.cpp
index c0ce01b..f55c2f7 100644
--- a/app/sidebar.cpp
+++ b/app/sidebar.cpp
@@ -45,13 +45,13 @@ namespace Gwenview
class SideBarButton : public QToolButton
{
protected:
- virtual void paintEvent(QPaintEvent* event)
+ void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE
{
forceIcon();
QToolButton::paintEvent(event);
}
- virtual QSize sizeHint() const
+ QSize sizeHint() const Q_DECL_OVERRIDE
{
const_cast<SideBarButton*>(this)->forceIcon();
return QToolButton::sizeHint();
diff --git a/app/sidebar.h b/app/sidebar.h
index f640450..0a4b17b 100644
--- a/app/sidebar.h
+++ b/app/sidebar.h
@@ -42,7 +42,7 @@ public:
void clear();
protected:
- virtual void paintEvent(QPaintEvent*);
+ void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
private:
SideBarGroupPrivate* const d;
@@ -77,7 +77,7 @@ public:
QString currentPage() const;
void setCurrentPage(const QString& name);
- virtual QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
private:
SideBarPrivate* const d;
diff --git a/app/splitter.h b/app/splitter.h
index f4e90b1..c3ff0b8 100644
--- a/app/splitter.h
+++ b/app/splitter.h
@@ -35,7 +35,7 @@ public:
{}
protected:
- virtual void paintEvent(QPaintEvent* event)
+ void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE
{
QSplitterHandle::paintEvent(event);
@@ -65,7 +65,7 @@ public:
}
protected:
- virtual QSplitterHandle* createHandle()
+ QSplitterHandle* createHandle() Q_DECL_OVERRIDE
{
return new SplitterHandle(orientation(), this);
}
diff --git a/app/startmainpage.cpp b/app/startmainpage.cpp
index 1622cf7..a7087da 100644
--- a/app/startmainpage.cpp
+++ b/app/startmainpage.cpp
@@ -61,15 +61,15 @@ public:
: AbstractThumbnailViewHelper(parent)
{}
- virtual void showContextMenu(QWidget*)
+ void showContextMenu(QWidget*) Q_DECL_OVERRIDE
{
}
- virtual void showMenuForUrlDroppedOnViewport(QWidget*, const QList<QUrl>&)
+ void showMenuForUrlDroppedOnViewport(QWidget*, const QList<QUrl>&) Q_DECL_OVERRIDE
{
}
- virtual void showMenuForUrlDroppedOnDir(QWidget*, const QList<QUrl>&, const QUrl&)
+ void showMenuForUrlDroppedOnDir(QWidget*, const QList<QUrl>&, const QUrl&) Q_DECL_OVERRIDE
{
}
};
diff --git a/app/viewmainpage.h b/app/viewmainpage.h
index c8a6fa2..d2b2bae 100644
--- a/app/viewmainpage.h
+++ b/app/viewmainpage.h
@@ -74,7 +74,7 @@ public:
int statusBarHeight() const;
- virtual QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
/**
* Returns the url of the current document, or an invalid url if unknown
diff --git a/importer/importdialog.h b/importer/importdialog.h
index 4abe82f..3ee3134 100644
--- a/importer/importdialog.h
+++ b/importer/importdialog.h
@@ -40,7 +40,7 @@ public:
ImportDialog();
~ImportDialog();
- virtual QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
public Q_SLOTS:
void setSourceUrl(const QUrl&, const QString& deviceUdi);
diff --git a/importer/thumbnailpage.cpp b/importer/thumbnailpage.cpp
index 0d2b777..25a11b2 100644
--- a/importer/thumbnailpage.cpp
+++ b/importer/thumbnailpage.cpp
@@ -66,13 +66,13 @@ public:
: AbstractThumbnailViewHelper(parent)
{}
- void showContextMenu(QWidget*)
+ void showContextMenu(QWidget*) Q_DECL_OVERRIDE
{}
- void showMenuForUrlDroppedOnViewport(QWidget*, const QList<QUrl>&)
+ void showMenuForUrlDroppedOnViewport(QWidget*, const QList<QUrl>&) Q_DECL_OVERRIDE
{}
- void showMenuForUrlDroppedOnDir(QWidget*, const QList<QUrl>&, const QUrl&)
+ void showMenuForUrlDroppedOnDir(QWidget*, const QList<QUrl>&, const QUrl&) Q_DECL_OVERRIDE
{}
};
@@ -366,7 +366,7 @@ public:
{}
bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const // reimp
- {
+ Q_DECL_OVERRIDE {
if (sourceParent.isValid()) {
return true;
}
@@ -376,7 +376,7 @@ public:
}
QVariant data(const QModelIndex& index, int role) const // reimp
- {
+ Q_DECL_OVERRIDE {
if (index.parent().isValid()) {
return QSortFilterProxyModel::data(index, role);
}
diff --git a/lib/abstractimageoperation.cpp b/lib/abstractimageoperation.cpp
index 0dbfc82..23ecf87 100644
--- a/lib/abstractimageoperation.cpp
+++ b/lib/abstractimageoperation.cpp
@@ -46,7 +46,7 @@ public:
delete mOp;
}
- virtual void undo()
+ void undo() Q_DECL_OVERRIDE
{
mOp->undo();
}
diff --git a/lib/binder.h b/lib/binder.h
index b5573ba..9b1750b 100644
--- a/lib/binder.h
+++ b/lib/binder.h
@@ -95,7 +95,7 @@ public:
}
protected:
- void callMethod()
+ void callMethod() Q_DECL_OVERRIDE
{
(mReceiver->*mMethod)(mArg);
}
diff --git a/lib/crop/cropimageoperation.cpp b/lib/crop/cropimageoperation.cpp
index 7822d1e..3f7ae8c 100644
--- a/lib/crop/cropimageoperation.cpp
+++ b/lib/crop/cropimageoperation.cpp
@@ -43,7 +43,7 @@ public:
: mRect(rect)
{}
- virtual void threadedStart()
+ void threadedStart() Q_DECL_OVERRIDE
{
if (!checkDocumentEditor()) {
return;
diff --git a/lib/documentview/videoviewadapter.cpp b/lib/documentview/videoviewadapter.cpp
index bcfaf8e..b5af9b5 100644
--- a/lib/documentview/videoviewadapter.cpp
+++ b/lib/documentview/videoviewadapter.cpp
@@ -186,7 +186,7 @@ struct VideoViewAdapterPrivate
class DoubleClickableProxyWidget : public QGraphicsProxyWidget
{
protected:
- void mousePressEvent(QGraphicsSceneMouseEvent* event)
+ void mousePressEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE
{
QGraphicsWidget::mousePressEvent(event);
}
diff --git a/lib/fullscreenbar.h b/lib/fullscreenbar.h
index 3ecbf46..0ecaded 100644
--- a/lib/fullscreenbar.h
+++ b/lib/fullscreenbar.h
@@ -47,7 +47,7 @@ public:
void setAutoHidingEnabled(bool);
- virtual QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
public Q_SLOTS:
void slideIn();
@@ -59,7 +59,7 @@ private Q_SLOTS:
void delayedInstallEventFilter();
protected:
- virtual bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(QObject*, QEvent*) Q_DECL_OVERRIDE;
private:
FullScreenBarPrivate* const d;
diff --git a/lib/historymodel.cpp b/lib/historymodel.cpp
index 2e69832..c89e674 100644
--- a/lib/historymodel.cpp
+++ b/lib/historymodel.cpp
@@ -139,7 +139,7 @@ private:
setData(i18n("Last visited: %1", date), Qt::ToolTipRole);
}
- bool operator<(const QStandardItem& other) const {
+ bool operator<(const QStandardItem& other) const Q_DECL_OVERRIDE {
return mDateTime > static_cast<const HistoryItem*>(&other)->mDateTime;
}
};
diff --git a/lib/redeyereduction/redeyereductionimageoperation.cpp b/lib/redeyereduction/redeyereductionimageoperation.cpp
index 9e5e930..905a981 100644
--- a/lib/redeyereduction/redeyereductionimageoperation.cpp
+++ b/lib/redeyereduction/redeyereductionimageoperation.cpp
@@ -49,7 +49,7 @@ public:
: mRectF(rectF)
{}
- void threadedStart()
+ void threadedStart() Q_DECL_OVERRIDE
{
if (!checkDocumentEditor()) {
return;
diff --git a/lib/resize/resizeimageoperation.cpp b/lib/resize/resizeimageoperation.cpp
index a31c64c..dbc3f74 100644
--- a/lib/resize/resizeimageoperation.cpp
+++ b/lib/resize/resizeimageoperation.cpp
@@ -49,7 +49,7 @@ public:
: mSize(size)
{}
- virtual void threadedStart()
+ void threadedStart() Q_DECL_OVERRIDE
{
if (!checkDocumentEditor()) {
return;
diff --git a/lib/semanticinfo/tagwidget.cpp b/lib/semanticinfo/tagwidget.cpp
index 3a0b587..ddd4c1c 100644
--- a/lib/semanticinfo/tagwidget.cpp
+++ b/lib/semanticinfo/tagwidget.cpp
@@ -72,7 +72,7 @@ public:
}
protected:
- virtual bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const
+ bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const Q_DECL_OVERRIDE
{
QModelIndex sourceIndex = sourceModel()->index(sourceRow, 0, sourceParent);
SemanticInfoTag tag = sourceIndex.data(TagModel::TagRole).toString();
@@ -97,7 +97,7 @@ public:
{}
protected:
- virtual bool eventFilter(QObject*, QEvent* event)
+ bool eventFilter(QObject*, QEvent* event) Q_DECL_OVERRIDE
{
if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) {
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
diff --git a/lib/thumbnailview/thumbnailbarview.h b/lib/thumbnailview/thumbnailbarview.h
index cb5252d..1ebc9b3 100644
--- a/lib/thumbnailview/thumbnailbarview.h
+++ b/lib/thumbnailview/thumbnailbarview.h
@@ -73,9 +73,9 @@ public:
void setRowCount(int);
protected:
- virtual void resizeEvent(QResizeEvent * event);
- virtual void wheelEvent(QWheelEvent* event);
- virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
+ void resizeEvent(QResizeEvent * event) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent* event) Q_DECL_OVERRIDE;
+ void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) Q_DECL_OVERRIDE;
private Q_SLOTS:
void slotFrameChanged(int);
diff --git a/lib/widgetfloater.h b/lib/widgetfloater.h
index 2f91b59..5ba876f 100644
--- a/lib/widgetfloater.h
+++ b/lib/widgetfloater.h
@@ -58,7 +58,7 @@ public:
int verticalMargin() const;
protected:
- bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(QObject*, QEvent*) Q_DECL_OVERRIDE;
private:
WidgetFloaterPrivate* const d;
diff --git a/tests/auto/contextmanagertest.cpp b/tests/auto/contextmanagertest.cpp
index 53e6c8c..ade7775 100644
--- a/tests/auto/contextmanagertest.cpp
+++ b/tests/auto/contextmanagertest.cpp
@@ -97,7 +97,7 @@ void ContextManagerTest::testInvalidDirUrl()
setAutoErrorHandlingEnabled(false, 0);
}
- bool openUrl(const QUrl &url, OpenUrlFlags flags = NoFlags)
+ bool openUrl(const QUrl &url, OpenUrlFlags flags = NoFlags) Q_DECL_OVERRIDE
{
mOpenUrlCalled = true;
return KDirLister::openUrl(url, flags);