diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2019-07-28 08:05:44 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2019-09-24 18:25:21 -0700 |
commit | 1872d1a41de0d4994c799c8d7dd4e72aaf49c677 (patch) | |
tree | 0c7fe3b8e2ef5120c97936b1be246a362b71d126 /src/corelib | |
parent | 70e6e9fe590590f602dee230a64870365d9301aa (diff) |
Doc: Q_FLAG should be applied to the enum, not the QFlags
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<LoadHints>(QLibrary::ResolveAllSymbolsHint)
which doesn't compile (though we could have partially specialized
QFlags<QFlags<E>> to be QFlags<E>). The semantically correct output is:
QFlags<LoadHint>(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 <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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] |