From 1872d1a41de0d4994c799c8d7dd4e72aaf49c677 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 28 Jul 2019 08:05:44 -0700 Subject: Doc: Q_FLAG should be applied to the enum, not the QFlags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit moc extracts he name that is inthe Q_FLAG macro and that gets used in qDebug(). As the documentation described, qDebug would have printed: QFlags(QLibrary::ResolveAllSymbolsHint) which doesn't compile (though we could have partially specialized QFlags> to be QFlags). The semantically correct output is: QFlags(QLibrary::ResolveAllSymbolsHint) which is what this change gets. The ideal output would be: LoadHints(QLibrary::ResolveAllSymbolsHint) But that's not a doc change. Fixes: QTBUG-77216 Change-Id: I0635172f4f2a4c51a435fffd15b59a859886e90c Reviewed-by: MÃ¥rten Nordheim --- src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/doc/snippets') diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp index 1e31a5292f..1966f8195a 100644 --- a/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp @@ -416,7 +416,7 @@ public: LoadArchiveMemberHint = 0x04 }; Q_DECLARE_FLAGS(LoadHints, LoadHint) - Q_FLAG(LoadHints) + Q_FLAG(LoadHint) ... } //! [39] -- cgit v1.2.3