Use constBegin/End with const_iterator
Change-Id: I9c4801ac91c52d487e98a99ff4d38e133f0679a3 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
This commit is contained in:
parent
048a536329
commit
45969a0dbb
|
@ -156,7 +156,7 @@ void tst_Sanity::initTestCase()
|
|||
void tst_Sanity::jsFiles()
|
||||
{
|
||||
QMap<QString, QString>::const_iterator it;
|
||||
for (it = files.begin(); it != files.end(); ++it) {
|
||||
for (it = files.constBegin(); it != files.constEnd(); ++it) {
|
||||
if (QFileInfo(it.value()).suffix() == QStringLiteral("js"))
|
||||
QFAIL(qPrintable(it.value() + ": JS files are not allowed"));
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ void tst_Sanity::functions_data()
|
|||
QTest::addColumn<QString>("filePath");
|
||||
|
||||
QMap<QString, QString>::const_iterator it;
|
||||
for (it = files.begin(); it != files.end(); ++it)
|
||||
for (it = files.constBegin(); it != files.constEnd(); ++it)
|
||||
QTest::newRow(qPrintable(it.key())) << it.key() << it.value();
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ void tst_Sanity::signalHandlers_data()
|
|||
QTest::addColumn<QString>("filePath");
|
||||
|
||||
QMap<QString, QString>::const_iterator it;
|
||||
for (it = files.begin(); it != files.end(); ++it)
|
||||
for (it = files.constBegin(); it != files.constEnd(); ++it)
|
||||
QTest::newRow(qPrintable(it.key())) << it.key() << it.value();
|
||||
}
|
||||
|
||||
|
@ -249,7 +249,7 @@ void tst_Sanity::anchors_data()
|
|||
QTest::addColumn<QString>("filePath");
|
||||
|
||||
QMap<QString, QString>::const_iterator it;
|
||||
for (it = files.begin(); it != files.end(); ++it)
|
||||
for (it = files.constBegin(); it != files.constEnd(); ++it)
|
||||
QTest::newRow(qPrintable(it.key())) << it.key() << it.value();
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ void tst_Sanity::attachedObjects_data()
|
|||
QTest::addColumn<QString>("filePath");
|
||||
|
||||
QMap<QString, QString>::const_iterator it;
|
||||
for (it = files.begin(); it != files.end(); ++it)
|
||||
for (it = files.constBegin(); it != files.constEnd(); ++it)
|
||||
QTest::newRow(qPrintable(it.key())) << it.key() << it.value();
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ void tst_Snippets::screenshots_data()
|
|||
QTest::addColumn<QString>("output");
|
||||
|
||||
QMap<QString, QStringPair>::const_iterator it;
|
||||
for (it = filePaths.begin(); it != filePaths.end(); ++it)
|
||||
for (it = filePaths.constBegin(); it != filePaths.constEnd(); ++it)
|
||||
QTest::newRow(qPrintable(it.key())) << it.value().first << it.value().second;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue