From f4143a6eb11d786a2668f3c05438e2fb22dd2b44 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 4 May 2019 21:03:32 +0200 Subject: [PATCH] Apply cmake-format and clang-format --- CMakeLists.txt | 24 ++++++++++++++++-------- cli/helper.h | 2 +- gui/fileinfomodel.cpp | 2 +- gui/picturepreviewselection.cpp | 2 +- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f71a8e1..56517c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,7 +169,8 @@ set(REQUIRED_ICONS view-media-lyrics) # find c++utilities -set(CONFIGURATION_PACKAGE_SUFFIX "" CACHE STRING "sets the suffix for find_package() calls to packages configured via c++utilities") +set(CONFIGURATION_PACKAGE_SUFFIX "" + CACHE STRING "sets the suffix for find_package() calls to packages configured via c++utilities") find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED) use_cpp_utilities() include(BasicConfig) @@ -230,10 +231,17 @@ include(ConfigHeader) add_desktop_file() # create custom desktop file for launching the renaming utility separately -add_custom_desktop_file(FILE_NAME "${META_ID}-renamingutility" - DESKTOP_FILE_APP_NAME "Renaming utility (${META_APP_NAME})" - DESKTOP_FILE_GENERIC_NAME "Renaming utility (${META_APP_NAME})" - DESKTOP_FILE_DESCRIPTION "Tool to rename files using its tag information" - DESKTOP_FILE_CATEGORIES "${META_APP_CATEGORIES}" - DESKTOP_FILE_CMD "${META_TARGET_NAME} qt-gui --renaming-utility" - DESKTOP_FILE_ICON "${META_PROJECT_NAME}") +add_custom_desktop_file(FILE_NAME + "${META_ID}-renamingutility" + DESKTOP_FILE_APP_NAME + "Renaming utility (${META_APP_NAME})" + DESKTOP_FILE_GENERIC_NAME + "Renaming utility (${META_APP_NAME})" + DESKTOP_FILE_DESCRIPTION + "Tool to rename files using its tag information" + DESKTOP_FILE_CATEGORIES + "${META_APP_CATEGORIES}" + DESKTOP_FILE_CMD + "${META_TARGET_NAME} qt-gui --renaming-utility" + DESKTOP_FILE_ICON + "${META_PROJECT_NAME}") diff --git a/cli/helper.h b/cli/helper.h index 5a3c3a6..f05bfe5 100644 --- a/cli/helper.h +++ b/cli/helper.h @@ -228,7 +228,7 @@ template <> struct hash { using std::hash; return (hash()(scope.field) ^ (hash()(scope.tagType) << 1) >> 1) ^ (hash()(scope.tagTarget) ^ (static_cast(scope.allTracks) << 4) - ^ (hash>()(scope.trackIds) << 1) >> 1); + ^ (hash>()(scope.trackIds) << 1) >> 1); } }; diff --git a/gui/fileinfomodel.cpp b/gui/fileinfomodel.cpp index 3769705..a53574b 100644 --- a/gui/fileinfomodel.cpp +++ b/gui/fileinfomodel.cpp @@ -89,7 +89,7 @@ public: } } - template> * = nullptr> + template > * = nullptr> void appendRow(const QString &label, IntegralType number) { if (number) { diff --git a/gui/picturepreviewselection.cpp b/gui/picturepreviewselection.cpp index 1ac58f8..6d54204 100644 --- a/gui/picturepreviewselection.cpp +++ b/gui/picturepreviewselection.cpp @@ -359,7 +359,7 @@ void PicturePreviewSelection::addOfSelectedType(const QString &path) if ((fileInfo.size() >= 10485760) && (QMessageBox::warning(this, QCoreApplication::applicationName(), tr("The selected file is very large (for a cover). Do you want to continue?"), QMessageBox::Yes, QMessageBox::No) - == QMessageBox::No)) { + == QMessageBox::No)) { return; }