aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/sanity/tst_sanity.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-07-23 13:16:38 +0200
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-07-24 12:23:49 +0000
commit45969a0dbb69005f32eb9f99a9669eaee4aa256c (patch)
tree1041782df71be0441007d007e9a3a51bfc94a73c /tests/auto/sanity/tst_sanity.cpp
parent048a5363294273d60b3634f96295c28828e5383e (diff)
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>
Diffstat (limited to 'tests/auto/sanity/tst_sanity.cpp')
-rw-r--r--tests/auto/sanity/tst_sanity.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/sanity/tst_sanity.cpp b/tests/auto/sanity/tst_sanity.cpp
index eb7c5375..a32502f0 100644
--- a/tests/auto/sanity/tst_sanity.cpp
+++ b/tests/auto/sanity/tst_sanity.cpp
@@ -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();
}