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>bb10
parent
70e6e9fe59
commit
1872d1a41d
|
|
@ -416,7 +416,7 @@ public:
|
|||
LoadArchiveMemberHint = 0x04
|
||||
};
|
||||
Q_DECLARE_FLAGS(LoadHints, LoadHint)
|
||||
Q_FLAG(LoadHints)
|
||||
Q_FLAG(LoadHint)
|
||||
...
|
||||
}
|
||||
//! [39]
|
||||
|
|
|
|||
Loading…
Reference in New Issue