From 6f4bc3942dda076eedf38d8c8604eb4fa5d7bd3b Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 1 Sep 2019 17:12:01 +0200 Subject: Widgets/GraphicsView examples: cleanup Cleanup GraphicsView examples with the help of clang-tidy - modernize-use-nullptr - modernize-use-default-member-init - modernize-use-override.IgnoreDestructors - Some QList -> QVector changes - use nullptr - use normalized includes, remove unused includes - fix style Change-Id: I79347e55bfde52f6ae7749cc7093fbd442044020 Reviewed-by: Friedemann Kleint --- examples/widgets/doc/src/collidingmice-example.qdoc | 3 ++- examples/widgets/doc/src/diagramscene.qdoc | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/widgets/doc/src') diff --git a/examples/widgets/doc/src/collidingmice-example.qdoc b/examples/widgets/doc/src/collidingmice-example.qdoc index 657c4162182..984d3244f9a 100644 --- a/examples/widgets/doc/src/collidingmice-example.qdoc +++ b/examples/widgets/doc/src/collidingmice-example.qdoc @@ -75,7 +75,8 @@ \section1 Mouse Class Definition When constructing a mouse item, we first ensure that all the item's - private variables are properly initialized: + private variables which were no yet initialized directly in the class + are properly initialized: \snippet graphicsview/collidingmice/mouse.cpp 0 diff --git a/examples/widgets/doc/src/diagramscene.qdoc b/examples/widgets/doc/src/diagramscene.qdoc index 860dcc5cb93..1a94d53162a 100644 --- a/examples/widgets/doc/src/diagramscene.qdoc +++ b/examples/widgets/doc/src/diagramscene.qdoc @@ -643,7 +643,9 @@ This function is called when the item is removed from the scene and removes all arrows that are connected to this item. The arrow must be removed from the \c arrows list of both its start and end - item. + item. Since either the start or the end item is the object where + this function is currently called, we have to make sure to work on + a copy of arrows since removeArrow() is modifying this container. Here is the \c addArrow() function: -- cgit v1.2.3