D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-28 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  In D27150#619735 , @bruns wrote:
  
  > You have ommited to update the minimum ECM version in all cases AFAICS.
  
  
  Because that bump is done by the release scripts, and I did not want to mess 
with them.
  
  In general it is expected that all of ECM & KF master depends on latest 
master of their peers. The dep version is only bumped in time for release 
preparation.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: bruns, kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, 
bencreasy, michaelh, ngraham


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-28 Thread Stefan BrĂ¼ns
bruns added a comment.


  @kossebau - you have pushed commits depending on this change to several 
repositories, sometimes without waiting for acceptance, sometimes even 
bypassing Phabricator review completely.
  
  You have ommited to update the minimum ECM version in all cases AFAICS.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: bruns, kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, 
bencreasy, michaelh, ngraham


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-10 Thread Friedrich W. H. Kossebau
This revision was automatically updated to reflect the committed changes.
Closed by commit R240:86041b6d8634: Add ecm_qt_install_logging_categories  
ecm_qt_export_logging_category (authored by kossebau).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D27150?vs=75312=75421#toc

REPOSITORY
  R240 Extra CMake Modules

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27150?vs=75312=75421

REVISION DETAIL
  https://phabricator.kde.org/D27150

AFFECTED FILES
  modules/ECMQtDeclareLoggingCategory.cmake
  tests/ECMQtDeclareLoggingCategoryTest/CMakeLists.txt
  tests/ECMQtDeclareLoggingCategoryTest/log.categories
  tests/ECMQtDeclareLoggingCategoryTest/log.renamecategories

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-09 Thread Friedrich W. H. Kossebau
kossebau added a dependent revision: D27270: Use 
ecm_qt_install_logging_categories over manual categories files.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-09 Thread Friedrich W. H. Kossebau
kossebau added a dependent revision: D27269: Use 
ecm_qt_install_logging_categories over manual categories file.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-09 Thread Friedrich W. H. Kossebau
kossebau updated this revision to Diff 75312.
kossebau added a comment.


  Add support for also generating renamecategories files

REPOSITORY
  R240 Extra CMake Modules

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27150?vs=75069=75312

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

AFFECTED FILES
  modules/ECMQtDeclareLoggingCategory.cmake
  tests/ECMQtDeclareLoggingCategoryTest/CMakeLists.txt
  tests/ECMQtDeclareLoggingCategoryTest/log.categories
  tests/ECMQtDeclareLoggingCategoryTest/log.renamecategories

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-09 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  In D27150#608492 , @mlaurent wrote:
  
  > In D27150#608491 , @kossebau 
wrote:
  >
  > > In D27150#608318 , @mlaurent 
wrote:
  > >
  > > > Yep you need to create a file name "foo.renamecategories" where you 
change the categorie name
  > > >
  > > > 1. old module namenew module name
  > > >
  > > >   for example "log_mailfilteragent org.kde.pim.mailfilteragent" in kmail
  > >
  > >
  > > Does kdebugsettings also support multiple renames? Like log1 > log2 > 
log3?
  >
  >
  > Perhaps :) I will test it next week
  
  
  Would be good if it does, as I just found two candidates :) kcontacts & 
kcalendarcore now that they have moved to KF ideally would get rid of the "pim" 
subelement (and kcalcore renamed to kcalendarcore)
  
  Preparing the new macros to support that now (already had first working draft 
only supporting one rename).

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-09 Thread Laurent Montel
mlaurent added a comment.


  In D27150#608491 , @kossebau wrote:
  
  > In D27150#608318 , @mlaurent 
wrote:
  >
  > > Yep you need to create a file name "foo.renamecategories" where you 
change the categorie name
  > >
  > > 1. old module namenew module name
  > >
  > >   for example "log_mailfilteragent org.kde.pim.mailfilteragent" in kmail
  >
  >
  > Does kdebugsettings also support multiple renames? Like log1 > log2 > log3?
  
  
  Perhaps :) I will test it next week
  
  > 
  > 
  >> What do you need as " Could that be supported by some additional macro or 
adaption of the existing/new ones?" ?
  > 
  > We could have another argument for `ecm_qt_declare_logging_category`& 
`ecm_qt_export_logging_category` to pass old log names, and then have 
`ecm_qt_install_logging_categories` also generate & install a .renamecategories 
file. Should be easy to add, working on it next.
  
  oki

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-09 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  In D27150#608318 , @mlaurent wrote:
  
  > Yep you need to create a file name "foo.renamecategories" where you change 
the categorie name
  >
  > 1. old module namenew module name
  >
  >   for example "log_mailfilteragent org.kde.pim.mailfilteragent" in kmail
  
  
  Does kdebugsettings also support multiple renames? Like log1 > log2 > log3?
  
  > What do you need as " Could that be supported by some additional macro or 
adaption of the existing/new ones?" ?
  
  We could have another argument for `ecm_qt_declare_logging_category`& 
`ecm_qt_export_logging_category` to pass old log names, and then have 
`ecm_qt_install_logging_categories` also generate & install a .renamecategories 
file. Should be easy to add, working on it next.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-09 Thread Laurent Montel
mlaurent added a comment.


  Yep you need to create a file name "foo.renamecategories" where you change 
the categorie name
  
  old module namenew module name
  =
  
  for example "log_mailfilteragent org.kde.pim.mailfilteragent" in kmail
  
  What do you need as " Could that be supported by some additional macro or 
