Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Methods disabled by the Q_QDOC macro?
Forum Updated to NodeBB v4.3 + New Features

Methods disabled by the Q_QDOC macro?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DiracsbracketD Offline
    DiracsbracketD Offline
    Diracsbracket
    wrote on last edited by Diracsbracket
    #1

    Hi.
    I was trying to use the

    QString decode(const QByteArray &ba);
    

    method of QStringDecoder as documented here:
    https://doc-snapshots.qt.io/qt6-dev/qstringdecoder.html#decode-1

    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);
    #else
    ...
    #endif
    

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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved