Use QList instead of QVector in testlib
Task-number: QTBUG-84469 Change-Id: Icbc3c3130399296f6b5a7e9a313ad4737669de00 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
d8f814cdb7
commit
5bb3d64682
@ -233,7 +233,7 @@ private:
|
||||
// the full, normalized signal name
|
||||
QByteArray sig;
|
||||
// holds the QMetaType types for the argument list of the signal
|
||||
QVector<int> args;
|
||||
QList<int> args;
|
||||
|
||||
QTestEventLoop m_loop;
|
||||
bool m_waiting;
|
||||
|
@ -864,7 +864,7 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml) {
|
||||
qtest_qParseArgs(argc, const_cast<const char *const *>(argv), qml);
|
||||
}
|
||||
|
||||
QBenchmarkResult qMedian(const QVector<QBenchmarkResult> &container)
|
||||
QBenchmarkResult qMedian(const QList<QBenchmarkResult> &container)
|
||||
{
|
||||
const int count = container.count();
|
||||
if (count == 0)
|
||||
@ -873,7 +873,7 @@ QBenchmarkResult qMedian(const QVector<QBenchmarkResult> &container)
|
||||
if (count == 1)
|
||||
return container.front();
|
||||
|
||||
QVector<QBenchmarkResult> containerCopy = container;
|
||||
QList<QBenchmarkResult> containerCopy = container;
|
||||
std::sort(containerCopy.begin(), containerCopy.end());
|
||||
|
||||
const int middle = count / 2;
|
||||
@ -910,7 +910,7 @@ void TestMethods::invokeTestOnData(int index) const
|
||||
bool isBenchmark = false;
|
||||
int i = (QBenchmarkGlobalData::current->measurer->needsWarmupIteration()) ? -1 : 0;
|
||||
|
||||
QVector<QBenchmarkResult> results;
|
||||
QList<QBenchmarkResult> results;
|
||||
bool minimumTotalReached = false;
|
||||
do {
|
||||
QBenchmarkTestMethodData::current->beginDataRun();
|
||||
@ -1984,7 +1984,7 @@ int QTest::qExec(QObject *testObject, const QStringList &arguments)
|
||||
const int argc = arguments.count();
|
||||
QVarLengthArray<char *> argv(argc);
|
||||
|
||||
QVector<QByteArray> args;
|
||||
QList<QByteArray> args;
|
||||
args.reserve(argc);
|
||||
|
||||
for (int i = 0; i < argc; ++i)
|
||||
|
@ -168,7 +168,7 @@ namespace QTest {
|
||||
|
||||
static IgnoreResultList *ignoreResultList = nullptr;
|
||||
|
||||
static QVector<QAbstractTestLogger*> loggers;
|
||||
static QList<QAbstractTestLogger *> loggers;
|
||||
static bool loggerUsingStdout = false;
|
||||
|
||||
static int verbosity = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user