Fix cmakelint issues

Expression repeated inside endif; better to use only endif()
 [readability/logic]  
Extra spaces between 'if' and its () [whitespace/extra]  
Do not mix upper and lower case commands [readability/mixedcase]  
Weird indentation; use 2 spaces [whitespace/indent]  
Mismatching spaces inside () after command [whitespace/mismatch]  
Extra spaces between 'set' and its () [whitespace/extra]
This commit is contained in:
Marius Pa
2024-07-01 23:29:08 +00:00
committed by Kurt Hindenburg
parent 7f37482fc8
commit cf30b8413e
5 changed files with 37 additions and 37 deletions

View File

@@ -1,10 +1,10 @@
# Konsole project
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "24")
set (RELEASE_SERVICE_VERSION_MINOR "07")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
set(RELEASE_SERVICE_VERSION_MAJOR "24")
set(RELEASE_SERVICE_VERSION_MINOR "07")
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
# Do not increase these requirements without a merge-request or/and
# approval from maintainer(s).
@@ -72,7 +72,7 @@ find_package(KF6 ${KF6_DEP_VERSION} REQUIRED
XmlGui
)
if (NOT WIN32)
if(NOT WIN32)
find_package(KF6 ${KF6_DEP_VERSION} REQUIRED
Pty
)
@@ -106,7 +106,7 @@ find_package(ICU 61.0 COMPONENTS uc i18n REQUIRED)
if(UNIX AND NOT APPLE AND NOT ANDROID AND NOT HAIKU)
option(WITHOUT_X11 "Build without X11 integration (skips finding X11)" OFF)
if (NOT WITHOUT_X11)
if(NOT WITHOUT_X11)
find_package(X11)
set_package_properties(X11 PROPERTIES TYPE OPTIONAL)
set(HAVE_X11 ${X11_FOUND})
@@ -129,7 +129,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} )
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
file(GLOB ICONS_SRCS "data/icons/*.png")
@@ -139,11 +139,11 @@ option(ENABLE_PLUGIN_QUICKCOMMANDS "Build the Quick Commands plugin" ON)
add_subdirectory( src )
add_subdirectory( desktop )
if (HAVE_DBUS)
if(HAVE_DBUS)
add_subdirectory( kconf_update )
endif()
if (KF6DocTools_FOUND)
if(KF6DocTools_FOUND)
add_subdirectory( doc/manual )
endif()
@@ -151,7 +151,7 @@ add_subdirectory( tools )
# Conditionally install icons for Linux as they may not be provided by the user theme
option(INSTALL_ICONS "Install icons" OFF)
if (INSTALL_ICONS)
if(INSTALL_ICONS)
include(ECMInstallIcons)
ecm_install_icons( ICONS ${ICONS_SRCS} DESTINATION ${KDE_INSTALL_ICONDIR} )
endif()
@@ -163,11 +163,11 @@ ecm_qt_install_logging_categories(
)
ki18n_install( po )
if (KF6DocTools_FOUND)
if(KF6DocTools_FOUND)
kdoctools_install( po )
endif()
if (ECM_VERSION VERSION_GREATER_EQUAL 5.101.0)
if(ECM_VERSION VERSION_GREATER_EQUAL 5.101.0)
install(FILES completions/konsole.zsh RENAME _konsole DESTINATION ${KDE_INSTALL_ZSHAUTOCOMPLETEDIR})
endif()
@@ -176,6 +176,6 @@ feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAG
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.c *.cpp *.h *.hpp)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
if (ECM_VERSION VERSION_GREATER_EQUAL 5.79.0)
if(ECM_VERSION VERSION_GREATER_EQUAL 5.79.0)
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
endif()

View File

