diff --git a/cmake/ECM/modules/ECMFindModuleHelpers.cmake b/cmake/ECM/modules/ECMFindModuleHelpers.cmake index a4837403d..92c796e6b 100644 --- a/cmake/ECM/modules/ECMFindModuleHelpers.cmake +++ b/cmake/ECM/modules/ECMFindModuleHelpers.cmake @@ -103,8 +103,6 @@ The following variables will be set: Since pre-1.0.0. #]=======================================================================] -include(CMakeParseArguments) - macro(ecm_find_package_version_check module_name) if(CMAKE_VERSION VERSION_LESS 3.16.0) message(FATAL_ERROR "CMake 3.16.0 is required by Find${module_name}.cmake") diff --git a/cmake/ECM/modules/QtVersionOption.cmake b/cmake/ECM/modules/QtVersionOption.cmake index ea37da22d..0ea036585 100644 --- a/cmake/ECM/modules/QtVersionOption.cmake +++ b/cmake/ECM/modules/QtVersionOption.cmake @@ -12,6 +12,9 @@ that is, if the major Qt version has not yet been determined otherwise This module is typically included by other modules requiring knowledge about the major Qt version. +If the ECM version passed to find_package was at least 5.240.0 Qt6 is picked by default. +Otherwise Qt5 is picked. + ``QT_MAJOR_VERSION`` is defined to either be "5" or "6". Since 5.82.0. @@ -26,7 +29,11 @@ if (TARGET Qt5::Core) elseif (TARGET Qt6::Core) set(QT_MAJOR_VERSION 6) else() - option(BUILD_WITH_QT6 "Build against Qt 6" OFF) + if (ECM_GLOBAL_FIND_VERSION VERSION_GREATER_EQUAL 5.240) + option(BUILD_WITH_QT6 "Build against Qt 6" ON) + else() + option(BUILD_WITH_QT6 "Build against Qt 6" OFF) + endif() if (BUILD_WITH_QT6) set(QT_MAJOR_VERSION 6) diff --git a/cmake/KDAB/modules/KDQtInstallPaths.cmake b/cmake/KDAB/modules/KDQtInstallPaths.cmake index d37888445..c9294c011 100644 --- a/cmake/KDAB/modules/KDQtInstallPaths.cmake +++ b/cmake/KDAB/modules/KDQtInstallPaths.cmake @@ -1,5 +1,5 @@ # -# SPDX-FileCopyrightText: 2016-2023 Klarälvdalens Datakonsult AB, a KDAB Group company +# SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company # Author: Allen Winter # # SPDX-License-Identifier: BSD-3-Clause diff --git a/ui/clienttoolmodel.cpp b/ui/clienttoolmodel.cpp index 2f4d153bd..ea6233999 100644 --- a/ui/clienttoolmodel.cpp +++ b/ui/clienttoolmodel.cpp @@ -89,7 +89,7 @@ Qt::ItemFlags ClientToolModel::flags(const QModelIndex &index) const if (!index.isValid()) return flags; - const auto &tool = m_toolManager->tools().at(index.row()); + const auto tool = m_toolManager->tools().at(index.row()); if (!tool.isEnabled() || (!tool.remotingSupported() && Endpoint::instance()->isRemoteClient())) flags &= ~(Qt::ItemIsEnabled | Qt::ItemIsSelectable); return flags; diff --git a/ui/uistatemanager.cpp b/ui/uistatemanager.cpp index 8d40ff774..964ac18ac 100644 --- a/ui/uistatemanager.cpp +++ b/ui/uistatemanager.cpp @@ -559,7 +559,7 @@ void UIStateManager::headerSectionCountChanged() // E.g. we might be here because of columnsInserted() (which just finished, but not all receivers were told yet) // and restoring will sort() the model, which will emit layoutChanged(). Separate the two so QAbstractItemModelTester doesn't abort. // clang-format off - QMetaObject::invokeMethod(this, "restoreHeaderState", Qt::QueuedConnection, Q_ARG(QHeaderView*, headerView)); + QMetaObject::invokeMethod(this, "restoreHeaderState", Qt::QueuedConnection, Q_ARG(QHeaderView *, headerView)); // clang-format on }