diff options
author | Luca Di Sera <luca.disera@qt.io> | 2022-10-11 10:26:28 +0200 |
---|---|---|
committer | Luca Di Sera <luca.disera@qt.io> | 2022-10-21 09:48:36 +0200 |
commit | e2fef733be92e95ff28225196e14ffeb98d61a1f (patch) | |
tree | 42bc5a06849c48c89a74fc65a494a126e46b1797 /src/widgets/widgets | |
parent | 2b35b89803bc90a3595be5386da905d79d841b73 (diff) |
Replace usages of Q_CLANG_QDOC with Q_QDOC
To allow the user to customize the C++ code that QDoc sees, so as to be
able to work-around some limitations on QDoc itself, QDoc defines two
symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an
entire execution of QDoc.
At a certain point in time, QDoc allowed the user the choice between a
custom C++ parser and a Clang based one.
The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol
would be defined only when the Clang based parser was chosen.
In more recent times, QDoc always uses a Clang based parser, such that
both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent.
To avoid using different symbols, and the possible confusion and
fragmentation that derives from it, all usages of Q_CLANG_QDOC are now
replaced by the equivalent usages of Q_QDOC.
Change-Id: I5810abb9ad1016a4c5bbea99acd03381b8514b3f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qmenu.h | 8 | ||||
-rw-r--r-- | src/widgets/widgets/qmenubar.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h index b04b4a638b..33ebd79d1f 100644 --- a/src/widgets/widgets/qmenu.h +++ b/src/widgets/widgets/qmenu.h @@ -10,7 +10,7 @@ #include <QtGui/qicon.h> #include <QtGui/qaction.h> -#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC) +#if defined(Q_OS_MACOS) || defined(Q_QDOC) Q_FORWARD_DECLARE_OBJC_CLASS(NSMenu); #endif @@ -60,7 +60,7 @@ public: const QObject *receiver, const char* member, const QKeySequence &shortcut); -#ifdef Q_CLANG_QDOC +#ifdef Q_QDOC template<typename Functor> QAction *addAction(const QString &text, Functor functor, const QKeySequence &shortcut); template<typename Functor> @@ -106,7 +106,7 @@ public: { return addAction(actionIcon, text, shortcut, slot); } -#endif // !Q_CLANG_QDOC +#endif // !Q_QDOC #endif // QT_DEPRECATED_SINCE(6, 4) #endif // QT_CONFIG(shortcut) @@ -166,7 +166,7 @@ public: QPlatformMenu *platformMenu(); void setPlatformMenu(QPlatformMenu *platformMenu); -#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC) +#if defined(Q_OS_MACOS) || defined(Q_QDOC) NSMenu* toNSMenu(); void setAsDockMenu(); #endif diff --git a/src/widgets/widgets/qmenubar.h b/src/widgets/widgets/qmenubar.h index ef78113c48..dc0d1559bf 100644 --- a/src/widgets/widgets/qmenubar.h +++ b/src/widgets/widgets/qmenubar.h @@ -61,7 +61,7 @@ public: void setCornerWidget(QWidget *w, Qt::Corner corner = Qt::TopRightCorner); QWidget *cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const; -#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC) +#if defined(Q_OS_MACOS) || defined(Q_QDOC) NSMenu* toNSMenu(); #endif |