Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
REVIEW: 128780
|
|
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
|
|
This reverts commit 1d4bc35cf9383177459544d6fcd9de35edf3e77d.
QLoggingCategory has always included QDebug, so this has always been
superfluous.
|
|
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
|
|
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
|