adaption of the existing/new ones?" ?

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-08 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  @mlaurent Wasn't there also something which tells kdebugsettings about 
renamed categories? Is that documented anywhere? Could that be supported by 
some additional macro or adaption of the existing/new ones?

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-07 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  Good. So will land this next Tuesday, Feb 11th then, so other people will 
have had 7 days of feedback opportunity.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-06 Thread Laurent Montel
mlaurent added a comment.


  I don't see other case. For me your macro works for all case that we can 
implement.
  
  No other idea.
  But avoiding to create by hand the file is a good idea. I never successed to 
create a macro for it
  So thanks

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-06 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  @mlaurent Thanks for review :)
  Do you happen to know any more complex usages of 
ecm_qt_declare_logging_category and/or manual category definitions which can 
and should be checked for how these new methods would work out?
  I have not really researched bigger parts of KDE code for if the currently 
proposed method calls will be sufficient to cover all use cases. So far it's 
mainly based on KDevelop, kcoreaddons, kservice & sonnet use-cases.
  So far it was mainly: @broulik complained on irc, a day later I accidentally 
found another approach to the target-based hack we had in kdevelop, changed 
kdevelop cmake code, then pulled out the core logic and turned into this patch, 
after trying to port kcoreaddons, kservice & sonnet :)
  Thus also hesitating to merge on first positive review, as I am not sure 
myself yet, still thinking of this as prototype to get feedback on.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-05 Thread Laurent Montel
mlaurent accepted this revision.
mlaurent added a comment.
This revision is now accepted and ready to land.


  Seems ok for me :)

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-05 Thread Friedrich W. H. Kossebau
kossebau added a dependent revision: D27178: Use 
ecm_qt_install_logging_categories over manual categories file.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-05 Thread Friedrich W. H. Kossebau
kossebau updated this revision to Diff 75069.
kossebau added a comment.


  in doc also be explicit that ecm_qt_install_logging_categories can be in
  another directory, just needs to be called last

REPOSITORY
  R240 Extra CMake Modules

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27150?vs=74973=75069

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

AFFECTED FILES
  modules/ECMQtDeclareLoggingCategory.cmake
  tests/ECMQtDeclareLoggingCategoryTest/CMakeLists.txt
  tests/ECMQtDeclareLoggingCategoryTest/log.categories

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-03 Thread Laurent Montel
mlaurent added a comment.


  Seems ok for me

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-03 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  See D27150  as an example next to the 
test and docs for how this would be used. The ecm_qt_export_logging_category 
also is kept similar to ecm_qt_declare_logging_category in case someone wants 
to turn the manual definition to a generated one, that wil just need addition 
of HEADER and the sources variable and change of macro name called.
  
  BTW, core of this logic has been taken from KDevelop's internal util macros, 
where this served for some versions already :) 
https://phabricator.kde.org/source/kdevelop/browse/master/cmake/modules/KDevelopMacrosInternal.cmake
 though with some additional wrappers for repeated data & patterns.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-03 Thread Friedrich W. H. Kossebau
kossebau added a dependent revision: D27151: Use 
ecm_qt_install_logging_categories over manual categories file.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-03 Thread Friedrich W. H. Kossebau
kossebau added inline comments.

INLINE COMMENTS

> ECMQtDeclareLoggingCategory.cmake:76
> +#   FILE 
> +#   DESTINATION 
> +#   [SORT]

Why the need for explicit DESTINATION argument, where almost all use-cases will 
use ${KDE_INSTALL_LOGGINGCATEGORIESDIR}?
Because ECMQtDeclareLoggingCategory is part of modules, not kde-modules, so 
KDEInstallDirs cannot be used.

One could think about having a wrapper module in kde-modules. But such a 
wrapper script would be nice for more things actually, given all the repeated 
boilerpplate across e.g. all the KF repos :)

So asking for explicit mention of the installation destination is consistent.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D27150

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns


D27150: Add ecm_qt_install_logging_categories & ecm_qt_export_logging_category

2020-02-03 Thread Friedrich W. H. Kossebau
kossebau created this revision.
kossebau added reviewers: Build System, Frameworks, broulik, mlaurent.
Herald added projects: Frameworks, Build System.
Herald added subscribers: kde-buildsystem, kde-frameworks-devel.
kossebau requested review of this revision.

REVISION SUMMARY
  Having to manually maintain a separate copy of all the data about qt logging
  categories in the categories files comes with the usual disadvantages.
  The new macro ecm_qt_install_logging_categories together with the additions
  of arguments DESCRIPTION & EXPORT to ecm_qt_declare_logging_category allows
  to have just one place with one copy of the data, and have the categories
  file automatically generated from that data, linked via the EXPORT id.
  
  For cases not using ecm_qt_declare_logging_category, but having categories
  manually defined in code, yet wanting to have info about those categories in
  the installed fiel, ecm_qt_export_logging_category allows to add those data
  to the system.

TEST PLAN
  Added unit tests work, porting of some repos created categories files whose
  diff against the manually created files were only the DO_NOT_EDIT header.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  addautomaticcategoriesgeneration

REVISION DETAIL
  https://phabricator.kde.org/D27150

AFFECTED FILES
  modules/ECMQtDeclareLoggingCategory.cmake
  tests/ECMQtDeclareLoggingCategoryTest/CMakeLists.txt
  tests/ECMQtDeclareLoggingCategoryTest/log.categories

To: kossebau, #build_system, #frameworks, broulik, mlaurent
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, 
michaelh, ngraham, bruns