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 <mahmoud.badri@qt.io>
This commit is contained in:
Tim Jenssen
2024-06-19 13:37:23 +02:00
parent f0e49fc12a
commit 9e9f0015b2

View File

@@ -308,10 +308,11 @@ bool ContentLibraryUserModel::hasRequiredQuick3DImport() const
return m_widget->hasQuick3DImport() && m_quick3dMajorVersion == 6 && m_quick3dMinorVersion >= 3; return m_widget->hasQuick3DImport() && m_quick3dMajorVersion == 6 && m_quick3dMinorVersion >= 3;
} }
void ContentLibraryUserModel::updateIsEmpty() void ContentLibraryUserModel::updateIsEmpty() {
{
bool newIsEmpty = std::ranges::all_of(std::as_const(m_userCategories), bool newIsEmpty = Utils::allOf(std::as_const(m_userCategories), [](UserCategory *cat) {
[](UserCategory *cat) { return cat->isEmpty(); }); return cat->isEmpty();
});
if (m_isEmpty == newIsEmpty) if (m_isEmpty == newIsEmpty)
return; return;