Methods disabled by the Q_QDOC macro?
Unsolved
General and Desktop
-
Hi.
I was trying to use theQString decode(const QByteArray &ba);
method of
QStringDecoder
as documented here:
https://doc-snapshots.qt.io/qt6-dev/qstringdecoder.html#decode-1However, that method is currently disabled, since
Q_QDOC
is apparently
not defined.#if defined(Q_QDOC) QString operator()(const QByteArray &ba); QString operator()(QByteArrayView ba); QString decode(const QByteArray &ba); QString decode(QByteArrayView ba); #else ... #endif
What is the purpose of this? Does it mean that those methods will only be available in the next version (6.1?)
-
Hi,
No they are not, if you read the else part, you'll see they are implemented there. This ifdef allows the documentation tool to generate the documentation you see therr. The current implementation is more complex due to their templated nature however the end result is what you see in the documentation.