aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/tests/testextrainclude.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-20 09:34:31 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-20 13:25:30 +0200
commita14ea7738f493280f5c7b6e4a8834a7d1daacd1e (patch)
treec2ff3d4ab084f666cda6a27e44735b17a49b147c /sources/shiboken2/ApiExtractor/tests/testextrainclude.cpp
parentb6c21248de87f892c3711a248a0514d3c3f73200 (diff)
shiboken2/ApiExtractor tests: Avoid detaching of lists
Use constFirst/Last() instead of first()/last(). Change-Id: I3e7c72e3ab72b86565eea087b470f2a51b2999f8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testextrainclude.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testextrainclude.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testextrainclude.cpp b/sources/shiboken2/ApiExtractor/tests/testextrainclude.cpp
index 7e5664842..565f157e1 100644
--- a/sources/shiboken2/ApiExtractor/tests/testextrainclude.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testextrainclude.cpp
@@ -52,7 +52,7 @@ void TestExtraInclude::testClassExtraInclude()
QVector<Include> includes = classA->typeEntry()->extraIncludes();
QCOMPARE(includes.count(), 1);
- QCOMPARE(includes.first().name(), QLatin1String("header.h"));
+ QCOMPARE(includes.constFirst().name(), QLatin1String("header.h"));
}
void TestExtraInclude::testGlobalExtraIncludes()
@@ -79,8 +79,8 @@ void TestExtraInclude::testGlobalExtraIncludes()
QVector<Include> includes = module->extraIncludes();
QCOMPARE(includes.count(), 2);
- QCOMPARE(includes.first().name(), QLatin1String("header1.h"));
- QCOMPARE(includes.last().name(), QLatin1String("header2.h"));
+ QCOMPARE(includes.constFirst().name(), QLatin1String("header1.h"));
+ QCOMPARE(includes.constLast().name(), QLatin1String("header2.h"));
}
QTEST_APPLESS_MAIN(TestExtraInclude)