From b69b7094d2906ca5412ce9291c347107f0b142eb Mon Sep 17 00:00:00 2001 From: Frank Meerkoetter Date: Sun, 17 Apr 2016 21:29:25 +0200 Subject: Replace handwritten loops with qDeleteAll Change-Id: Ifb54fbd7d4a32dc23404e78a58c421a8be9e0e9a Reviewed-by: Robin Burchell --- src/qml/qml/qqmlxmlhttprequest.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp') diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index eebaf27901..e9644839d1 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -117,10 +117,8 @@ class NodeImpl public: NodeImpl() : type(Element), document(0), parent(0) {} virtual ~NodeImpl() { - for (int ii = 0; ii < children.count(); ++ii) - delete children.at(ii); - for (int ii = 0; ii < attributes.count(); ++ii) - delete attributes.at(ii); + qDeleteAll(children); + qDeleteAll(attributes); } // These numbers are copied from the Node IDL definition -- cgit v1.2.3