@@ -4,7 +4,7 @@
install( PROGRAMS org.kde.konsole.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install( FILES org.kde.konsole.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
install( FILES org.kde.konsole.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kglobalaccel)
install(FILES org.kde.konsole.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kglobalaccel)
install(FILES konsole.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
install( PROGRAMS konsolerun.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kio/servicemenus )

View File

@@ -1,5 +1,5 @@
########### install files ###############
KDOCTOOLS_CREATE_HANDBOOK(index.docbook
INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en
SUBDIR konsole)
INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en
SUBDIR konsole)

View File

@@ -3,7 +3,7 @@
add_definitions(-DTRANSLATION_DOMAIN=\"konsole\")
### Handle DragonFlyBSD here instead of using __DragonFly__
IF(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
set(HAVE_OS_DRAGONFLYBSD 1)
else()
set(HAVE_OS_DRAGONFLYBSD 0)
@@ -33,7 +33,7 @@ option(ENABLE_DECRQCRA "Konsole: enable DEC request checksum rectangular area" O
option(KONSOLE_BUILD_UNI2CHARACTERWIDTH "Konsole: build uni2characterwidth executable" OFF)
set(dbus_xml_srcs)
if (HAVE_DBUS)
if(HAVE_DBUS)
### Konsole source files shared between embedded terminal and main application
# qdbuscpp2xml -m Session.h -o org.kde.konsole.Session.xml
# qdbuscpp2xml -M -s ViewManager.h -o org.kde.konsole.Konsole.xml
@@ -79,13 +79,13 @@ set(konsole_LIBS
KF6::NewStuffCore
)
if (NOT WIN32)
if(NOT WIN32)
list(APPEND konsole_LIBS
KF6::Pty
)
endif()
if (HAVE_DBUS)
if(HAVE_DBUS)
list(APPEND konsole_LIBS
KF6::DBusAddons
KF6::GlobalAccel
@@ -136,7 +136,7 @@ add_subdirectory(keyboardtranslator)
add_subdirectory(characters)
add_subdirectory(decoders)
add_subdirectory(plugins)
if (WIN32)
if(WIN32)
set(ptyqt_srcs ptyqt/iptyprocess.cpp ptyqt/conptyprocess.cpp)
endif()
@@ -305,18 +305,18 @@ set_target_properties(konsoleprivate PROPERTIES
install(TARGETS konsoleprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
add_library(konsoleapp SHARED Application.cpp
MainWindow.cpp
settings/ConfigurationDialog.cpp
settings/ConfigDialogButtonGroupManager.cpp
settings/TemporaryFilesSettings.cpp
settings/GeneralSettings.cpp
settings/MemorySettings.cpp
settings/ProfileSettings.cpp
settings/TabBarSettings.cpp
settings/ThumbnailsSettings.cpp
pluginsystem/IKonsolePlugin.cpp
pluginsystem/PluginManager.cpp
delegates/ProfileShortcutDelegate.cpp
MainWindow.cpp
settings/ConfigurationDialog.cpp
settings/ConfigDialogButtonGroupManager.cpp
settings/TemporaryFilesSettings.cpp
settings/GeneralSettings.cpp
settings/MemorySettings.cpp
settings/ProfileSettings.cpp
settings/TabBarSettings.cpp
settings/ThumbnailsSettings.cpp
pluginsystem/IKonsolePlugin.cpp
pluginsystem/PluginManager.cpp
delegates/ProfileShortcutDelegate.cpp
)
generate_export_header(konsoleapp BASE_NAME konsoleapp)
@@ -341,7 +341,7 @@ set_target_properties(konsoleapp PROPERTIES
install(TARGETS konsoleapp ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
set(konsole_SRCS
main.cpp
main.cpp
)
# Sets the icon on Windows and OSX

View File

@@ -7,9 +7,9 @@ set(KONSOLE_TEST_LIBS Qt::Test konsoleprivate konsolecharacters konsoledecoders)
# Temporary bypass for BKO 432379
if(BUILD_SHARED_LIBS)
ecm_add_test(KeyboardTranslatorTest.cpp LINK_LIBRARIES ${KONSOLE_TEST_LIBS})
endif(BUILD_SHARED_LIBS)
endif()
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT WIN32)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT WIN32)
ecm_add_test(
PartTest.cpp
LINK_LIBRARIES KF6::XmlGui KF6::Parts KF6::Pty ${KONSOLE_TEST_LIBS}
@@ -31,7 +31,7 @@ ecm_add_tests(
LINK_LIBRARIES ${KONSOLE_TEST_LIBS}
)
if (NOT WIN32)
if(NOT WIN32)
ecm_add_tests(
PtyTest.cpp
LINK_LIBRARIES KF6::Pty ${KONSOLE_TEST_LIBS}