diff options
author | Martin Klapetek <mklapetek@kde.org> | 2015-12-21 14:30:19 -0500 |
---|---|---|
committer | Martin Klapetek <mklapetek@kde.org> | 2015-12-21 14:30:33 -0500 |
commit | 1d4bc35cf9383177459544d6fcd9de35edf3e77d (patch) | |
tree | c1906be3513aaa609272ce70e2bf25a4f5f36ac2 /modules | |
parent | 942ba80dae253fef93094d178da3ce0abc47da5d (diff) | |
download | extra-cmake-modules-1d4bc35cf9383177459544d6fcd9de35edf3e77d.tar.gz extra-cmake-modules-1d4bc35cf9383177459544d6fcd9de35edf3e77d.tar.bz2 |
ECMQtDeclareLoggingCategory: Include <QDebug> with the generated file
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
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ECMQtDeclareLoggingCategory.cmake | 3 | ||||
-rw-r--r-- | modules/ECMQtDeclareLoggingCategory.h.in | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/modules/ECMQtDeclareLoggingCategory.cmake b/modules/ECMQtDeclareLoggingCategory.cmake index b7f1ad39..3f7bb79a 100644 --- a/modules/ECMQtDeclareLoggingCategory.cmake +++ b/modules/ECMQtDeclareLoggingCategory.cmake @@ -30,6 +30,9 @@ # # ``<identifier>`` may include namespaces (eg: ``foo::bar::IDENT``). # +# Starting with Frameworks 5.18, the generated header also includes the <QDebug> +# header, so you don't have to put extra #include <QDebug> anymore in your code. +# # Since 5.14.0. #============================================================================= diff --git a/modules/ECMQtDeclareLoggingCategory.h.in b/modules/ECMQtDeclareLoggingCategory.h.in index fedecd2f..b59bc7aa 100644 --- a/modules/ECMQtDeclareLoggingCategory.h.in +++ b/modules/ECMQtDeclareLoggingCategory.h.in @@ -4,6 +4,7 @@ #define @GUARD_NAME@ #include <QLoggingCategory> +#include <QDebug> @OPEN_NAMESPACES@ Q_DECLARE_LOGGING_CATEGORY(@IDENTIFIER@) @CLOSE_NAMESPACES@ |