diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -181,7 +181,7 @@ install(EXPORT KDevelopTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" NAMESPACE KDev:: FILE KDevelopTargets.cmake) # kdebugsettings file -install(FILES kdevelop.categories DESTINATION ${KDE_INSTALL_CONFDIR}) +install_qt_logging_categories(TYPE APP_PLUGIN) # CTestCustom.cmake has to be in the CTEST_BINARY_DIR. # in the KDE build system, this is the same as CMAKE_BINARY_DIR. diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -11,11 +11,11 @@ set(kdevelop_SRCS main.cpp kdevideextension.cpp) -ecm_qt_declare_logging_category(kdevelop_SRCS - HEADER debug.h +declare_qt_logging_category(kdevelop_SRCS IDENTIFIER APP - CATEGORY_NAME "kdevelop.app" + TYPE APP ) + qt5_add_resources(kdevelop_SRCS kdevelop.qrc) #TODO: remove CMAKE_CURRENT_SOURCE_DIR prefix when ECM is fixed diff --git a/cmake/modules/KDevelopMacrosInternal.cmake b/cmake/modules/KDevelopMacrosInternal.cmake --- a/cmake/modules/KDevelopMacrosInternal.cmake +++ b/cmake/modules/KDevelopMacrosInternal.cmake @@ -5,8 +5,10 @@ # # add_compile_flag_if_supported( [CXX_ONLY]) # add_target_compile_flag_if_supported( ) -# declare_qt_logging_category( HEADER IDENTIFIER CATEGORY_NAME EXPORT DESCRIPTION ) -# install_qt_logging_categories(EXPORT FILE ) +# declare_qt_logging_category( +# TYPE LIBRARY|PLUGIN|APP [IDENTIFIER ] [CATEGORY_BASENAME ] +# [HEADER ] [DESCRIPTION ]) +# install_qt_logging_categories(TYPE LIBRARY|APP_PLUGIN) # #============================================================================= # Copyright 2018 Friedrich W. H. Kossebau @@ -61,44 +63,47 @@ endfunction() -# declare_qt_logging_category( HEADER IDENTIFIER CATEGORY_NAME EXPORT DESCRIPTION ) +# helper method +# _declare_qt_logging_category( +# HEADER IDENTIFIER CATEGORY_NAME +# EXPORT DESCRIPTION ) # # Example: -# declare_qt_logging_category(Foo_LIB_SRCS +# _declare_qt_logging_category(Foo_LIB_SRCS # HEADER debug.h -# IDENTIFIER DOCUMENTATION +# IDENTIFIER FOO # CATEGORY_NAME "bar.foo" # DESCRIPTION "The foo of bar" # EXPORT BarCategories # ) -macro(declare_qt_logging_category _sources) +macro(_declare_qt_logging_category sources) set(options ) set(oneValueArgs HEADER IDENTIFIER CATEGORY_NAME EXPORT DESCRIPTION) set(multiValueArgs) cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT DEFINED ARGS_HEADER) - message(FATAL_ERROR "HEADER needs to be defined when calling declare_qt_logging_category().") + message(FATAL_ERROR "HEADER needs to be defined when calling _declare_qt_logging_category().") endif() if(NOT DEFINED ARGS_IDENTIFIER) - message(FATAL_ERROR "IDENTIFIER needs to be defined when calling declare_qt_logging_category().") + message(FATAL_ERROR "IDENTIFIER needs to be defined when calling _declare_qt_logging_category().") endif() if(NOT DEFINED ARGS_CATEGORY_NAME) - message(FATAL_ERROR "CATEGORY_NAME needs to be defined when calling declare_qt_logging_category().") + message(FATAL_ERROR "CATEGORY_NAME needs to be defined when calling _declare_qt_logging_category().") endif() if(NOT DEFINED ARGS_DESCRIPTION) - message(FATAL_ERROR "DESCRIPTION needs to be defined when calling declare_qt_logging_category().") + message(FATAL_ERROR "DESCRIPTION needs to be defined when calling _declare_qt_logging_category().") endif() - ecm_qt_declare_logging_category(${_sources} + ecm_qt_declare_logging_category(${sources} HEADER ${ARGS_HEADER} IDENTIFIER ${ARGS_IDENTIFIER} CATEGORY_NAME ${ARGS_CATEGORY_NAME} ) # Nasty hack: we create a target just to store all the category data in some build-system global object - # which then can be accessed from other places like install_qt_logging_categories(). + # which then can be accessed from other places like _install_qt_logging_categories(). # we also create it here on first usage, to spare some additional call. # Better idea how to solve that welcome set(_targetname "qt_logging_category_${ARGS_EXPORT}") @@ -115,28 +120,112 @@ endmacro() -# install_qt_logging_categories(EXPORT FILE ) +set(_platformlib_qt_logging_categories_export_name "KDevPlatformCategories") +set(_app_plugin_qt_logging_categories_export_name "KDevelopCategories") + + +# declare_qt_logging_category( +# TYPE LIBRARY|PLUGIN|APP [IDENTIFIER ] [CATEGORY_BASENAME ] +# [HEADER ] [DESCRIPTION ]) +# +# CATEGORY_BASENAME is unused of TYPE APP. +# IDENTIFIER defaults to upper-case CATEGORY_BASENAME . +# HEADER defaults to "debug.h" +# DESCRIPTION defaults to CATEGORY_BASENAME . +# +# Example: +# declare_qt_logging_category(Foo_LIB_SRCS +# TYPE PLUGIN +# HEADER foodebug.h +# IDENTIFIER FOO +# CATEGORY_BASENAME "foo" +# ) +macro(declare_qt_logging_category sources) + set(options ) + set(oneValueArgs HEADER IDENTIFIER CATEGORY_BASENAME DESCRIPTION TYPE) + set(multiValueArgs) + + cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(NOT DEFINED ARGS_TYPE) + message(FATAL_ERROR "TYPE needs to be defined when calling declare_qt_logging_category().") + endif() + if(NOT DEFINED ARGS_IDENTIFIER) + if(ARGS_TYPE STREQUAL "LIBRARY" OR ARGS_TYPE STREQUAL "PLUGIN") + string(TOUPPER ${ARGS_CATEGORY_BASENAME} ARGS_IDENTIFIER) + else() + message(FATAL_ERROR "IDENTIFIER needs to be defined when calling declare_qt_logging_category().") + endif() + endif() + if(NOT DEFINED ARGS_CATEGORY_BASENAME) + if(ARGS_TYPE STREQUAL "LIBRARY" OR ARGS_TYPE STREQUAL "PLUGIN") + message(FATAL_ERROR "CATEGORY_BASENAME needs to be defined when calling declare_qt_logging_category() with TYPE of LIBRARY or PLUGIN.") + endif() + endif() + if(NOT DEFINED ARGS_HEADER) + set(ARGS_HEADER debug.h) + endif() + if(NOT DEFINED ARGS_DESCRIPTION) + set(ARGS_DESCRIPTION ${ARGS_CATEGORY_BASENAME}) + endif() + + if(ARGS_TYPE STREQUAL "LIBRARY") + _declare_qt_logging_category(${sources} + HEADER ${ARGS_HEADER} + IDENTIFIER ${ARGS_IDENTIFIER} + CATEGORY_NAME "kdevplatform.${ARGS_CATEGORY_BASENAME}" + DESCRIPTION "KDevPlatform lib: ${ARGS_DESCRIPTION}" + EXPORT ${_platformlib_qt_logging_categories_export_name} + ) + elseif(ARGS_TYPE STREQUAL "PLUGIN") + _declare_qt_logging_category(${sources} + HEADER ${ARGS_HEADER} + IDENTIFIER ${ARGS_IDENTIFIER} + CATEGORY_NAME "kdevelop.plugins.${ARGS_CATEGORY_BASENAME}" + DESCRIPTION "KDevelop plugin: ${ARGS_DESCRIPTION}" + EXPORT ${_app_plugin_qt_logging_categories_export_name} + ) + elseif(ARGS_TYPE STREQUAL "APP") + _declare_qt_logging_category(${sources} + HEADER ${ARGS_HEADER} + IDENTIFIER ${ARGS_IDENTIFIER} + CATEGORY_NAME "kdevelop.app" + DESCRIPTION "KDevelop app" + EXPORT ${_app_plugin_qt_logging_categories_export_name} + ) + else() + message(FATAL_ERROR "Unknown \"${ARGS_TYPE}\" with TYPE when calling declare_qt_logging_category().") + endif() +endmacro() + + +# helper method +# _install_qt_logging_categories(EXPORT FILE MACRONAME ) # -# Needs to be called after the last declare_qt_logging_category call which uses the same EXPORT name. +# Needs to be called after the last _declare_qt_logging_category call which uses the same EXPORT name. # # Example: -# install_qt_logging_categories( +# _install_qt_logging_categories( # EXPORT KDevPlatformCategories -# FILE kdevplatform.test.categories +# FILE kdevplatform.categories # ) -function(install_qt_logging_categories) +function(_install_qt_logging_categories) set(options ) - set(oneValueArgs FILE EXPORT) + set(oneValueArgs FILE EXPORT MACRONAME) set(multiValueArgs) cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT DEFINED ARGS_FILE) - message(FATAL_ERROR "FILE needs to be defined when calling install_qt_logging_categories().") + message(FATAL_ERROR "FILE needs to be defined when calling _install_qt_logging_categories().") endif() if(NOT DEFINED ARGS_EXPORT) - message(FATAL_ERROR "EXPORT needs to be defined when calling install_qt_logging_categories().") + message(FATAL_ERROR "EXPORT needs to be defined when calling _install_qt_logging_categories().") + endif() + + if(NOT DEFINED ARGS_MACRONAME) + message(FATAL_ERROR "MACRONAME needs to be defined when calling _install_qt_logging_categories().") endif() set(_targetname "qt_logging_category_${ARGS_EXPORT}") @@ -149,7 +238,7 @@ set(_content "# KDebugSettings data file -# This file was generated by install_qt_logging_categories(). DO NOT EDIT! +# This file was generated by ${ARGS_MACRONAME}(). DO NOT EDIT! ") @@ -180,3 +269,34 @@ DESTINATION ${KDE_INSTALL_CONFDIR} ) endfunction() + +# install_qt_logging_categories(TYPE LIBRARY|APP_PLUGIN) +# +# Needs to be called after the last declare_qt_logging_category call for the same TYPE(s). +function(install_qt_logging_categories) + set(options ) + set(oneValueArgs TYPE) + set(multiValueArgs) + + cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(NOT DEFINED ARGS_TYPE) + message(FATAL_ERROR "TYPE needs to be defined when calling install_qt_logging_categories().") + endif() + + if(ARGS_TYPE STREQUAL "LIBRARY") + _install_qt_logging_categories( + EXPORT ${_platformlib_qt_logging_categories_export_name} + FILE kdevplatform.categories + MACRONAME install_qt_logging_categories + ) + elseif(ARGS_TYPE STREQUAL "APP_PLUGIN") + _install_qt_logging_categories( + EXPORT ${_app_plugin_qt_logging_categories_export_name} + FILE kdevelop.categories + MACRONAME install_qt_logging_categories + ) + else() + message(FATAL_ERROR "Unknown \"${ARGS_TYPE}\" with TYPE when calling declare_qt_logging_category().") + endif() +endfunction() diff --git a/kdevelop.categories b/kdevelop.categories deleted file mode 100644 --- a/kdevelop.categories +++ /dev/null @@ -1,61 +0,0 @@ -# KDebugSettings data file -# Format: -# lognamedescription - -# Plugins -kdevelop.plugins.android KDevelop plugin: android -kdevelop.plugins.appwizard KDevelop plugin: appwizard -kdevelop.plugins.astyle KDevelop plugin: astyle -kdevelop.plugins.clang KDevelop plugin: clang-based language support -kdevelop.plugins.clangtidy KDevelop plugin: clangtidy -kdevelop.plugins.classbrowser KDevelop plugin: classbrowser -kdevelop.plugins.clazy KDevelop plugin: clazy -kdevelop.plugins.cmake KDevelop plugin: cmake -kdevelop.plugins.cmakebuilder KDevelop plugin: cmakebuilder -kdevelop.plugins.codeutils KDevelop plugin: codeutils -kdevelop.plugins.common KDevelop plugin: debuggers common -kdevelop.plugins.contextbrowser KDevelop plugin: contextbrowser -kdevelop.plugins.cppcheck KDevelop plugin: cppcheck -kdevelop.plugins.custombuildsystem KDevelop plugin: custombuildsystem -kdevelop.plugins.custommake KDevelop plugin: custommake -kdevelop.plugins.customscript KDevelop plugin: customscript -kdevelop.plugins.cvs KDevelop plugin: cvs -kdevelop.plugins.definesandincludes KDevelop plugin: definesandincludes -kdevelop.plugins.docker KDevelop plugin: docker -kdevelop.plugins.documentswitcher KDevelop plugin: documentswitcher -kdevelop.plugins.execute KDevelop plugin: execute -kdevelop.plugins.executeplasmoid KDevelop plugin: executeplasmoid -kdevelop.plugins.executescript KDevelop plugin: executescript -kdevelop.plugins.externalscript KDevelop plugin: externalscript -kdevelop.plugins.filemanager KDevelop plugin: filemanager -kdevelop.plugins.filetemplates KDevelop plugin: filetemplates -kdevelop.plugins.flatpak KDevelop plugin: flatpak -kdevelop.plugins.gdb KDevelop plugin: gdb -kdevelop.plugins.ghprovider KDevelop plugin: githubprovider -kdevelop.plugins.git KDevelop plugin: git -kdevelop.plugins.grepview KDevelop plugin: grepview -kdevelop.plugins.heaptrack KDevelop plugin: heaptrack -kdevelop.plugins.konsole KDevelop plugin: konsole -kdevelop.plugins.lldb KDevelop plugin: lldb -kdevelop.plugins.makebuilder KDevelop plugin: makebuilder -kdevelop.plugins.ninjabuilder KDevelop plugin: ninjabuilder -kdevelop.plugins.outline KDevelop plugin: outline -kdevelop.plugins.patchreview KDevelop plugin: patchreview -kdevelop.plugins.perforce KDevelop plugin: perforce -kdevelop.plugins.problemreporter KDevelop plugin: problemreporter -kdevelop.plugins.projectfilter KDevelop plugin: projectfilter -kdevelop.plugins.projectmanagerview KDevelop plugin: projectmanagerview -kdevelop.plugins.qmake KDevelop plugin: qmake -kdevelop.plugins.qmakebuilder KDevelop plugin: qmakebuilder -kdevelop.plugins.qmljs KDevelop plugin: qmljs -kdevelop.plugins.qmljs.duchain KDevelop plugin: qmljs duchain -kdevelop.plugins.qthelp KDevelop plugin: qthelp -kdevelop.plugins.quickopen KDevelop plugin: quickopen -kdevelop.plugins.standardoutputview KDevelop plugin: standardoutputview -kdevelop.plugins.svn KDevelop plugin: svn -kdevelop.plugins.switchtobuddy KDevelop plugin: switchtobuddy -kdevelop.plugins.testview KDevelop plugin: testview -kdevelop.plugins.welcomepage KDevelop plugin: welcomepage - -# Programs -kdevelop.app KDevelop app diff --git a/kdevplatform/CMakeLists.txt b/kdevplatform/CMakeLists.txt --- a/kdevplatform/CMakeLists.txt +++ b/kdevplatform/CMakeLists.txt @@ -89,7 +89,4 @@ FILE KDevPlatformTargets.cmake ) # kdebugsettings file -install_qt_logging_categories( - EXPORT KDevPlatformCategories - FILE kdevplatform.categories -) +install_qt_logging_categories(TYPE LIBRARY) diff --git a/kdevplatform/debugger/CMakeLists.txt b/kdevplatform/debugger/CMakeLists.txt --- a/kdevplatform/debugger/CMakeLists.txt +++ b/kdevplatform/debugger/CMakeLists.txt @@ -21,11 +21,8 @@ framestack/framestackwidget.cpp ) declare_qt_logging_category(KDevPlatformDebugger_LIB_SRCS - HEADER debug.h - IDENTIFIER DEBUGGER - CATEGORY_NAME "kdevplatform.debugger" - DESCRIPTION "KDevPlatform lib: debugger" - EXPORT KDevPlatformCategories + TYPE LIBRARY + CATEGORY_BASENAME "debugger" ) kdevplatform_add_library(KDevPlatformDebugger SOURCES ${KDevPlatformDebugger_LIB_SRCS}) target_link_libraries(KDevPlatformDebugger diff --git a/kdevplatform/documentation/CMakeLists.txt b/kdevplatform/documentation/CMakeLists.txt --- a/kdevplatform/documentation/CMakeLists.txt +++ b/kdevplatform/documentation/CMakeLists.txt @@ -22,11 +22,8 @@ ) declare_qt_logging_category(KDevPlatformDocumentation_LIB_SRCS - HEADER debug.h - IDENTIFIER DOCUMENTATION - CATEGORY_NAME "kdevplatform.documentation" - DESCRIPTION "KDevPlatform lib: documentation" - EXPORT KDevPlatformCategories + TYPE LIBRARY + CATEGORY_BASENAME "documentation" ) ki18n_wrap_ui(KDevPlatformDocumentation_LIB_SRCS documentationfindwidget.ui) diff --git a/kdevplatform/language/CMakeLists.txt b/kdevplatform/language/CMakeLists.txt --- a/kdevplatform/language/CMakeLists.txt +++ b/kdevplatform/language/CMakeLists.txt @@ -171,11 +171,8 @@ ) declare_qt_logging_category(KDevPlatformLanguage_LIB_SRCS - HEADER debug.h - IDENTIFIER LANGUAGE - CATEGORY_NAME "kdevplatform.language" - DESCRIPTION "KDevPlatform lib: language" - EXPORT KDevPlatformCategories + TYPE LIBRARY + CATEGORY_BASENAME "language" ) ki18n_wrap_ui(KDevPlatformLanguage_LIB_SRCS diff --git a/kdevplatform/outputview/CMakeLists.txt b/kdevplatform/outputview/CMakeLists.txt --- a/kdevplatform/outputview/CMakeLists.txt +++ b/kdevplatform/outputview/CMakeLists.txt @@ -13,11 +13,8 @@ outputexecutejob.cpp ) declare_qt_logging_category(outputviewinterfaces_LIB_SRCS - HEADER debug.h - IDENTIFIER OUTPUTVIEW - CATEGORY_NAME "kdevplatform.outputview" - DESCRIPTION "KDevPlatform lib: outputview" - EXPORT KDevPlatformCategories + TYPE LIBRARY + CATEGORY_BASENAME "outputview" ) kdevplatform_add_library(KDevPlatformOutputView SOURCES ${outputviewinterfaces_LIB_SRCS}) target_link_libraries(KDevPlatformOutputView diff --git a/kdevplatform/project/CMakeLists.txt b/kdevplatform/project/CMakeLists.txt --- a/kdevplatform/project/CMakeLists.txt +++ b/kdevplatform/project/CMakeLists.txt @@ -23,19 +23,15 @@ ) declare_qt_logging_category(KDevPlatformProject_LIB_SRCS + TYPE LIBRARY HEADER debug_project.h - IDENTIFIER PROJECT - CATEGORY_NAME "kdevplatform.project" - DESCRIPTION "KDevPlatform lib: project" - EXPORT KDevPlatformCategories + CATEGORY_BASENAME "project" ) declare_qt_logging_category(KDevPlatformProject_LIB_SRCS + TYPE LIBRARY HEADER debug_filemanager.h - IDENTIFIER FILEMANAGER - CATEGORY_NAME "kdevplatform.filemanager" - DESCRIPTION "KDevPlatform lib: filemanager" - EXPORT KDevPlatformCategories + CATEGORY_BASENAME "filemanager" ) ki18n_wrap_ui( KDevPlatformProject_LIB_SRCS widgets/dependencieswidget.ui) diff --git a/kdevplatform/serialization/CMakeLists.txt b/kdevplatform/serialization/CMakeLists.txt --- a/kdevplatform/serialization/CMakeLists.txt +++ b/kdevplatform/serialization/CMakeLists.txt @@ -8,11 +8,8 @@ ) declare_qt_logging_category(KDevPlatformSerialization_LIB_SRCS - HEADER debug.h - IDENTIFIER SERIALIZATION - CATEGORY_NAME "kdevplatform.serialization" - DESCRIPTION "KDevPlatform lib: serialization" - EXPORT KDevPlatformCategories + TYPE LIBRARY + CATEGORY_BASENAME "serialization" ) kdevplatform_add_library(KDevPlatformSerialization SOURCES ${KDevPlatformSerialization_LIB_SRCS}) diff --git a/kdevplatform/shell/CMakeLists.txt b/kdevplatform/shell/CMakeLists.txt --- a/kdevplatform/shell/CMakeLists.txt +++ b/kdevplatform/shell/CMakeLists.txt @@ -97,11 +97,8 @@ endif() declare_qt_logging_category(KDevPlatformShell_LIB_SRCS - HEADER debug.h - IDENTIFIER SHELL - CATEGORY_NAME "kdevplatform.shell" - DESCRIPTION "KDevPlatform lib: shell" - EXPORT KDevPlatformCategories + TYPE LIBRARY + CATEGORY_BASENAME "shell" ) kconfig_add_kcfg_files(KDevPlatformShell_LIB_SRCS diff --git a/kdevplatform/sublime/CMakeLists.txt b/kdevplatform/sublime/CMakeLists.txt --- a/kdevplatform/sublime/CMakeLists.txt +++ b/kdevplatform/sublime/CMakeLists.txt @@ -29,11 +29,8 @@ idealbuttonbarwidget.cpp ) declare_qt_logging_category(sublime_LIB_SRCS - HEADER debug.h - IDENTIFIER SUBLIME - CATEGORY_NAME "kdevplatform.sublime" - DESCRIPTION "KDevPlatform lib: sublime" - EXPORT KDevPlatformCategories + TYPE LIBRARY + CATEGORY_BASENAME "sublime" ) kdevplatform_add_library(KDevPlatformSublime SOURCES ${sublime_LIB_SRCS}) target_link_libraries(KDevPlatformSublime diff --git a/kdevplatform/util/CMakeLists.txt b/kdevplatform/util/CMakeLists.txt --- a/kdevplatform/util/CMakeLists.txt +++ b/kdevplatform/util/CMakeLists.txt @@ -46,11 +46,8 @@ endif() declare_qt_logging_category(KDevPlatformUtil_LIB_SRCS - HEADER debug.h - IDENTIFIER UTIL - CATEGORY_NAME "kdevplatform.util" - DESCRIPTION "KDevPlatform lib: util" - EXPORT KDevPlatformCategories + TYPE LIBRARY + CATEGORY_BASENAME "util" ) ki18n_wrap_ui(KDevPlatformUtil_LIB_SRCS ${KDevPlatformUtil_LIB_US}) diff --git a/kdevplatform/vcs/CMakeLists.txt b/kdevplatform/vcs/CMakeLists.txt --- a/kdevplatform/vcs/CMakeLists.txt +++ b/kdevplatform/vcs/CMakeLists.txt @@ -47,11 +47,8 @@ ) declare_qt_logging_category(KDevPlatformVcs_LIB_SRCS - HEADER debug.h - IDENTIFIER VCS - CATEGORY_NAME "kdevplatform.vcs" - DESCRIPTION "KDevPlatform lib: vcs" - EXPORT KDevPlatformCategories + TYPE LIBRARY + CATEGORY_BASENAME "vcs" ) ki18n_wrap_ui(KDevPlatformVcs_LIB_SRCS ${KDevPlatformVcs_UIS}) diff --git a/plugins/android/CMakeLists.txt b/plugins/android/CMakeLists.txt --- a/plugins/android/CMakeLists.txt +++ b/plugins/android/CMakeLists.txt @@ -1,9 +1,10 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevandroid\") -ecm_qt_declare_logging_category(androidplugin_SRCS +declare_qt_logging_category(androidplugin_SRCS + TYPE PLUGIN HEADER debug_android.h IDENTIFIER ANDROID - CATEGORY_NAME "kdevelop.plugins.android" + CATEGORY_BASENAME "android" ) qt5_add_resources(androidplugin_SRCS kdevandroidplugin.qrc) ki18n_wrap_ui(androidplugin_SRCS androidpreferences.ui) diff --git a/plugins/appwizard/CMakeLists.txt b/plugins/appwizard/CMakeLists.txt --- a/plugins/appwizard/CMakeLists.txt +++ b/plugins/appwizard/CMakeLists.txt @@ -16,10 +16,10 @@ projectvcspage.ui ) -ecm_qt_declare_logging_category(kdevappwizard_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevappwizard_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_APPWIZARD - CATEGORY_NAME "kdevelop.plugins.appwizard" + CATEGORY_BASENAME "appwizard" ) ki18n_wrap_ui(kdevappwizard_PART_SRCS ${kdevappwizard_PART_UI}) diff --git a/plugins/astyle/CMakeLists.txt b/plugins/astyle/CMakeLists.txt --- a/plugins/astyle/CMakeLists.txt +++ b/plugins/astyle/CMakeLists.txt @@ -1,9 +1,9 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevastyle\") -ecm_qt_declare_logging_category(kdevastyle_LOG_SRCS - HEADER debug.h +declare_qt_logging_category(kdevastyle_LOG_SRCS + TYPE PLUGIN IDENTIFIER KDEV_ASTYLE - CATEGORY_NAME "kdevelop.plugins.astyle" + CATEGORY_BASENAME "astyle" ) set(kdevastyle_PART_SRCS diff --git a/plugins/clang/CMakeLists.txt b/plugins/clang/CMakeLists.txt --- a/plugins/clang/CMakeLists.txt +++ b/plugins/clang/CMakeLists.txt @@ -77,6 +77,18 @@ util/clangtypes.cpp util/clangutils.cpp ) +# dummy call to add the data to KDevelopCategories +# util/clangdebug.* cannot easily be generated with ecm_qt_declare_logging_category +# as the current code does not use Q_DECLARE_LOGGING_CATEGORY but instead +# has explicit code to tag KDEV_CLANG() as KDEVCLANGPRIVATE_EXPORT +# Keep in sync with util/clangdebug.* +declare_qt_logging_category(dummy_kdevclangprivate_SRCS + TYPE PLUGIN + HEADER dummy_debug.h + IDENTIFIER KDEV_CLANG + CATEGORY_BASENAME "clang" + DESCRIPTION "clang-based language support" +) include_directories( ${CMAKE_CURRENT_BINARY_DIR} diff --git a/plugins/clang/util/clangdebug.cpp b/plugins/clang/util/clangdebug.cpp --- a/plugins/clang/util/clangdebug.cpp +++ b/plugins/clang/util/clangdebug.cpp @@ -27,6 +27,7 @@ #include #include +// Keep in sync with declare_qt_logging_category call const QtMsgType defaultMsgType = QtInfoMsg; Q_LOGGING_CATEGORY(KDEV_CLANG, "kdevelop.plugins.clang", defaultMsgType) diff --git a/plugins/clangtidy/CMakeLists.txt b/plugins/clangtidy/CMakeLists.txt --- a/plugins/clangtidy/CMakeLists.txt +++ b/plugins/clangtidy/CMakeLists.txt @@ -11,10 +11,10 @@ ${Boost_INCLUDE_DIRS} ) -ecm_qt_declare_logging_category(kdevclangtidy_LOG_SRCS - HEADER debug.h +declare_qt_logging_category(kdevclangtidy_LOG_SRCS + TYPE PLUGIN IDENTIFIER KDEV_CLANGTIDY - CATEGORY_NAME "kdevelop.plugins.clangtidy" + CATEGORY_BASENAME "clangtidy" ) set(kdevclangtidy_PART_SRCS diff --git a/plugins/classbrowser/CMakeLists.txt b/plugins/classbrowser/CMakeLists.txt --- a/plugins/classbrowser/CMakeLists.txt +++ b/plugins/classbrowser/CMakeLists.txt @@ -14,10 +14,10 @@ classwidget.cpp classtree.cpp ) -ecm_qt_declare_logging_category(kdevclassbrowser_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevclassbrowser_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_CLASSBROWSER - CATEGORY_NAME "kdevelop.plugins.classbrowser" + CATEGORY_BASENAME "classbrowser" ) qt5_add_resources(kdevclassbrowser_PART_SRCS kdevclassbrowser.qrc) kdevplatform_add_plugin(kdevclassbrowser JSON kdevclassbrowser.json SOURCES ${kdevclassbrowser_PART_SRCS}) diff --git a/plugins/clazy/CMakeLists.txt b/plugins/clazy/CMakeLists.txt --- a/plugins/clazy/CMakeLists.txt +++ b/plugins/clazy/CMakeLists.txt @@ -14,10 +14,10 @@ jobparameters.cpp utils.cpp ) -ecm_qt_declare_logging_category(kdevclazy_core_SRCS - HEADER debug.h +declare_qt_logging_category(kdevclazy_core_SRCS + TYPE PLUGIN IDENTIFIER KDEV_CLAZY - CATEGORY_NAME "kdevelop.plugins.clazy" + CATEGORY_BASENAME "clazy" ) kconfig_add_kcfg_files(kdevclazy_core_SRCS GENERATE_MOC config/globalsettings.kcfgc diff --git a/plugins/cmake/CMakeLists.txt b/plugins/cmake/CMakeLists.txt --- a/plugins/cmake/CMakeLists.txt +++ b/plugins/cmake/CMakeLists.txt @@ -10,10 +10,10 @@ # the debug visitor prints out the Ast for the CMakeLists.txt file. #add_definitions( -DCMAKEDEBUGVISITOR ) -ecm_qt_declare_logging_category(cmake_LOG_SRCS - HEADER debug.h +declare_qt_logging_category(cmake_LOG_SRCS + TYPE PLUGIN IDENTIFIER CMAKE - CATEGORY_NAME "kdevelop.plugins.cmake" + CATEGORY_BASENAME "cmake" ) set( cmakecommon_SRCS diff --git a/plugins/cmakebuilder/CMakeLists.txt b/plugins/cmakebuilder/CMakeLists.txt --- a/plugins/cmakebuilder/CMakeLists.txt +++ b/plugins/cmakebuilder/CMakeLists.txt @@ -9,10 +9,10 @@ cmakebuilderpreferences.cpp ) -ecm_qt_declare_logging_category(cmakebuilder_SRCS - HEADER debug.h +declare_qt_logging_category(cmakebuilder_SRCS + TYPE PLUGIN IDENTIFIER KDEV_CMAKEBUILDER - CATEGORY_NAME "kdevelop.plugins.cmakebuilder" + CATEGORY_BASENAME "cmakebuilder" ) ki18n_wrap_ui(cmakebuilder_SRCS cmakebuilderpreferences.ui) kdevplatform_add_plugin(kdevcmakebuilder JSON kdevcmakebuilder.json SOURCES ${cmakebuilder_SRCS}) diff --git a/plugins/codeutils/CMakeLists.txt b/plugins/codeutils/CMakeLists.txt --- a/plugins/codeutils/CMakeLists.txt +++ b/plugins/codeutils/CMakeLists.txt @@ -6,10 +6,10 @@ codeutilsplugin.cpp ) -ecm_qt_declare_logging_category(kdevcodeutils_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevcodeutils_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_CODEUTILS - CATEGORY_NAME "kdevelop.plugins.codeutils" + CATEGORY_BASENAME "codeutils" ) qt5_add_resources(kdevcodeutils_PART_SRCS kdevcodeutils.qrc) kdevplatform_add_plugin(kdevcodeutils JSON kdevcodeutils.json SOURCES ${kdevcodeutils_PART_SRCS}) diff --git a/plugins/contextbrowser/CMakeLists.txt b/plugins/contextbrowser/CMakeLists.txt --- a/plugins/contextbrowser/CMakeLists.txt +++ b/plugins/contextbrowser/CMakeLists.txt @@ -8,10 +8,10 @@ browsemanager.cpp ) -ecm_qt_declare_logging_category(kdevcontextbrowser_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevcontextbrowser_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_CONTEXTBROWSER - CATEGORY_NAME "kdevelop.plugins.contextbrowser" + CATEGORY_BASENAME "contextbrowser" ) qt5_add_resources(kdevcontextbrowser_PART_SRCS kdevcontextbrowser.qrc) kdevplatform_add_plugin(kdevcontextbrowser JSON kdevcontextbrowser.json SOURCES ${kdevcontextbrowser_PART_SRCS}) diff --git a/plugins/cppcheck/CMakeLists.txt b/plugins/cppcheck/CMakeLists.txt --- a/plugins/cppcheck/CMakeLists.txt +++ b/plugins/cppcheck/CMakeLists.txt @@ -14,10 +14,10 @@ parameters.cpp utils.cpp ) -ecm_qt_declare_logging_category(kdevcppcheck_core_SRCS - HEADER debug.h +declare_qt_logging_category(kdevcppcheck_core_SRCS + TYPE PLUGIN IDENTIFIER KDEV_CPPCHECK - CATEGORY_NAME "kdevelop.plugins.cppcheck" + CATEGORY_BASENAME "cppcheck" ) kconfig_add_kcfg_files(kdevcppcheck_core_SRCS config/globalsettings.kcfgc diff --git a/plugins/custom-buildsystem/CMakeLists.txt b/plugins/custom-buildsystem/CMakeLists.txt --- a/plugins/custom-buildsystem/CMakeLists.txt +++ b/plugins/custom-buildsystem/CMakeLists.txt @@ -1,9 +1,9 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevcustombuildsystem\") -ecm_qt_declare_logging_category(custom_LOG_SRCS - HEADER debug.h +declare_qt_logging_category(custom_LOG_SRCS + TYPE PLUGIN IDENTIFIER CUSTOMBUILDSYSTEM - CATEGORY_NAME "kdevelop.plugins.custombuildsystem" + CATEGORY_BASENAME "custombuildsystem" ) ## KDevelop Plugin set(custom_SRCS diff --git a/plugins/custom-definesandincludes/CMakeLists.txt b/plugins/custom-definesandincludes/CMakeLists.txt --- a/plugins/custom-definesandincludes/CMakeLists.txt +++ b/plugins/custom-definesandincludes/CMakeLists.txt @@ -1,9 +1,9 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevcustomdefinesandincludes\") -ecm_qt_declare_logging_category(kdevdefinesandincludesmanager_LOG_SRCS - HEADER debug.h +declare_qt_logging_category(kdevdefinesandincludesmanager_LOG_SRCS + TYPE PLUGIN IDENTIFIER DEFINESANDINCLUDES - CATEGORY_NAME "kdevelop.plugins.definesandincludes" + CATEGORY_BASENAME "definesandincludes" ) if(BUILD_TESTING) diff --git a/plugins/custommake/CMakeLists.txt b/plugins/custommake/CMakeLists.txt --- a/plugins/custommake/CMakeLists.txt +++ b/plugins/custommake/CMakeLists.txt @@ -5,10 +5,10 @@ custommakemodelitems.cpp ) -ecm_qt_declare_logging_category(kdevcustommakemanager_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevcustommakemanager_PART_SRCS + TYPE PLUGIN IDENTIFIER CUSTOMMAKE - CATEGORY_NAME "kdevelop.plugins.custommake" + CATEGORY_BASENAME "custommake" ) qt5_add_resources(kdevcustommakemanager_PART_SRCS kdevcustommakemanager.qrc) kdevplatform_add_plugin(kdevcustommakemanager JSON kdevcustommakemanager.json SOURCES ${kdevcustommakemanager_PART_SRCS}) diff --git a/plugins/customscript/CMakeLists.txt b/plugins/customscript/CMakeLists.txt --- a/plugins/customscript/CMakeLists.txt +++ b/plugins/customscript/CMakeLists.txt @@ -3,10 +3,10 @@ customscript_plugin.cpp ) -ecm_qt_declare_logging_category(kdevcustomscript_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevcustomscript_PART_SRCS + TYPE PLUGIN IDENTIFIER CUSTOMSCRIPT - CATEGORY_NAME "kdevelop.plugins.customscript" + CATEGORY_BASENAME "customscript" ) kdevplatform_add_plugin(kdevcustomscript JSON kdevcustomscript.json SOURCES ${kdevcustomscript_PART_SRCS}) target_link_libraries(kdevcustomscript diff --git a/plugins/cvs/CMakeLists.txt b/plugins/cvs/CMakeLists.txt --- a/plugins/cvs/CMakeLists.txt +++ b/plugins/cvs/CMakeLists.txt @@ -2,10 +2,10 @@ ########### next target ############### -ecm_qt_declare_logging_category(kdevcvs_LOG_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevcvs_LOG_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_CVS - CATEGORY_NAME "kdevelop.plugins.cvs" + CATEGORY_BASENAME "cvs" ) set(kdevcvs_PART_SRCS diff --git a/plugins/debuggercommon/CMakeLists.txt b/plugins/debuggercommon/CMakeLists.txt --- a/plugins/debuggercommon/CMakeLists.txt +++ b/plugins/debuggercommon/CMakeLists.txt @@ -37,10 +37,12 @@ ) endif() -ecm_qt_declare_logging_category(debuggercommon_SRCS +declare_qt_logging_category(debuggercommon_SRCS + TYPE PLUGIN HEADER debuglog.h IDENTIFIER DEBUGGERCOMMON - CATEGORY_NAME "kdevelop.plugins.common" + CATEGORY_BASENAME "common" + DESCRIPTION "debuggers common" ) ki18n_wrap_ui(debuggercommon_SRCS diff --git a/plugins/docker/CMakeLists.txt b/plugins/docker/CMakeLists.txt --- a/plugins/docker/CMakeLists.txt +++ b/plugins/docker/CMakeLists.txt @@ -6,10 +6,11 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevdocker\") -ecm_qt_declare_logging_category(dockerplugin_SRCS +declare_qt_logging_category(dockerplugin_SRCS + TYPE PLUGIN HEADER debug_docker.h IDENTIFIER DOCKER - CATEGORY_NAME "kdevelop.plugins.docker" + CATEGORY_BASENAME "docker" ) qt5_add_resources(dockerplugin_SRCS kdevdockerplugin.qrc) ki18n_wrap_ui(dockerplugin_SRCS dockerpreferences.ui) diff --git a/plugins/documentswitcher/CMakeLists.txt b/plugins/documentswitcher/CMakeLists.txt --- a/plugins/documentswitcher/CMakeLists.txt +++ b/plugins/documentswitcher/CMakeLists.txt @@ -7,10 +7,10 @@ documentswitchertreeview.cpp ) -ecm_qt_declare_logging_category(kdevdocumentswitcher_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevdocumentswitcher_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_DOCUMENTSWITCHER - CATEGORY_NAME "kdevelop.plugins.documentswitcher" + CATEGORY_BASENAME "documentswitcher" ) qt5_add_resources(kdevdocumentswitcher_PART_SRCS kdevdocumentswitcher.qrc) diff --git a/plugins/execute/CMakeLists.txt b/plugins/execute/CMakeLists.txt --- a/plugins/execute/CMakeLists.txt +++ b/plugins/execute/CMakeLists.txt @@ -9,10 +9,10 @@ nativeappjob.cpp ) -ecm_qt_declare_logging_category(kdevexecute_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevexecute_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_EXECUTE - CATEGORY_NAME "kdevelop.plugins.execute" + CATEGORY_BASENAME "execute" ) ki18n_wrap_ui( kdevexecute_PART_SRCS nativeappconfig.ui) diff --git a/plugins/executeplasmoid/CMakeLists.txt b/plugins/executeplasmoid/CMakeLists.txt --- a/plugins/executeplasmoid/CMakeLists.txt +++ b/plugins/executeplasmoid/CMakeLists.txt @@ -5,10 +5,10 @@ plasmoidexecutionconfig.cpp plasmoidexecutionjob.cpp ) -ecm_qt_declare_logging_category(kdevexecuteplasmoid_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevexecuteplasmoid_PART_SRCS + TYPE PLUGIN IDENTIFIER EXECUTEPLASMOID - CATEGORY_NAME "kdevelop.plugins.executeplasmoid" + CATEGORY_BASENAME "executeplasmoid" ) ki18n_wrap_ui(kdevexecuteplasmoid_PART_SRCS plasmoidexecutionconfig.ui diff --git a/plugins/executescript/CMakeLists.txt b/plugins/executescript/CMakeLists.txt --- a/plugins/executescript/CMakeLists.txt +++ b/plugins/executescript/CMakeLists.txt @@ -5,10 +5,10 @@ scriptappconfig.cpp scriptappjob.cpp ) -ecm_qt_declare_logging_category(kdevexecutescript_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevexecutescript_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_EXECUTESCRIPT - CATEGORY_NAME "kdevelop.plugins.executescript" + CATEGORY_BASENAME "executescript" ) ki18n_wrap_ui(kdevexecutescript_PART_SRCS scriptappconfig.ui diff --git a/plugins/externalscript/CMakeLists.txt b/plugins/externalscript/CMakeLists.txt --- a/plugins/externalscript/CMakeLists.txt +++ b/plugins/externalscript/CMakeLists.txt @@ -9,10 +9,10 @@ editexternalscript.cpp ) -ecm_qt_declare_logging_category(kdevexternalscript_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevexternalscript_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_EXTERNALSCRIPT - CATEGORY_NAME "kdevelop.plugins.externalscript" + CATEGORY_BASENAME "externalscript" ) set(kdevexternalscript_PART_UI diff --git a/plugins/filemanager/CMakeLists.txt b/plugins/filemanager/CMakeLists.txt --- a/plugins/filemanager/CMakeLists.txt +++ b/plugins/filemanager/CMakeLists.txt @@ -5,10 +5,10 @@ filemanager.cpp bookmarkhandler.cpp ) -ecm_qt_declare_logging_category(kdevfilemanager_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevfilemanager_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_FILEMANAGER - CATEGORY_NAME "kdevelop.plugins.filemanager" + CATEGORY_BASENAME "filemanager" ) qt5_add_resources(kdevfilemanager_PART_SRCS kdevfilemanager.qrc) kdevplatform_add_plugin(kdevfilemanager JSON kdevfilemanager.json SOURCES ${kdevfilemanager_PART_SRCS}) diff --git a/plugins/filetemplates/CMakeLists.txt b/plugins/filetemplates/CMakeLists.txt --- a/plugins/filetemplates/CMakeLists.txt +++ b/plugins/filetemplates/CMakeLists.txt @@ -17,10 +17,10 @@ testcasespage.cpp ) -ecm_qt_declare_logging_category(kdevfiletemplates_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevfiletemplates_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_FILETEMPLATES - CATEGORY_NAME "kdevelop.plugins.filetemplates" + CATEGORY_BASENAME "filetemplates" ) ki18n_wrap_ui(kdevfiletemplates_PART_SRCS diff --git a/plugins/flatpak/CMakeLists.txt b/plugins/flatpak/CMakeLists.txt --- a/plugins/flatpak/CMakeLists.txt +++ b/plugins/flatpak/CMakeLists.txt @@ -2,10 +2,11 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevflatpak\") -ecm_qt_declare_logging_category(flatpakplugin_SRCS +declare_qt_logging_category(flatpakplugin_SRCS + TYPE PLUGIN HEADER debug_flatpak.h IDENTIFIER FLATPAK - CATEGORY_NAME "kdevelop.plugins.flatpak" + CATEGORY_BASENAME "flatpak" ) qt5_add_resources(flatpakplugin_SRCS kdevflatpakplugin.qrc) diff --git a/plugins/gdb/CMakeLists.txt b/plugins/gdb/CMakeLists.txt --- a/plugins/gdb/CMakeLists.txt +++ b/plugins/gdb/CMakeLists.txt @@ -26,10 +26,11 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config-gdb-plugin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-gdb-plugin.h ) -ecm_qt_declare_logging_category(kdevgdb_SRCS +declare_qt_logging_category(kdevgdb_SRCS + TYPE PLUGIN HEADER debuglog.h IDENTIFIER DEBUGGERGDB - CATEGORY_NAME "kdevelop.plugins.gdb" + CATEGORY_BASENAME "gdb" ) set(kdevgdb_UI debuggertracingdialog.ui diff --git a/plugins/ghprovider/CMakeLists.txt b/plugins/ghprovider/CMakeLists.txt --- a/plugins/ghprovider/CMakeLists.txt +++ b/plugins/ghprovider/CMakeLists.txt @@ -11,10 +11,11 @@ ghaccount.cpp ghdialog.cpp ) -ecm_qt_declare_logging_category(kdevghprovider_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevghprovider_PART_SRCS + TYPE PLUGIN IDENTIFIER GHPROVIDER - CATEGORY_NAME "kdevelop.plugins.ghprovider" + CATEGORY_BASENAME "ghprovider" + DESCRIPTION "githubprovider" ) kdevplatform_add_plugin(kdevghprovider JSON kdevghprovider.json SOURCES ${kdevghprovider_PART_SRCS}) diff --git a/plugins/git/CMakeLists.txt b/plugins/git/CMakeLists.txt --- a/plugins/git/CMakeLists.txt +++ b/plugins/git/CMakeLists.txt @@ -1,9 +1,9 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevgit\") -ecm_qt_declare_logging_category(kdevgit_LOG_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevgit_LOG_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_GIT - CATEGORY_NAME "kdevelop.plugins.git" + CATEGORY_BASENAME "git" ) set(kdevgit_PART_SRCS stashmanagerdialog.cpp diff --git a/plugins/grepview/CMakeLists.txt b/plugins/grepview/CMakeLists.txt --- a/plugins/grepview/CMakeLists.txt +++ b/plugins/grepview/CMakeLists.txt @@ -2,10 +2,10 @@ ########### next target ############### -ecm_qt_declare_logging_category(kdevgrepview_LOG_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevgrepview_LOG_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_GREPVIEW - CATEGORY_NAME "kdevelop.plugins.grepview" + CATEGORY_BASENAME "grepview" ) set(kdevgrepview_PART_SRCS diff --git a/plugins/heaptrack/CMakeLists.txt b/plugins/heaptrack/CMakeLists.txt --- a/plugins/heaptrack/CMakeLists.txt +++ b/plugins/heaptrack/CMakeLists.txt @@ -23,10 +23,10 @@ config/globalconfigpage.cpp ) -ecm_qt_declare_logging_category(kdevheaptrack_SRCS - HEADER debug.h +declare_qt_logging_category(kdevheaptrack_SRCS + TYPE PLUGIN IDENTIFIER KDEV_HEAPTRACK - CATEGORY_NAME "kdevelop.plugins.heaptrack" + CATEGORY_BASENAME "heaptrack" ) ki18n_wrap_ui(kdevheaptrack_SRCS config/globalconfigpage.ui diff --git a/plugins/konsole/CMakeLists.txt b/plugins/konsole/CMakeLists.txt --- a/plugins/konsole/CMakeLists.txt +++ b/plugins/konsole/CMakeLists.txt @@ -6,10 +6,10 @@ kdevkonsoleview.cpp ) -ecm_qt_declare_logging_category(kdevkonsoleview_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevkonsoleview_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_KONSOLE - CATEGORY_NAME "kdevelop.plugins.konsole" + CATEGORY_BASENAME "konsole" ) kdevplatform_add_plugin(kdevkonsoleview JSON kdevkonsoleview.json SOURCES ${kdevkonsoleview_PART_SRCS}) target_link_libraries(kdevkonsoleview KF5::Parts KDev::Interfaces KDev::Util) diff --git a/plugins/lldb/CMakeLists.txt b/plugins/lldb/CMakeLists.txt --- a/plugins/lldb/CMakeLists.txt +++ b/plugins/lldb/CMakeLists.txt @@ -12,10 +12,11 @@ lldblauncher.cpp ) -ecm_qt_declare_logging_category(kdevlldb_SRCS +declare_qt_logging_category(kdevlldb_SRCS + TYPE PLUGIN HEADER debuglog.h IDENTIFIER DEBUGGERLLDB - CATEGORY_NAME "kdevelop.plugins.lldb" + CATEGORY_BASENAME "lldb" ) set(kdevlldb_UI diff --git a/plugins/makebuilder/CMakeLists.txt b/plugins/makebuilder/CMakeLists.txt --- a/plugins/makebuilder/CMakeLists.txt +++ b/plugins/makebuilder/CMakeLists.txt @@ -7,10 +7,10 @@ makejob.cpp makebuilderpreferences.cpp ) -ecm_qt_declare_logging_category(kdevmakebuilder_SRCS - HEADER debug.h +declare_qt_logging_category(kdevmakebuilder_SRCS + TYPE PLUGIN IDENTIFIER KDEV_MAKEBUILDER - CATEGORY_NAME "kdevelop.plugins.makebuilder" + CATEGORY_BASENAME "makebuilder" ) ki18n_wrap_ui(kdevmakebuilder_SRCS makeconfig.ui) kconfig_add_kcfg_files( kdevmakebuilder_SRCS makebuilderconfig.kcfgc ) diff --git a/plugins/ninjabuilder/CMakeLists.txt b/plugins/ninjabuilder/CMakeLists.txt --- a/plugins/ninjabuilder/CMakeLists.txt +++ b/plugins/ninjabuilder/CMakeLists.txt @@ -1,9 +1,9 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevninja\") set(kdevninja_SRCS ninjajob.cpp ninjabuilder.cpp ninjabuilderpreferences.cpp) -ecm_qt_declare_logging_category(kdevninja_SRCS - HEADER debug.h +declare_qt_logging_category(kdevninja_SRCS + TYPE PLUGIN IDENTIFIER NINJABUILDER - CATEGORY_NAME "kdevelop.plugins.ninjabuilder" + CATEGORY_BASENAME "ninjabuilder" ) ki18n_wrap_ui(kdevninja_SRCS ninjaconfig.ui) kconfig_add_kcfg_files(kdevninja_SRCS ninjabuilderconfig.kcfgc) diff --git a/plugins/outlineview/CMakeLists.txt b/plugins/outlineview/CMakeLists.txt --- a/plugins/outlineview/CMakeLists.txt +++ b/plugins/outlineview/CMakeLists.txt @@ -7,10 +7,10 @@ outlinewidget.cpp ) -ecm_qt_declare_logging_category(kdevoutlineview_SRCS - HEADER debug.h +declare_qt_logging_category(kdevoutlineview_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_OUTLINE - CATEGORY_NAME "kdevelop.plugins.outline" + CATEGORY_BASENAME "outline" ) kdevplatform_add_plugin(kdevoutlineview JSON kdevoutlineview.json SOURCES ${kdevoutlineview_SRCS}) target_link_libraries(kdevoutlineview diff --git a/plugins/patchreview/CMakeLists.txt b/plugins/patchreview/CMakeLists.txt --- a/plugins/patchreview/CMakeLists.txt +++ b/plugins/patchreview/CMakeLists.txt @@ -32,10 +32,10 @@ localpatchsource.cpp ) -ecm_qt_declare_logging_category(patchreview_PART_SRCS - HEADER debug.h +declare_qt_logging_category(patchreview_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_PATCHREVIEW - CATEGORY_NAME "kdevelop.plugins.patchreview" + CATEGORY_BASENAME "patchreview" ) ki18n_wrap_ui(patchreview_PART_SRCS patchreview.ui localpatchwidget.ui) diff --git a/plugins/perforce/CMakeLists.txt b/plugins/perforce/CMakeLists.txt --- a/plugins/perforce/CMakeLists.txt +++ b/plugins/perforce/CMakeLists.txt @@ -6,10 +6,10 @@ ) add_subdirectory(p4clientstub) -ecm_qt_declare_logging_category(kdevperforce_LOG_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevperforce_LOG_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_PERFORCE - CATEGORY_NAME "kdevelop.plugins.perforce" + CATEGORY_BASENAME "perforce" ) set(kdevperforce_UIS ui/perforceimportmetadatawidget.ui diff --git a/plugins/problemreporter/CMakeLists.txt b/plugins/problemreporter/CMakeLists.txt --- a/plugins/problemreporter/CMakeLists.txt +++ b/plugins/problemreporter/CMakeLists.txt @@ -11,10 +11,10 @@ problemreportermodel.cpp ) -ecm_qt_declare_logging_category(kdevproblemreporter_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevproblemreporter_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_PROBLEMREPORTER - CATEGORY_NAME "kdevelop.plugins.problemreporter" + CATEGORY_BASENAME "problemreporter" ) qt5_add_resources(kdevproblemreporter_PART_SRCS kdevproblemreporter.qrc) kdevplatform_add_plugin(kdevproblemreporter JSON kdevproblemreporter.json SOURCES ${kdevproblemreporter_PART_SRCS}) diff --git a/plugins/projectfilter/CMakeLists.txt b/plugins/projectfilter/CMakeLists.txt --- a/plugins/projectfilter/CMakeLists.txt +++ b/plugins/projectfilter/CMakeLists.txt @@ -13,10 +13,10 @@ comboboxdelegate.cpp ) -ecm_qt_declare_logging_category(projectfilter_SRCS - HEADER debug.h +declare_qt_logging_category(projectfilter_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_PROJECTFILTER - CATEGORY_NAME "kdevelop.plugins.projectfilter" + CATEGORY_BASENAME "projectfilter" ) ki18n_wrap_ui(projectfilter_SRCS projectfiltersettings.ui) kconfig_add_kcfg_files(projectfilter_SRCS projectfiltersettings.kcfgc) diff --git a/plugins/projectmanagerview/CMakeLists.txt b/plugins/projectmanagerview/CMakeLists.txt --- a/plugins/projectmanagerview/CMakeLists.txt +++ b/plugins/projectmanagerview/CMakeLists.txt @@ -12,10 +12,10 @@ cutcopypastehelpers.cpp ) -ecm_qt_declare_logging_category(kdevprojectmanagerview_PLUGIN_SRCS - HEADER debug.h +declare_qt_logging_category(kdevprojectmanagerview_PLUGIN_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_PROJECTMANAGERVIEW - CATEGORY_NAME "kdevelop.plugins.projectmanagerview" + CATEGORY_BASENAME "projectmanagerview" ) ki18n_wrap_ui( kdevprojectmanagerview_PLUGIN_SRCS projectbuildsetwidget.ui projectmanagerview.ui ) diff --git a/plugins/qmakebuilder/CMakeLists.txt b/plugins/qmakebuilder/CMakeLists.txt --- a/plugins/qmakebuilder/CMakeLists.txt +++ b/plugins/qmakebuilder/CMakeLists.txt @@ -5,10 +5,10 @@ qmakebuilderpreferences.cpp qmakejob.cpp ) -ecm_qt_declare_logging_category(qmakebuilder_SRCS - HEADER debug.h +declare_qt_logging_category(qmakebuilder_SRCS + TYPE PLUGIN IDENTIFIER KDEV_QMAKEBUILDER - CATEGORY_NAME "kdevelop.plugins.qmakebuilder" + CATEGORY_BASENAME "qmakebuilder" ) ki18n_wrap_ui(qmakebuilder_SRCS qmakeconfig.ui) kconfig_add_kcfg_files(qmakebuilder_SRCS qmakebuilderconfig.kcfgc) diff --git a/plugins/qmakemanager/CMakeLists.txt b/plugins/qmakemanager/CMakeLists.txt --- a/plugins/qmakemanager/CMakeLists.txt +++ b/plugins/qmakemanager/CMakeLists.txt @@ -1,9 +1,9 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevqmakemanager\") -ecm_qt_declare_logging_category(qmakecommon_LOG_SRCS - HEADER debug.h +declare_qt_logging_category(qmakecommon_LOG_SRCS + TYPE PLUGIN IDENTIFIER KDEV_QMAKE - CATEGORY_NAME "kdevelop.plugins.qmake" + CATEGORY_BASENAME "qmake" ) add_subdirectory(parser) diff --git a/plugins/qmljs/CMakeLists.txt b/plugins/qmljs/CMakeLists.txt --- a/plugins/qmljs/CMakeLists.txt +++ b/plugins/qmljs/CMakeLists.txt @@ -6,10 +6,10 @@ endif() add_subdirectory(codecompletion) -ecm_qt_declare_logging_category(kdevqmljslanguagesupport_LOG_SRCS - HEADER debug.h +declare_qt_logging_category(kdevqmljslanguagesupport_LOG_SRCS + TYPE PLUGIN IDENTIFIER KDEV_QMLJS - CATEGORY_NAME "kdevelop.plugins.qmljs" + CATEGORY_BASENAME "qmljs" ) kdevplatform_add_plugin(kdevqmljslanguagesupport JSON kdevqmljs.json SOURCES qmljsparsejob.cpp diff --git a/plugins/qmljs/duchain/CMakeLists.txt b/plugins/qmljs/duchain/CMakeLists.txt --- a/plugins/qmljs/duchain/CMakeLists.txt +++ b/plugins/qmljs/duchain/CMakeLists.txt @@ -1,7 +1,8 @@ -ecm_qt_declare_logging_category(kdevqmljsduchain_LOG_SRCS - HEADER debug.h +declare_qt_logging_category(kdevqmljsduchain_LOG_SRCS + TYPE PLUGIN IDENTIFIER KDEV_QMLJS_DUCHAIN - CATEGORY_NAME "kdevelop.plugins.qmljs.duchain" + CATEGORY_BASENAME "qmljs.duchain" + DESCRIPTION "qmljs duchain" ) add_library(kdevqmljsduchain STATIC ${kdevqmljsduchain_LOG_SRCS} diff --git a/plugins/qthelp/CMakeLists.txt b/plugins/qthelp/CMakeLists.txt --- a/plugins/qthelp/CMakeLists.txt +++ b/plugins/qthelp/CMakeLists.txt @@ -1,9 +1,9 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevqthelp\") -ecm_qt_declare_logging_category(kdevqthelp_LOG_SRCS - HEADER debug.h +declare_qt_logging_category(kdevqthelp_LOG_SRCS + TYPE PLUGIN IDENTIFIER QTHELP - CATEGORY_NAME "kdevelop.plugins.qthelp" + CATEGORY_BASENAME "qthelp" ) set(kdevqthelp_SRCS qthelpplugin.cpp diff --git a/plugins/quickopen/CMakeLists.txt b/plugins/quickopen/CMakeLists.txt --- a/plugins/quickopen/CMakeLists.txt +++ b/plugins/quickopen/CMakeLists.txt @@ -17,10 +17,10 @@ expandingtree/expandingtree.cpp expandingtree/expandingwidgetmodel.cpp ) -ecm_qt_declare_logging_category(kdevquickopen_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevquickopen_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_QUICKOPEN - CATEGORY_NAME "kdevelop.plugins.quickopen" + CATEGORY_BASENAME "quickopen" ) ki18n_wrap_ui(kdevquickopen_PART_SRCS quickopenwidget.ui diff --git a/plugins/standardoutputview/CMakeLists.txt b/plugins/standardoutputview/CMakeLists.txt --- a/plugins/standardoutputview/CMakeLists.txt +++ b/plugins/standardoutputview/CMakeLists.txt @@ -2,10 +2,10 @@ ########### next target ############### -ecm_qt_declare_logging_category(standardoutputview_LOG_PART_SRCS - HEADER debug.h +declare_qt_logging_category(standardoutputview_LOG_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_STANDARDOUTPUTVIEW - CATEGORY_NAME "kdevelop.plugins.standardoutputview" + CATEGORY_BASENAME "standardoutputview" ) set(standardoutputview_LIB_SRCS diff --git a/plugins/subversion/CMakeLists.txt b/plugins/subversion/CMakeLists.txt --- a/plugins/subversion/CMakeLists.txt +++ b/plugins/subversion/CMakeLists.txt @@ -40,10 +40,10 @@ svnlocationwidget.cpp ) -ecm_qt_declare_logging_category(kdevsubversion_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevsubversion_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_SVN - CATEGORY_NAME "kdevelop.plugins.svn" + CATEGORY_BASENAME "svn" ) set(kdevsubversion_PART_UI diff --git a/plugins/switchtobuddy/CMakeLists.txt b/plugins/switchtobuddy/CMakeLists.txt --- a/plugins/switchtobuddy/CMakeLists.txt +++ b/plugins/switchtobuddy/CMakeLists.txt @@ -6,10 +6,10 @@ switchtobuddyplugin.cpp ) -ecm_qt_declare_logging_category(kdevswitchtobuddy_PART_SRCS - HEADER debug.h +declare_qt_logging_category(kdevswitchtobuddy_PART_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_SWITCHTOBUDDY - CATEGORY_NAME "kdevelop.plugins.switchtobuddy" + CATEGORY_BASENAME "switchtobuddy" ) qt5_add_resources(kdevswitchtobuddy_PART_SRCS kdevswitchtobuddy.qrc) kdevplatform_add_plugin(kdevswitchtobuddy JSON kdevswitchtobuddy.json SOURCES ${kdevswitchtobuddy_PART_SRCS}) diff --git a/plugins/testview/CMakeLists.txt b/plugins/testview/CMakeLists.txt --- a/plugins/testview/CMakeLists.txt +++ b/plugins/testview/CMakeLists.txt @@ -6,10 +6,10 @@ testviewplugin.cpp ) -ecm_qt_declare_logging_category(kdevtestview_PLUGIN_SRCS - HEADER debug.h +declare_qt_logging_category(kdevtestview_PLUGIN_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_TESTVIEW - CATEGORY_NAME "kdevelop.plugins.testview" + CATEGORY_BASENAME "testview" ) qt5_add_resources(kdevtestview_PLUGIN_SRCS kdevtestview.qrc) kdevplatform_add_plugin(kdevtestview JSON kdevtestview.json SOURCES ${kdevtestview_PLUGIN_SRCS}) diff --git a/plugins/welcomepage/CMakeLists.txt b/plugins/welcomepage/CMakeLists.txt --- a/plugins/welcomepage/CMakeLists.txt +++ b/plugins/welcomepage/CMakeLists.txt @@ -8,10 +8,10 @@ uihelper.cpp ) qt5_add_resources(welcomepage_SRCS welcomepage.qrc) -ecm_qt_declare_logging_category(welcomepage_SRCS - HEADER debug.h +declare_qt_logging_category(welcomepage_SRCS + TYPE PLUGIN IDENTIFIER PLUGIN_WELCOMEPAGE - CATEGORY_NAME "kdevelop.plugins.welcomepage" + CATEGORY_BASENAME "welcomepage" ) kdevplatform_add_plugin(kdevwelcomepage JSON kdevwelcomepage.json SOURCES ${welcomepage_SRCS})