aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp8
-rw-r--r--tests/auto/quickcontrols/sanity/tst_sanity.cpp2
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index f0dca8ca7e..a215c0b691 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -1320,7 +1320,9 @@ void TestQmllint::compilerWarnings()
auto categories = QQmlJSLogger::defaultCategories();
- auto category = std::find(categories.begin(), categories.end(), qmlCompiler);
+ auto category = std::find_if(categories.begin(), categories.end(), [](const QQmlJS::LoggerCategory& category) {
+ return category.id() == qmlCompiler;
+ });
Q_ASSERT(category != categories.end());
if (enableCompilerWarnings) {
@@ -1691,7 +1693,9 @@ void TestQmllint::qrcUrlImport()
void TestQmllint::attachedPropertyReuse()
{
auto categories = QQmlJSLogger::defaultCategories();
- auto category = std::find(categories.begin(), categories.end(), qmlAttachedPropertyReuse);
+ auto category = std::find_if(categories.begin(), categories.end(), [](const QQmlJS::LoggerCategory& category) {
+ return category.id() == qmlAttachedPropertyReuse;
+ });
Q_ASSERT(category != categories.end());
category->setLevel(QtWarningMsg);
diff --git a/tests/auto/quickcontrols/sanity/tst_sanity.cpp b/tests/auto/quickcontrols/sanity/tst_sanity.cpp
index 720c744056..1c41c4a53c 100644
--- a/tests/auto/quickcontrols/sanity/tst_sanity.cpp
+++ b/tests/auto/quickcontrols/sanity/tst_sanity.cpp
@@ -66,7 +66,7 @@ tst_Sanity::tst_Sanity()
m_linter.setPluginsEnabled(true);
for (auto &category : m_categories) {
- if (category == qmlDeferredPropertyId || category == qmlAttachedPropertyReuse) {
+ if (category.id() == qmlDeferredPropertyId || category.id() == qmlAttachedPropertyReuse) {
category.setLevel(QtWarningMsg);
category.setIgnored(false);
} else {