From c0b6e16ffa0edf0ed76cfdfeb71ec3aae99c98dd Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 5 Aug 2016 10:04:11 +0300 Subject: tests/auto/corelib/global: clean up - port Q_FOREACH to C++11 range-for (except in the Q_FOREACH tests :) - port uses of inefficient QLists to QVector - include QTest, not QtTest Fixes some errors pointed out by my tree's static checks. Change-Id: Ibb21a280537af74dda5679ec7c75d59477b6de55 Reviewed-by: David Faure --- tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/global/qlogging') diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index ce227a6c8b..c2d7338042 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include class tst_qmessagehandler : public QObject { @@ -841,7 +841,7 @@ void tst_qmessagehandler::qMessagePattern() QVERIFY(!output.isEmpty()); QCOMPARE(!output.contains("QT_MESSAGE_PATTERN"), valid); - foreach (const QByteArray &e, expected) { + for (const QByteArray &e : qAsConst(expected)) { if (!output.contains(e)) { qDebug() << output; qDebug() << "expected: " << e; -- cgit v1.2.3