From d17b1947b5fb1b612e781e8af57f53f947ac13ba Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 6 Jun 2019 20:58:47 +0200 Subject: QScriptValueIterator: replace a QLinkedList with a std::list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The payload type apparently doesn't like to be destroyed unless some magic foo is enabled (cf. ~QScriptValueIteratorPrivate()). Since the code also allows to remove items in the middle, we need a container that guarantees no copies (thus, deletions) happen at all. That leaves a vector, or a std::list. Since this is a deprecated module, use the least-intrusive option: std::list Change-Id: Iaadc71959814959bf7ba1a225f375d64edbd9785 Reviewed-by: Jędrzej Nowacki --- src/script/api/qscriptvalueiterator.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/script/api/qscriptvalueiterator.cpp b/src/script/api/qscriptvalueiterator.cpp index c470664..a1e3b21 100644 --- a/src/script/api/qscriptvalueiterator.cpp +++ b/src/script/api/qscriptvalueiterator.cpp @@ -28,14 +28,14 @@ #include "qscriptengine.h" #include "qscriptengine_p.h" #include "qscriptvalue_p.h" -#include "qlinkedlist.h" - #include "JSObject.h" #include "PropertyNameArray.h" #include "JSArray.h" #include "JSFunction.h" +#include + QT_BEGIN_NAMESPACE /*! @@ -118,16 +118,16 @@ public: JSC::PropertyNameArray::const_iterator propertyNamesIt = propertyNamesArray.begin(); for(; propertyNamesIt != propertyNamesArray.end(); ++propertyNamesIt) { - propertyNames.append(*propertyNamesIt); + propertyNames.push_back(*propertyNamesIt); } it = propertyNames.begin(); initialized = true; } QScriptValue objectValue; - QLinkedList propertyNames; - QLinkedList::iterator it; - QLinkedList::iterator current; + std::list propertyNames; + std::list::iterator it; + std::list::iterator current; bool initialized; }; -- cgit v1.2.3