summaryrefslogtreecommitdiffstats
path: root/examples/widgets/graphicsview/weatheranchorlayout/main.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2016-06-15 10:12:35 +0200
committerhjk <hjk@theqtcompany.com>2016-06-15 09:32:30 +0000
commit40a54bf565079c007eada8755b9ff7224754949d (patch)
treeccd3bb45ca7369b79fc54d26955cf5b0dfc8ece1 /examples/widgets/graphicsview/weatheranchorlayout/main.cpp
parent4d3ffae3d562e5b3b2748a2d92eb4ab2933422e7 (diff)
Examples: Replace 'Q_DECL_OVERRIDE' by 'override'
Examples should demonstrate best practice, and we can use the keyword directly nowadays. Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4 Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'examples/widgets/graphicsview/weatheranchorlayout/main.cpp')
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/widgets/graphicsview/weatheranchorlayout/main.cpp b/examples/widgets/graphicsview/weatheranchorlayout/main.cpp
index 01ce1ce0f0..ec1f73bf9c 100644
--- a/examples/widgets/graphicsview/weatheranchorlayout/main.cpp
+++ b/examples/widgets/graphicsview/weatheranchorlayout/main.cpp
@@ -69,7 +69,7 @@ public:
{
}
- virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE
+ virtual void resizeEvent(QResizeEvent *event) override
{
w->setGeometry(0, 0, event->size().width(), event->size().height());
}
@@ -101,7 +101,7 @@ public:
original->setZValue(z);
}
- void setGeometry (const QRectF &rect) Q_DECL_OVERRIDE
+ void setGeometry (const QRectF &rect) override
{
original->setTransform(QTransform::fromScale(rect.width() / r.width(),
rect.height() / r.height()), true);
@@ -110,7 +110,7 @@ public:
}
protected:
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override
{
Q_UNUSED(constraint);
QSizeF sh;
@@ -148,7 +148,7 @@ public:
{
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
{
QPointF reflection = QPointF();
reflection.setY(scaled.height() + 2);
@@ -180,14 +180,14 @@ public:
painter->drawPixmap(reflection, tmp);
}
- void resizeEvent(QGraphicsSceneResizeEvent *event) Q_DECL_OVERRIDE
+ void resizeEvent(QGraphicsSceneResizeEvent *event) override
{
QSize newSize = event->newSize().toSize();
newSize.setHeight(newSize.height() / 2);
scaled = original.scaled(newSize);
}
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
QSize size(scaled.width(), scaled.height() * 2 + 2);
return QRectF(QPointF(0, 0), size);