diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-08 16:34:19 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-10 22:19:45 +0200 |
commit | b8191f41c65a908d0529d235b0200e6de99c34fb (patch) | |
tree | 59d750687ba5896cd4638780bb32193a5f563961 /src/testlib/qtestjunitstreamer_p.h | |
parent | 4e0082a9cacfdfd0c43e6105274bc0d41dd18801 (diff) |
testlib: Replace custom QTestCoreList with std::vector
The custom linked list implementation was implemented using
recursion, and as a result didn't handle long lists of test
cases, exhausting the stack on e.g. Windows where the default
stack is only 1MB. This was the case with e.g. the tst_QChar
test that produces 20K test cases.
Replacing with a std::vector should do nicely for our use-case.
No attempt has been made at further reducing the complexity
of QTestElement/QTestCoreElement/QTestElementAttribute.
Pick-to: 6.2
Change-Id: Ie295f7cf937ec6abdc4606b6120818551ad285c7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/testlib/qtestjunitstreamer_p.h')
-rw-r--r-- | src/testlib/qtestjunitstreamer_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testlib/qtestjunitstreamer_p.h b/src/testlib/qtestjunitstreamer_p.h index 7d91e2b66c..7fe9c5cc5c 100644 --- a/src/testlib/qtestjunitstreamer_p.h +++ b/src/testlib/qtestjunitstreamer_p.h @@ -72,8 +72,8 @@ class QTestJUnitStreamer void formatAfterAttributes(const QTestElement *element, QTestCharBuffer *formatted) const; void formatAttributes(const QTestElement *element, const QTestElementAttribute *attribute, QTestCharBuffer *formatted) const; void output(QTestElement *element) const; - void outputElements(QTestElement *element, bool isChildElement = false) const; - void outputElementAttributes(const QTestElement *element, QTestElementAttribute *attribute) const; + void outputElements(const std::vector<QTestElement*> &) const; + void outputElementAttributes(const QTestElement *element, const std::vector<QTestElementAttribute*> &attributes) const; void outputString(const char *msg) const; |