tst_QWizard: port away from Q_FOREACH[1/5]: TestWizard::applyOperations()
This function is called only from one test function. Mark the function's argument as const in the caller, bringing this use into the const-local category, which is implicitly safe to port 1:1 to ranged-for. Task-number: QTBUG-115803 Pick-to: 6.6 6.5 Change-Id: I9145c1ae2aed5ab3cafc4947dc3eaaf9a27c6a04 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>bb10
parent
51b3269eef
commit
88464f7e93
|
|
@ -1794,7 +1794,7 @@ public:
|
|||
|
||||
void applyOperations(const QList<QSharedPointer<Operation>> &operations)
|
||||
{
|
||||
foreach (const QSharedPointer<Operation> &op, operations) {
|
||||
for (const QSharedPointer<Operation> &op : operations) {
|
||||
if (op) {
|
||||
op->apply(this);
|
||||
opsDescr += QLatin1Char('(') + op->describe() + QLatin1String(") ");
|
||||
|
|
@ -2044,7 +2044,7 @@ void tst_QWizard::combinations()
|
|||
{
|
||||
QFETCH(bool, ref);
|
||||
QFETCH(bool, testEquality);
|
||||
QFETCH(QList<QSharedPointer<Operation>>, operations);
|
||||
QFETCH(const QList<QSharedPointer<Operation>>, operations);
|
||||
|
||||
TestWizard wizard;
|
||||
#if !defined(QT_NO_STYLE_WINDOWSVISTA)
|
||||
|
|
|
|||
Loading…
Reference in New Issue