summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2017-09-18 10:36:49 +0200
committerKevin Funk <kevin.funk@kdab.com>2017-09-19 11:53:42 +0000
commit47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 (patch)
tree330914ff8225867e19b9ed5e049813d9f1e5ec08 /src/widgets/graphicsview
parent93dd85141b35460a83dac86083581ba1c1975927 (diff)
Replace Q_DECL_OVERRIDE with override where possible
Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout.h12
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayout.h12
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h14
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.h218
-rw-r--r--src/widgets/graphicsview/qgraphicsitem_p.h22
-rw-r--r--src/widgets/graphicsview/qgraphicslayout.h4
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h10
-rw-r--r--src/widgets/graphicsview/qgraphicslinearlayout.h12
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.h64
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_bsp.cpp6
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h20
-rw-r--r--src/widgets/graphicsview/qgraphicsscenelinearindex_p.h10
-rw-r--r--src/widgets/graphicsview/qgraphicstransform.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsview.h50
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.h30
-rw-r--r--src/widgets/graphicsview/qgraphicswidget_p.h16
18 files changed, 256 insertions, 256 deletions
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout.h b/src/widgets/graphicsview/qgraphicsanchorlayout.h
index 01dc30718a..34c6e12c16 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout.h
@@ -97,14 +97,14 @@ public:
qreal horizontalSpacing() const;
qreal verticalSpacing() const;
- void removeAt(int index) Q_DECL_OVERRIDE;
- void setGeometry(const QRectF &rect) Q_DECL_OVERRIDE;
- int count() const Q_DECL_OVERRIDE;
- QGraphicsLayoutItem *itemAt(int index) const Q_DECL_OVERRIDE;
+ void removeAt(int index) override;
+ void setGeometry(const QRectF &rect) override;
+ int count() const override;
+ QGraphicsLayoutItem *itemAt(int index) const override;
- void invalidate() Q_DECL_OVERRIDE;
+ void invalidate() override;
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;
private:
Q_DISABLE_COPY(QGraphicsAnchorLayout)
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
index e785b486bb..6b2408b2eb 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
@@ -198,7 +198,7 @@ struct SequentialAnchorData : public AnchorData
#endif
}
- virtual void updateChildrenSizes() Q_DECL_OVERRIDE;
+ virtual void updateChildrenSizes() override;
void calculateSizeHints();
QVector<AnchorVertex*> m_children; // list of vertices in the sequence
@@ -226,7 +226,7 @@ struct ParallelAnchorData : public AnchorData
#endif
}
- virtual void updateChildrenSizes() Q_DECL_OVERRIDE;
+ virtual void updateChildrenSizes() override;
bool calculateSizeHints();
bool secondForward() const {
diff --git a/src/widgets/graphicsview/qgraphicsgridlayout.h b/src/widgets/graphicsview/qgraphicsgridlayout.h
index fb9bc2e32c..c20a931617 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayout.h
+++ b/src/widgets/graphicsview/qgraphicsgridlayout.h
@@ -106,16 +106,16 @@ public:
QGraphicsLayoutItem *itemAt(int row, int column) const;
// inherited from QGraphicsLayout
- int count() const Q_DECL_OVERRIDE;
- QGraphicsLayoutItem *itemAt(int index) const Q_DECL_OVERRIDE;
- void removeAt(int index) Q_DECL_OVERRIDE;
+ int count() const override;
+ QGraphicsLayoutItem *itemAt(int index) const override;
+ void removeAt(int index) override;
void removeItem(QGraphicsLayoutItem *item);
- void invalidate() Q_DECL_OVERRIDE;
+ void invalidate() override;
// inherited from QGraphicsLayoutItem
- void setGeometry(const QRectF &rect) Q_DECL_OVERRIDE;
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE;
+ void setGeometry(const QRectF &rect) override;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
// ####
//QRect cellRect(int row, int column, int rowSpan = 1, int columnSpan = 1) const;
diff --git a/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h b/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
index d797f784b8..370df9eed7 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
+++ b/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
@@ -71,35 +71,35 @@ public:
Qt::Alignment alignment = 0)
: QGridLayoutItem(row, columns, rowSpan, columnSpan, alignment), q_layoutItem(item) {}
- virtual QLayoutPolicy::Policy sizePolicy(Qt::Orientation orientation) const Q_DECL_OVERRIDE
+ virtual QLayoutPolicy::Policy sizePolicy(Qt::Orientation orientation) const override
{
QSizePolicy sizePolicy(q_layoutItem->sizePolicy());
return (QLayoutPolicy::Policy)((orientation == Qt::Horizontal) ? sizePolicy.horizontalPolicy()
: sizePolicy.verticalPolicy());
}
- virtual QLayoutPolicy::ControlTypes controlTypes(LayoutSide) const Q_DECL_OVERRIDE
+ virtual QLayoutPolicy::ControlTypes controlTypes(LayoutSide) const override
{
const QSizePolicy::ControlType ct = q_layoutItem->sizePolicy().controlType();
return (QLayoutPolicy::ControlTypes)ct;
}
- virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const Q_DECL_OVERRIDE
+ virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const override
{
return q_layoutItem->effectiveSizeHint(which, constraint);
}
bool isHidden() const;
- virtual bool isIgnored() const Q_DECL_OVERRIDE;
+ virtual bool isIgnored() const override;
- virtual void setGeometry(const QRectF &rect) Q_DECL_OVERRIDE
+ virtual void setGeometry(const QRectF &rect) override
{
q_layoutItem->setGeometry(rect);
}
- virtual bool hasDynamicConstraint() const Q_DECL_OVERRIDE;
- virtual Qt::Orientation dynamicConstraintOrientation() const Q_DECL_OVERRIDE;
+ virtual bool hasDynamicConstraint() const override;
+ virtual Qt::Orientation dynamicConstraintOrientation() const override;
QGraphicsLayoutItem *layoutItem() const { return q_layoutItem; }
diff --git a/src/widgets/graphicsview/qgraphicsitem.h b/src/widgets/graphicsview/qgraphicsitem.h
index 11d872f6e6..c291f94c78 100644
--- a/src/widgets/graphicsview/qgraphicsitem.h
+++ b/src/widgets/graphicsview/qgraphicsitem.h
@@ -588,7 +588,7 @@ Q_SIGNALS:
protected:
QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent);
- bool event(QEvent *ev) Q_DECL_OVERRIDE;
+ bool event(QEvent *ev) override;
private:
friend class QGraphicsItem;
@@ -609,8 +609,8 @@ public:
QBrush brush() const;
void setBrush(const QBrush &brush);
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
protected:
QAbstractGraphicsShapeItem(QAbstractGraphicsShapeItemPrivate &dd,
@@ -632,22 +632,22 @@ public:
QPainterPath path() const;
void setPath(const QPainterPath &path);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- bool contains(const QPointF &point) const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ bool contains(const QPointF &point) const override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) override;
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
enum { Type = 2 };
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
protected:
- bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE;
- void setExtension(Extension extension, const QVariant &variant) Q_DECL_OVERRIDE;
- QVariant extension(const QVariant &variant) const Q_DECL_OVERRIDE;
+ bool supportsExtension(Extension extension) const override;
+ void setExtension(Extension extension, const QVariant &variant) override;
+ QVariant extension(const QVariant &variant) const override;
private:
Q_DISABLE_COPY(QGraphicsPathItem)
@@ -667,22 +667,22 @@ public:
void setRect(const QRectF &rect);
inline void setRect(qreal x, qreal y, qreal w, qreal h);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- bool contains(const QPointF &point) const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ bool contains(const QPointF &point) const override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) override;
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
enum { Type = 3 };
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
protected:
- bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE;
- void setExtension(Extension extension, const QVariant &variant) Q_DECL_OVERRIDE;
- QVariant extension(const QVariant &variant) const Q_DECL_OVERRIDE;
+ bool supportsExtension(Extension extension) const override;
+ void setExtension(Extension extension, const QVariant &variant) override;
+ QVariant extension(const QVariant &variant) const override;
private:
Q_DISABLE_COPY(QGraphicsRectItem)
@@ -711,22 +711,22 @@ public:
int spanAngle() const;
void setSpanAngle(int angle);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- bool contains(const QPointF &point) const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ bool contains(const QPointF &point) const override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) override;
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
enum { Type = 4 };
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
protected:
- bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE;
- void setExtension(Extension extension, const QVariant &variant) Q_DECL_OVERRIDE;
- QVariant extension(const QVariant &variant) const Q_DECL_OVERRIDE;
+ bool supportsExtension(Extension extension) const override;
+ void setExtension(Extension extension, const QVariant &variant) override;
+ QVariant extension(const QVariant &variant) const override;
private:
Q_DISABLE_COPY(QGraphicsEllipseItem)
@@ -751,22 +751,22 @@ public:
Qt::FillRule fillRule() const;
void setFillRule(Qt::FillRule rule);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- bool contains(const QPointF &point) const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ bool contains(const QPointF &point) const override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) override;
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
enum { Type = 5 };
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
protected:
- bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE;
- void setExtension(Extension extension, const QVariant &variant) Q_DECL_OVERRIDE;
- QVariant extension(const QVariant &variant) const Q_DECL_OVERRIDE;
+ bool supportsExtension(Extension extension) const override;
+ void setExtension(Extension extension, const QVariant &variant) override;
+ QVariant extension(const QVariant &variant) const override;
private:
Q_DISABLE_COPY(QGraphicsPolygonItem)
@@ -790,22 +790,22 @@ public:
inline void setLine(qreal x1, qreal y1, qreal x2, qreal y2)
{ setLine(QLineF(x1, y1, x2, y2)); }
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- bool contains(const QPointF &point) const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ bool contains(const QPointF &point) const override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) override;
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
enum { Type = 6 };
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
protected:
- bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE;
- void setExtension(Extension extension, const QVariant &variant) Q_DECL_OVERRIDE;
- QVariant extension(const QVariant &variant) const Q_DECL_OVERRIDE;
+ bool supportsExtension(Extension extension) const override;
+ void setExtension(Extension extension, const QVariant &variant) override;
+ QVariant extension(const QVariant &variant) const override;
private:
Q_DISABLE_COPY(QGraphicsLineItem)
@@ -836,25 +836,25 @@ public:
void setOffset(const QPointF &offset);
inline void setOffset(qreal x, qreal y);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- bool contains(const QPointF &point) const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ bool contains(const QPointF &point) const override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
enum { Type = 7 };
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
ShapeMode shapeMode() const;
void setShapeMode(ShapeMode mode);
protected:
- bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE;
- void setExtension(Extension extension, const QVariant &variant) Q_DECL_OVERRIDE;
- QVariant extension(const QVariant &variant) const Q_DECL_OVERRIDE;
+ bool supportsExtension(Extension extension) const override;
+ void setExtension(Extension extension, const QVariant &variant) override;
+ QVariant extension(const QVariant &variant) const override;
private:
Q_DISABLE_COPY(QGraphicsPixmapItem)
@@ -890,17 +890,17 @@ public:
void setDefaultTextColor(const QColor &c);
QColor defaultTextColor() const;
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- bool contains(const QPointF &point) const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ bool contains(const QPointF &point) const override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
enum { Type = 8 };
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
void setTextWidth(qreal width);
qreal textWidth() const;
@@ -927,30 +927,30 @@ Q_SIGNALS:
void linkHovered(const QString &);
protected:
- bool sceneEvent(QEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void dragEnterEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void dragMoveEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void inputMethodEvent(QInputMethodEvent *event) Q_DECL_OVERRIDE;
- void hoverEnterEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverMoveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
-
- QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
-
- bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE;
- void setExtension(Extension extension, const QVariant &variant) Q_DECL_OVERRIDE;
- QVariant extension(const QVariant &variant) const Q_DECL_OVERRIDE;
+ bool sceneEvent(QEvent *event) override;
+ void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
+ void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void focusInEvent(QFocusEvent *event) override;
+ void focusOutEvent(QFocusEvent *event) override;
+ void dragEnterEvent(QGraphicsSceneDragDropEvent *event) override;
+ void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) override;
+ void dragMoveEvent(QGraphicsSceneDragDropEvent *event) override;
+ void dropEvent(QGraphicsSceneDragDropEvent *event) override;
+ void inputMethodEvent(QInputMethodEvent *event) override;
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
+ void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
+
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
+
+ bool supportsExtension(Extension extension) const override;
+ void setExtension(Extension extension, const QVariant &variant) override;
+ QVariant extension(const QVariant &variant) const override;
private:
Q_DISABLE_COPY(QGraphicsTextItem)
@@ -975,22 +975,22 @@ public:
void setFont(const QFont &font);
QFont font() const;
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- bool contains(const QPointF &point) const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ bool contains(const QPointF &point) const override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
enum { Type = 9 };
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
protected:
- bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE;
- void setExtension(Extension extension, const QVariant &variant) Q_DECL_OVERRIDE;
- QVariant extension(const QVariant &variant) const Q_DECL_OVERRIDE;
+ bool supportsExtension(Extension extension) const override;
+ void setExtension(Extension extension, const QVariant &variant) override;
+ QVariant extension(const QVariant &variant) const override;
private:
Q_DISABLE_COPY(QGraphicsSimpleTextItem)
@@ -1007,14 +1007,14 @@ public:
void addToGroup(QGraphicsItem *item);
void removeFromGroup(QGraphicsItem *item);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) override;
- bool isObscuredBy(const QGraphicsItem *item) const Q_DECL_OVERRIDE;
- QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem *item) const override;
+ QPainterPath opaqueArea() const override;
enum { Type = 10 };
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
private:
Q_DISABLE_COPY(QGraphicsItemGroup)
diff --git a/src/widgets/graphicsview/qgraphicsitem_p.h b/src/widgets/graphicsview/qgraphicsitem_p.h
index 86414263a7..bae38473f9 100644
--- a/src/widgets/graphicsview/qgraphicsitem_p.h
+++ b/src/widgets/graphicsview/qgraphicsitem_p.h
@@ -595,28 +595,28 @@ public:
: QGraphicsEffectSourcePrivate(), item(i), info(0)
{}
- void detach() Q_DECL_OVERRIDE
+ void detach() override
{
item->d_ptr->graphicsEffect = 0;
item->prepareGeometryChange();
}
- const QGraphicsItem *graphicsItem() const Q_DECL_OVERRIDE
+ const QGraphicsItem *graphicsItem() const override
{ return item; }
- const QWidget *widget() const Q_DECL_OVERRIDE
+ const QWidget *widget() const override
{ return 0; }
- void update() Q_DECL_OVERRIDE {
+ void update() override {
item->d_ptr->updateDueToGraphicsEffect = true;
item->update();
item->d_ptr->updateDueToGraphicsEffect = false;
}
- void effectBoundingRectChanged() Q_DECL_OVERRIDE
+ void effectBoundingRectChanged() override
{ item->prepareGeometryChange(); }
- bool isPixmap() const Q_DECL_OVERRIDE
+ bool isPixmap() const override
{
return item->type() == QGraphicsPixmapItem::Type
&& !(item->flags() & QGraphicsItem::ItemIsSelectable)
@@ -624,10 +624,10 @@ public:
//|| (item->d_ptr->isObject && qobject_cast<QDeclarativeImage *>(q_func()));
}
- const QStyleOption *styleOption() const Q_DECL_OVERRIDE
+ const QStyleOption *styleOption() const override
{ return info ? info->option : 0; }
- QRect deviceRect() const Q_DECL_OVERRIDE
+ QRect deviceRect() const override
{
if (!info || !info->widget) {
qWarning("QGraphicsEffectSource::deviceRect: Not yet implemented, lacking device context");
@@ -636,11 +636,11 @@ public:
return info->widget->rect();
}
- QRectF boundingRect(Qt::CoordinateSystem system) const Q_DECL_OVERRIDE;
- void draw(QPainter *) Q_DECL_OVERRIDE;
+ QRectF boundingRect(Qt::CoordinateSystem system) const override;
+ void draw(QPainter *) override;
QPixmap pixmap(Qt::CoordinateSystem system,
QPoint *offset,
- QGraphicsEffect::PixmapPadMode mode) const Q_DECL_OVERRIDE;
+ QGraphicsEffect::PixmapPadMode mode) const override;
QRect paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = 0) const;
QGraphicsItem *item;
diff --git a/src/widgets/graphicsview/qgraphicslayout.h b/src/widgets/graphicsview/qgraphicslayout.h
index bbe45bbdd6..60c9a35037 100644
--- a/src/widgets/graphicsview/qgraphicslayout.h
+++ b/src/widgets/graphicsview/qgraphicslayout.h
@@ -58,12 +58,12 @@ public:
~QGraphicsLayout();
void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom);
- void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const Q_DECL_OVERRIDE;
+ void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const override;
void activate();
bool isActivated() const;
virtual void invalidate();
- virtual void updateGeometry() Q_DECL_OVERRIDE;
+ virtual void updateGeometry() override;
virtual void widgetEvent(QEvent *e);
diff --git a/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h b/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
index 3463ae71bf..7886de432c 100644
--- a/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
+++ b/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
@@ -70,17 +70,17 @@ public:
virtual qreal combinedLayoutSpacing(QLayoutPolicy::ControlTypes controls1,
QLayoutPolicy::ControlTypes controls2,
- Qt::Orientation orientation) const Q_DECL_OVERRIDE;
+ Qt::Orientation orientation) const override;
virtual qreal perItemSpacing(QLayoutPolicy::ControlType control1,
QLayoutPolicy::ControlType control2,
- Qt::Orientation orientation) const Q_DECL_OVERRIDE;
+ Qt::Orientation orientation) const override;
- virtual qreal spacing(Qt::Orientation orientation) const Q_DECL_OVERRIDE;
+ virtual qreal spacing(Qt::Orientation orientation) const override;
- virtual qreal windowMargin(Qt::Orientation orientation) const Q_DECL_OVERRIDE;
+ virtual qreal windowMargin(Qt::Orientation orientation) const override;
- virtual void invalidate() Q_DECL_OVERRIDE
+ virtual void invalidate() override
{
m_style = 0;
QAbstractLayoutStyleInfo::invalidate();
diff --git a/src/widgets/graphicsview/qgraphicslinearlayout.h b/src/widgets/graphicsview/qgraphicslinearlayout.h
index 8186eea987..a46ec660e7 100644
--- a/src/widgets/graphicsview/qgraphicslinearlayout.h
+++ b/src/widgets/graphicsview/qgraphicslinearlayout.h
@@ -67,7 +67,7 @@ public:
void insertStretch(int index, int stretch = 1);
void removeItem(QGraphicsLayoutItem *item);
- void removeAt(int index) Q_DECL_OVERRIDE;
+ void removeAt(int index) override;
void setSpacing(qreal spacing);
qreal spacing() const;
@@ -80,13 +80,13 @@ public:
void setAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment);
Qt::Alignment alignment(QGraphicsLayoutItem *item) const;
- void setGeometry(const QRectF &rect) Q_DECL_OVERRIDE;
+ void setGeometry(const QRectF &rect) override;
- int count() const Q_DECL_OVERRIDE;
- QGraphicsLayoutItem *itemAt(int index) const Q_DECL_OVERRIDE;
+ int count() const override;
+ QGraphicsLayoutItem *itemAt(int index) const override;
- void invalidate() Q_DECL_OVERRIDE;
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE;
+ void invalidate() override;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
#if 0 // ###
Q5SizePolicy::ControlTypes controlTypes(LayoutSide side) const;
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.h b/src/widgets/graphicsview/qgraphicsproxywidget.h
index fd6369a1fd..bb06ac3c16 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.h
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.h
@@ -61,63 +61,63 @@ public:
QRectF subWidgetRect(const QWidget *widget) const;
- void setGeometry(const QRectF &rect) Q_DECL_OVERRIDE;
+ void setGeometry(const QRectF &rect) override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
enum {
Type = 12
};
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
QGraphicsProxyWidget *createProxyForChildWidget(QWidget *child);
protected:
- QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE;
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
- bool event(QEvent *event) Q_DECL_OVERRIDE;
- bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
+ bool eventFilter(QObject *object, QEvent *event) override;
- void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
- void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE;
+ void showEvent(QShowEvent *event) override;
+ void hideEvent(QHideEvent *event) override;
#ifndef QT_NO_CONTEXTMENU
- void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE;
+ void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
#endif
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void dragMoveEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QGraphicsSceneDragDropEvent *event) override;
+ void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) override;
+ void dragMoveEvent(QGraphicsSceneDragDropEvent *event) override;
+ void dropEvent(QGraphicsSceneDragDropEvent *event) override;
#endif
- void hoverEnterEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverMoveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- void grabMouseEvent(QEvent *event) Q_DECL_OVERRIDE;
- void ungrabMouseEvent(QEvent *event) Q_DECL_OVERRIDE;
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
+ void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
+ void grabMouseEvent(QEvent *event) override;
+ void ungrabMouseEvent(QEvent *event) override;
- void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
+ void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
#if QT_CONFIG(wheelevent)
- void wheelEvent(QGraphicsSceneWheelEvent *event) Q_DECL_OVERRIDE;
+ void wheelEvent(QGraphicsSceneWheelEvent *event) override;
#endif
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE;
+ void focusInEvent(QFocusEvent *event) override;
+ void focusOutEvent(QFocusEvent *event) override;
+ bool focusNextPrevChild(bool next) override;
- QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
- void inputMethodEvent(QInputMethodEvent *event) Q_DECL_OVERRIDE;
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
+ void inputMethodEvent(QInputMethodEvent *event) override;
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE;
- void resizeEvent(QGraphicsSceneResizeEvent *event) Q_DECL_OVERRIDE;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
+ void resizeEvent(QGraphicsSceneResizeEvent *event) override;
protected Q_SLOTS:
QGraphicsProxyWidget *newProxyWidget(const QWidget *);
diff --git a/src/widgets/graphicsview/qgraphicsscene.h b/src/widgets/graphicsview/qgraphicsscene.h
index d515585067..071f83aeb6 100644
--- a/src/widgets/graphicsview/qgraphicsscene.h
+++ b/src/widgets/graphicsview/qgraphicsscene.h
@@ -261,8 +261,8 @@ public Q_SLOTS:
void clear();
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
- bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
+ bool eventFilter(QObject *watched, QEvent *event) override;
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
diff --git a/src/widgets/graphicsview/qgraphicsscene_bsp.cpp b/src/widgets/graphicsview/qgraphicsscene_bsp.cpp
index 81d2953d8f..75eb50a3ac 100644
--- a/src/widgets/graphicsview/qgraphicsscene_bsp.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene_bsp.cpp
@@ -49,7 +49,7 @@ class QGraphicsSceneInsertItemBspTreeVisitor : public QGraphicsSceneBspTreeVisit
public:
QGraphicsItem *item;
- void visit(QList<QGraphicsItem *> *items) Q_DECL_OVERRIDE
+ void visit(QList<QGraphicsItem *> *items) override
{ items->prepend(item); }
};
@@ -58,7 +58,7 @@ class QGraphicsSceneRemoveItemBspTreeVisitor : public QGraphicsSceneBspTreeVisit
public:
QGraphicsItem *item;
- void visit(QList<QGraphicsItem *> *items) Q_DECL_OVERRIDE
+ void visit(QList<QGraphicsItem *> *items) override
{ items->removeAll(item); }
};
@@ -68,7 +68,7 @@ public:
QList<QGraphicsItem *> *foundItems;
bool onlyTopLevelItems;
- void visit(QList<QGraphicsItem *> *items) Q_DECL_OVERRIDE
+ void visit(QList<QGraphicsItem *> *items) override
{
for (int i = 0; i < items->size(); ++i) {
QGraphicsItem *item = items->at(i);
diff --git a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
index 8e78407762..b6387a2c56 100644
--- a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
+++ b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
@@ -77,25 +77,25 @@ public:
QGraphicsSceneBspTreeIndex(QGraphicsScene *scene = 0);
~QGraphicsSceneBspTreeIndex();
- QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const Q_DECL_OVERRIDE;
- QList<QGraphicsItem *> estimateTopLevelItems(const QRectF &rect, Qt::SortOrder order) const Q_DECL_OVERRIDE;
- QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::DescendingOrder) const Q_DECL_OVERRIDE;
+ QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const override;
+ QList<QGraphicsItem *> estimateTopLevelItems(const QRectF &rect, Qt::SortOrder order) const override;
+ QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::DescendingOrder) const override;
int bspTreeDepth() const;
void setBspTreeDepth(int depth);
protected Q_SLOTS:
- void updateSceneRect(const QRectF &rect) Q_DECL_OVERRIDE;
+ void updateSceneRect(const QRectF &rect) override;
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
- void clear() Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
+ void clear() override;
- void addItem(QGraphicsItem *item) Q_DECL_OVERRIDE;
- void removeItem(QGraphicsItem *item) Q_DECL_OVERRIDE;
- void prepareBoundingRectChange(const QGraphicsItem *item) Q_DECL_OVERRIDE;
+ void addItem(QGraphicsItem *item) override;
+ void removeItem(QGraphicsItem *item) override;
+ void prepareBoundingRectChange(const QGraphicsItem *item) override;
- void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const void *const value) Q_DECL_OVERRIDE;
+ void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const void *const value) override;
private :
Q_DECLARE_PRIVATE(QGraphicsSceneBspTreeIndex)
diff --git a/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h b/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
index a59a8ac1b0..07d5d80ef1 100644
--- a/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
+++ b/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
@@ -70,10 +70,10 @@ public:
QGraphicsSceneLinearIndex(QGraphicsScene *scene = 0) : QGraphicsSceneIndex(scene), m_numSortedElements(0)
{ }
- QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::DescendingOrder) const Q_DECL_OVERRIDE
+ QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::DescendingOrder) const override
{ Q_UNUSED(order); return m_items; }
- virtual QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const Q_DECL_OVERRIDE
+ virtual QList<QGraphicsItem *> estimateItems(const QRectF &rect, Qt::SortOrder order) const override
{
Q_UNUSED(rect);
Q_UNUSED(order);
@@ -81,16 +81,16 @@ public:
}
protected :
- virtual void clear() Q_DECL_OVERRIDE
+ virtual void clear() override
{
m_items.clear();
m_numSortedElements = 0;
}
- virtual void addItem(QGraphicsItem *item) Q_DECL_OVERRIDE
+ virtual void addItem(QGraphicsItem *item) override
{ m_items << item; }
- virtual void removeItem(QGraphicsItem *item) Q_DECL_OVERRIDE
+ virtual void removeItem(QGraphicsItem *item) override
{
// Sort m_items if needed
if (m_numSortedElements < m_items.size())
diff --git a/src/widgets/graphicsview/qgraphicstransform.h b/src/widgets/graphicsview/qgraphicstransform.h
index ceeb314c86..4c0535f419 100644
--- a/src/widgets/graphicsview/qgraphicstransform.h
+++ b/src/widgets/graphicsview/qgraphicstransform.h
@@ -100,7 +100,7 @@ public:
qreal zScale() const;
void setZScale(qreal);
- void applyTo(QMatrix4x4 *matrix) const Q_DECL_OVERRIDE;
+ void applyTo(QMatrix4x4 *matrix) const override;
Q_SIGNALS:
void originChanged();
@@ -136,7 +136,7 @@ public:
void setAxis(const QVector3D &axis);
void setAxis(Qt::Axis axis);
- void applyTo(QMatrix4x4 *matrix) const Q_DECL_OVERRIDE;
+ void applyTo(QMatrix4x4 *matrix) const override;
Q_SIGNALS:
void originChanged();
diff --git a/src/widgets/graphicsview/qgraphicsview.h b/src/widgets/graphicsview/qgraphicsview.h
index a9e4efefaf..20273ad068 100644
--- a/src/widgets/graphicsview/qgraphicsview.h
+++ b/src/widgets/graphicsview/qgraphicsview.h
@@ -118,7 +118,7 @@ public:
QGraphicsView(QGraphicsScene *scene, QWidget *parent = Q_NULLPTR);
~QGraphicsView();
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
QPainter::RenderHints renderHints() const;
void setRenderHint(QPainter::RenderHint hint, bool enabled = true);
@@ -214,7 +214,7 @@ public:
inline QPoint mapFromScene(qreal x, qreal y) const;
inline QPolygon mapFromScene(qreal x, qreal y, qreal w, qreal h) const;
- QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
QBrush backgroundBrush() const;
void setBackgroundBrush(const QBrush &brush);
@@ -233,39 +233,39 @@ Q_SIGNALS:
#endif
protected Q_SLOTS:
- void setupViewport(QWidget *widget) Q_DECL_OVERRIDE;
+ void setupViewport(QWidget *widget) override;
protected:
QGraphicsView(QGraphicsViewPrivate &, QWidget *parent = Q_NULLPTR);
- bool event(QEvent *event) Q_DECL_OVERRIDE;
- bool viewportEvent(QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
+ bool viewportEvent(QEvent *event) override;
#ifndef QT_NO_CONTEXTMENU
- void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE;
+ void contextMenuEvent(QContextMenuEvent *event) override;
#endif
#if QT_CONFIG(draganddrop)
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
- void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dragLeaveEvent(QDragLeaveEvent *event) override;
+ void dragMoveEvent(QDragMoveEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
#endif
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void focusInEvent(QFocusEvent *event) override;
+ bool focusNextPrevChild(bool next) override;
+ void focusOutEvent(QFocusEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
#if QT_CONFIG(wheelevent)
- void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent *event) override;
#endif
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void scrollContentsBy(int dx, int dy) Q_DECL_OVERRIDE;
- void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
- void inputMethodEvent(QInputMethodEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
+ void scrollContentsBy(int dx, int dy) override;
+ void showEvent(QShowEvent *event) override;
+ void inputMethodEvent(QInputMethodEvent *event) override;
virtual void drawBackground(QPainter *painter, const QRectF &rect);
virtual void drawForeground(QPainter *painter, const QRectF &rect);
diff --git a/src/widgets/graphicsview/qgraphicswidget.h b/src/widgets/graphicsview/qgraphicswidget.h
index 831511d14a..f71e2f8149 100644
--- a/src/widgets/graphicsview/qgraphicswidget.h
+++ b/src/widgets/graphicsview/qgraphicswidget.h
@@ -106,12 +106,12 @@ public:
inline void resize(qreal w, qreal h) { resize(QSizeF(w, h)); }
QSizeF size() const;
- void setGeometry(const QRectF &rect) Q_DECL_OVERRIDE;
+ void setGeometry(const QRectF &rect) override;
inline void setGeometry(qreal x, qreal y, qreal w, qreal h);
inline QRectF rect() const { return QRectF(QPointF(), size()); }
void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom);
- void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const Q_DECL_OVERRIDE;
+ void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const override;
void setWindowFrameMargins(qreal left, qreal top, qreal right, qreal bottom);
void getWindowFrameMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const;
@@ -161,12 +161,12 @@ public:
enum {
Type = 11
};
- int type() const Q_DECL_OVERRIDE;
+ int type() const override;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) override;
virtual void paintWindowFrame(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
#if 0
void dumpFocusChain();
@@ -184,28 +184,28 @@ public Q_SLOTS:
protected:
virtual void initStyleOption(QStyleOption *option) const;
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE;
- void updateGeometry() Q_DECL_OVERRIDE;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
+ void updateGeometry() override;
// Notification
- QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE;
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
virtual QVariant propertyChange(const QString &propertyName, const QVariant &value);
// Scene events
- bool sceneEvent(QEvent *event) Q_DECL_OVERRIDE;
+ bool sceneEvent(QEvent *event) override;
virtual bool windowFrameEvent(QEvent *e);
virtual Qt::WindowFrameSection windowFrameSectionAt(const QPointF& pos) const;
// Base event handlers
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
//virtual void actionEvent(QActionEvent *event);
virtual void changeEvent(QEvent *event);
virtual void closeEvent(QCloseEvent *event);
//void create(WId window = 0, bool initializeWindow = true, bool destroyOldWindow = true);
//void destroy(bool destroyWindow = true, bool destroySubWindows = true);
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
+ void focusInEvent(QFocusEvent *event) override;
virtual bool focusNextPrevChild(bool next);
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
+ void focusOutEvent(QFocusEvent *event) override;
virtual void hideEvent(QHideEvent *event);
//virtual int metric(PaintDeviceMetric m ) const;
virtual void moveEvent(QGraphicsSceneMoveEvent *event);
@@ -214,8 +214,8 @@ protected:
virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
virtual void showEvent(QShowEvent *event);
//virtual void tabletEvent(QTabletEvent *event);
- virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
+ virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
+ virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
virtual void grabMouseEvent(QEvent *event);
virtual void ungrabMouseEvent(QEvent *event);
virtual void grabKeyboardEvent(QEvent *event);
diff --git a/src/widgets/graphicsview/qgraphicswidget_p.h b/src/widgets/graphicsview/qgraphicswidget_p.h
index 0fb9fbba07..505a2a24c0 100644
--- a/src/widgets/graphicsview/qgraphicswidget_p.h
+++ b/src/widgets/graphicsview/qgraphicswidget_p.h
@@ -94,13 +94,13 @@ public:
QPalette palette;
uint inheritedPaletteResolveMask;
void setPalette_helper(const QPalette &palette);
- void resolvePalette(uint inheritedMask) Q_DECL_OVERRIDE;
+ void resolvePalette(uint inheritedMask) override;
void updatePalette(const QPalette &palette);
QPalette naturalWidgetPalette() const;
QFont font;
uint inheritedFontResolveMask;
void setFont_helper(const QFont &font);
- void resolveFont(uint inheritedMask) Q_DECL_OVERRIDE;
+ void resolveFont(uint inheritedMask) override;
void updateFont(const QFont &font);
QFont naturalWidgetFont() const;
@@ -115,13 +115,13 @@ public:
bool hasDecoration() const;
// Private Properties
- qreal width() const Q_DECL_OVERRIDE;
- void setWidth(qreal) Q_DECL_OVERRIDE;
- void resetWidth() Q_DECL_OVERRIDE;
+ qreal width() const override;
+ void setWidth(qreal) override;
+ void resetWidth() override;
- qreal height() const Q_DECL_OVERRIDE;
- void setHeight(qreal) Q_DECL_OVERRIDE;
- void resetHeight() Q_DECL_OVERRIDE;
+ qreal height() const override;
+ void setHeight(qreal) override;
+ void resetHeight() override;
void setGeometryFromSetPos();
// State