aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMQtDeclareLoggingCategory.cmake
AgeCommit message (Collapse)Author
2017-05-23ecm_qt_declare_logging_category(): more unique include guard for headerFriedrich W. H. Kossebau
Summary: The old guard was created just from the identifier + _H, which runs the chance to clash in projects which use an identifier matching the project name and which also have a class or central file header which is named by the project and then has an include guard matching the filename. Example: project ABC -> abc.h with ABC_H guard identifier ABC, header debug.h -> debug.h with ABC_H guard any.cpp including both abc.h and debug.h will see only one content Using both the header file name and identifier for the guard name and prefixing it additionally with a macro specific term should make the guard both follow the usual pattern for guards matching the file name and also add some namespacing to allow for similar named header files in bigger projects (e.g. "debug.h") which could be included in the same include tree. Reviewers: #frameworks, #build_system Subscribers: elvisangelaccio Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5866
2016-09-02The default level for logging categories should be Info rather than Warning.David Faure
The whole point of Info is to be used by apps who want to print out some info for the user, not disabled by default. Example use case: ksmserver could output the name of the autostart files it's starting, so user can check their own scripts are started, and associate any errors with the corresponding script. In other words: Debug = debugging for the developer Info = debugging for the user :-) This commit shows the benefit of having a central place for changing this (many category definitions do not use this macro though) REVIEW: 128232
2016-08-31add full license textAllen Winter
REVIEW: 128780
2016-04-03ecm_qt_declare_logging_category: improve error message when using without ↵David Faure
including If one subdir in the project includes this file, all others can use the function but they don't see the value of the variable, which leads to a strange error CMake Error at ECM/modules/ECMQtDeclareLoggingCategory.cmake:114 (configure_file): configure_file input location <srcdir> is a directory but a file was expected. Happened in KIO, with kio/gui doing include+function call, and then adding function call in kio/widgets. REVIEW: 127432
2016-03-20Revert "ECMQtDeclareLoggingCategory: Include <QDebug> with the generated file"Stephen Kelly
This reverts commit 1d4bc35cf9383177459544d6fcd9de35edf3e77d. QLoggingCategory has always included QDebug, so this has always been superfluous.
2015-12-21ECMQtDeclareLoggingCategory: Include <QDebug> with the generated fileMartin Klapetek
In order to use the logging categories created by ECM, the generated header file has to be included but then also #include <QDebug> must be added to make it usable at all for qCDebug/qCWarning stuff. So this puts the #include <QDebug> into the generated header file and thus allowing to include a single header for qCDebug/qCWarning instead of two. REVIEW: 126368
2015-08-18Add macro to generate logging category declarations for Qt5.Alex Merry
This makes life a bit easier for developers who use the categorised logging in Qt5 in the common case - rather than creating two new files, and remembering to put in the #ifdef for the default verbosity settings in Qt 5.4, they can just add a couple of lines to their CMakeLists.txt. REVIEW: 124595