From 0791964c6fe077ec1c410c5f75f5073438ff8473 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 25 Mar 2024 18:33:27 +0100 Subject: [PATCH] Apply clang-format and cmake-format --- CMakeLists.txt | 4 +++- model/fieldmodel.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c88567..74bc49b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,7 +151,9 @@ elseif (QT_PACKAGE_PREFIX MATCHES ".*Qt([0-9]+).*") endif () # require Qt 6 for the Qt Quick GUI -if (QUICK_GUI AND MAJOR_QT_VERSION VERSION_LESS 6 OR MAJOR_QT_VERSION VERSION_GREATER_EQUAL 7) +if (QUICK_GUI + AND MAJOR_QT_VERSION VERSION_LESS 6 + OR MAJOR_QT_VERSION VERSION_GREATER_EQUAL 7) message(FATAL_ERROR "The Qt Quick GUI is only compatible with Qt 6 (but Qt ${MAJOR_QT_VERSION} was found).") endif () diff --git a/model/fieldmodel.cpp b/model/fieldmodel.cpp index a7584c6..e8a66e6 100644 --- a/model/fieldmodel.cpp +++ b/model/fieldmodel.cpp @@ -340,7 +340,8 @@ bool FieldModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int co // begin the move // note: When moving rows down (destinationChild > sourceRow) the third param is still counted in the initial array! - if (!beginMoveRows(sourceParent, sourceRow, sourceRow + count - 1, destinationParent, destinationChild > sourceRow ? destinationChild + count : destinationChild)) { + if (!beginMoveRows(sourceParent, sourceRow, sourceRow + count - 1, destinationParent, + destinationChild > sourceRow ? destinationChild + count : destinationChild)) { return false; }