diff options
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r-- | src/widgets/graphicsview/qgraphicssceneevent.cpp | 17 | ||||
-rw-r--r-- | src/widgets/graphicsview/qgraphicsview.cpp | 3 |
2 files changed, 7 insertions, 13 deletions
diff --git a/src/widgets/graphicsview/qgraphicssceneevent.cpp b/src/widgets/graphicsview/qgraphicssceneevent.cpp index 5077a39d67..768dd07d4e 100644 --- a/src/widgets/graphicsview/qgraphicssceneevent.cpp +++ b/src/widgets/graphicsview/qgraphicssceneevent.cpp @@ -344,8 +344,7 @@ class QGraphicsSceneMouseEventPrivate : public QGraphicsSceneEventPrivate Q_DECLARE_PUBLIC(QGraphicsSceneMouseEvent) public: inline QGraphicsSceneMouseEventPrivate() - : button(Qt::NoButton), - buttons(0), modifiers(0), source(Qt::MouseEventNotSynthesized), flags(0) + : button(Qt::NoButton), source(Qt::MouseEventNotSynthesized) { } QPointF pos; @@ -691,17 +690,15 @@ class QGraphicsSceneWheelEventPrivate : public QGraphicsSceneEventPrivate { Q_DECLARE_PUBLIC(QGraphicsSceneWheelEvent) public: - inline QGraphicsSceneWheelEventPrivate() - : buttons(0), modifiers(0), delta(0), orientation(Qt::Horizontal) - { } + inline QGraphicsSceneWheelEventPrivate() = default; QPointF pos; QPointF scenePos; QPoint screenPos; Qt::MouseButtons buttons; Qt::KeyboardModifiers modifiers; - int delta; - Qt::Orientation orientation; + int delta = 0; + Qt::Orientation orientation = Qt::Horizontal; }; /*! @@ -872,15 +869,13 @@ class QGraphicsSceneContextMenuEventPrivate : public QGraphicsSceneEventPrivate { Q_DECLARE_PUBLIC(QGraphicsSceneContextMenuEvent) public: - inline QGraphicsSceneContextMenuEventPrivate() - : modifiers(0), reason(QGraphicsSceneContextMenuEvent::Other) - { } + inline QGraphicsSceneContextMenuEventPrivate() = default; QPointF pos; QPointF scenePos; QPoint screenPos; Qt::KeyboardModifiers modifiers; - QGraphicsSceneContextMenuEvent::Reason reason; + QGraphicsSceneContextMenuEvent::Reason reason = QGraphicsSceneContextMenuEvent::Other; }; /*! diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index f1ed0f3b4e..4c270b1af2 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -352,14 +352,13 @@ QGraphicsViewPrivate::QGraphicsViewPrivate() alignment(Qt::AlignCenter), transformationAnchor(QGraphicsView::AnchorViewCenter), resizeAnchor(QGraphicsView::NoAnchor), viewportUpdateMode(QGraphicsView::MinimalViewportUpdate), - optimizationFlags(0), scene(0), #if QT_CONFIG(rubberband) rubberBanding(false), rubberBandSelectionMode(Qt::IntersectsItemShape), rubberBandSelectionOperation(Qt::ReplaceSelection), #endif - handScrollMotions(0), cacheMode(0), + handScrollMotions(0), #ifndef QT_NO_CURSOR hasStoredOriginalCursor(false), #endif |