From 9e9f0015b2d23157010a7e2bd455a4c01d610885 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 19 Jun 2024 13:37:23 +0200 Subject: [PATCH] QmlDesigner: fix build from https://en.cppreference.com/w/cpp/compiler_support/20 ranges support: The One Ranges Proposal: Clang 13 (partial) 15* For snapshots we use still Clang 12 (will be changed in near future), but also QtCreator still supports that old compilers. The gitlab CI uses much newer compiler versions. Maybe we also add a check, if the compiler is too old, do not compile QmlDesigner plugin. Change-Id: I4d3281739a957546237f47f53fe8f523f4768978 Reviewed-by: Mahmoud Badri --- .../contentlibrary/contentlibraryusermodel.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp index 030e2022c6b..ab88aea07f5 100644 --- a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp +++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp @@ -308,10 +308,11 @@ bool ContentLibraryUserModel::hasRequiredQuick3DImport() const return m_widget->hasQuick3DImport() && m_quick3dMajorVersion == 6 && m_quick3dMinorVersion >= 3; } -void ContentLibraryUserModel::updateIsEmpty() -{ - bool newIsEmpty = std::ranges::all_of(std::as_const(m_userCategories), - [](UserCategory *cat) { return cat->isEmpty(); }); +void ContentLibraryUserModel::updateIsEmpty() { + + bool newIsEmpty = Utils::allOf(std::as_const(m_userCategories), [](UserCategory *cat) { + return cat->isEmpty(); + }); if (m_isEmpty == newIsEmpty) return;