Important: Please read the Qt Code of Conduct -

Methods disabled by the Q_QDOC macro?

  • Hi.
    I was trying to use the

    QString decode(const QByteArray &ba);

    method of QStringDecoder as documented here:

    However, 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);

    What is the purpose of this? Does it mean that those methods will only be available in the next version (6.1?)

  • Lifetime Qt Champion


    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.

Log in to reply