summaryrefslogtreecommitdiff
path: root/tests/benchmarker
diff options
context:
space:
mode:
authorIvan Komissarov <ABBAPOH@gmail.com>2019-05-19 02:01:24 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2019-05-20 15:59:17 +0000
commitb26d45671efe2ac7ad6e0fc5a1e372caf82f8bc9 (patch)
treec6d30dffb434c7480163891c81c18f5c1a2166a2 /tests/benchmarker
parentf88fbf2c88af7348dbd205ccd7a994f6306526f2 (diff)
downloadqbs-b26d45671efe2ac7ad6e0fc5a1e372caf82f8bc9.tar.gz
Fix -Wclazy-inefficient-qlist-soft
QLists were used with types that bigger than sizeof(void*) which lead to extra allocations Change-Id: Id716c6b4919f9a0ad62e1d2972319a600785afc5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/benchmarker')
-rw-r--r--tests/benchmarker/valgrindrunner.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/benchmarker/valgrindrunner.cpp b/tests/benchmarker/valgrindrunner.cpp
index 0441e1b10..344a23516 100644
--- a/tests/benchmarker/valgrindrunner.cpp
+++ b/tests/benchmarker/valgrindrunner.cpp
@@ -39,6 +39,7 @@
#include <QtConcurrent/qtconcurrentrun.h>
+#include <deque>
#include <mutex>
namespace qbsBenchmarker {
@@ -56,15 +57,17 @@ ValgrindRunner::ValgrindRunner(Activities activities, const QString &testProject
void ValgrindRunner::run()
{
- QList<QFuture<void>> futures;
+ std::deque<QFuture<void>> futures;
if (m_activities & ActivityResolving)
futures.push_back(QtConcurrent::run(this, &ValgrindRunner::traceResolving));
if (m_activities & ActivityRuleExecution)
futures.push_back(QtConcurrent::run(this, &ValgrindRunner::traceRuleExecution));
if (m_activities & ActivityNullBuild)
futures.push_back(QtConcurrent::run(this, &ValgrindRunner::traceNullBuild));
- while (!futures.empty())
- futures.takeFirst().waitForFinished();
+ while (!futures.empty()) {
+ futures.front().waitForFinished();
+ futures.pop_front();
+ }
}
void ValgrindRunner::traceResolving()