D15977: Generate kdebugsettings .categories file automatically
Kevin Funk
noreply at phabricator.kde.org
Sun Oct 7 13:12:48 BST 2018
kfunk accepted this revision.
kfunk added a comment.
This revision is now accepted and ready to land.
Looks good to me in general, feel free to push to master.
INLINE COMMENTS
> KDevelopMacrosInternal.cmake:101
> + if (NOT TARGET ${ARGS_EXPORT})
> + add_custom_target(${ARGS_EXPORT})
> + set(_categories ${ARGS_CATEGORY_NAME})
Would be careful with the custom target name, could easily create a name conflict.
Maybe prefixed the target name with `qt_logging_category_` or sth?
set(_target "qt_logging_category_${ARGS_EXPORT}"
...
> KDevelopMacrosInternal.cmake:120
> +# )
> +function(install_logging_categories)
> + set(options )
Naming consistency: `install_qt_logging_categories`
> KDevelopMacrosInternal.cmake:141
> +
> + set(_content "# KDebugSettings data file\n# This file was generated by install_logging_categories(). DO NOT EDIT!\n")
> +
Minor: You can split strings across multiple lines in CMake: https://stackoverflow.com/a/27983206/592636
> KDevelopMacrosInternal.cmake:147
> + # Format:
> + # logname<space>description
> + string(APPEND _content "${_category} ${_description}\n")
Looks like the KDebugSettings format was extended a little bit, in the meantime?
https://lxr.kde.org/source/kde/kdeutils/kdebugsettings/data/kde.categories
Is there something we can use as well? (Doesn't need to part of this patch, though)
> debug.h:26
>
> #endif
Note for future commit: Should probably just kill that header and use the includes directly?
REPOSITORY
R32 KDevelop
BRANCH
generatecategoriesfile
REVISION DETAIL
https://phabricator.kde.org/D15977
To: kossebau, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181007/86d0d087/attachment-0001.html>
More information about the KDevelop-devel
mailing list