From 1d4bc35cf9383177459544d6fcd9de35edf3e77d Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Mon, 21 Dec 2015 14:30:19 -0500 Subject: ECMQtDeclareLoggingCategory: Include 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 must be added to make it usable at all for qCDebug/qCWarning stuff. So this puts the #include into the generated header file and thus allowing to include a single header for qCDebug/qCWarning instead of two. REVIEW: 126368 --- modules/ECMQtDeclareLoggingCategory.cmake | 3 +++ modules/ECMQtDeclareLoggingCategory.h.in | 1 + 2 files changed, 4 insertions(+) (limited to 'modules') 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 @@ # # ```` may include namespaces (eg: ``foo::bar::IDENT``). # +# Starting with Frameworks 5.18, the generated header also includes the +# header, so you don't have to put extra #include 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 +#include @OPEN_NAMESPACES@ Q_DECLARE_LOGGING_CATEGORY(@IDENTIFIER@) @CLOSE_NAMESPACES@ -- cgit v1.2.1