summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorLuca Di Sera <luca.disera@qt.io>2022-10-11 10:26:28 +0200
committerLuca Di Sera <luca.disera@qt.io>2022-10-21 09:48:36 +0200
commite2fef733be92e95ff28225196e14ffeb98d61a1f (patch)
tree42bc5a06849c48c89a74fc65a494a126e46b1797 /src/corelib
parent2b35b89803bc90a3595be5386da905d79d841b73 (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/corelib')
-rw-r--r--src/corelib/global/qcompilerdetection.h4
-rw-r--r--src/corelib/global/qendian.h2
-rw-r--r--src/corelib/global/qflags.h4
-rw-r--r--src/corelib/global/qnumeric_p.h4
-rw-r--r--src/corelib/global/qtversionchecks.h2
-rw-r--r--src/corelib/io/qdebug.h4
-rw-r--r--src/corelib/io/qdir.h8
-rw-r--r--src/corelib/io/qfile.h26
-rw-r--r--src/corelib/io/qfileinfo.h10
-rw-r--r--src/corelib/io/qprocess.cpp2
-rw-r--r--src/corelib/io/qprocess.h8
-rw-r--r--src/corelib/io/qsettings.h2
-rw-r--r--src/corelib/kernel/qcoreapplication_platform.h8
-rw-r--r--src/corelib/kernel/qmetaobject.h12
-rw-r--r--src/corelib/kernel/qmetatype.h4
-rw-r--r--src/corelib/kernel/qobject.h12
-rw-r--r--src/corelib/kernel/qobjectdefs.h14
-rw-r--r--src/corelib/kernel/qproperty.h16
-rw-r--r--src/corelib/kernel/qproperty_p.h2
-rw-r--r--src/corelib/kernel/qtimer.h2
-rw-r--r--src/corelib/kernel/qtmetamacros.h2
-rw-r--r--src/corelib/kernel/qvariant.h2
-rw-r--r--src/corelib/kernel/qwineventnotifier.h2
-rw-r--r--src/corelib/plugin/qfactoryinterface.h2
-rw-r--r--src/corelib/plugin/quuid.h8
-rw-r--r--src/corelib/serialization/qdatastream.h4
-rw-r--r--src/corelib/serialization/qjsondocument.cpp2
-rw-r--r--src/corelib/serialization/qjsondocument.h2
-rw-r--r--src/corelib/text/qanystringview.h2
-rw-r--r--src/corelib/text/qbytearray.h2
-rw-r--r--src/corelib/text/qbytearraylist.h6
-rw-r--r--src/corelib/text/qchar.h2
-rw-r--r--src/corelib/text/qstring.h12
-rw-r--r--src/corelib/text/qstringfwd.h6
-rw-r--r--src/corelib/text/qstringview.h4
-rw-r--r--src/corelib/text/qutf8stringview.h14
-rw-r--r--src/corelib/text/qvsnprintf.cpp2
-rw-r--r--src/corelib/thread/qatomic.h2
-rw-r--r--src/corelib/thread/qexception.cpp6
-rw-r--r--src/corelib/thread/qexception.h2
-rw-r--r--src/corelib/thread/qfuture.h8
-rw-r--r--src/corelib/thread/qfuture_impl.h2
-rw-r--r--src/corelib/thread/qmutex.h6
-rw-r--r--src/corelib/thread/qpromise.h2
-rw-r--r--src/corelib/thread/qthread.h2
-rw-r--r--src/corelib/tools/qcontainerfwd.h2
-rw-r--r--src/corelib/tools/qcontiguouscache.h4
-rw-r--r--src/corelib/tools/qhash.cpp2
-rw-r--r--src/corelib/tools/qhash.h8
-rw-r--r--src/corelib/tools/qhashfunctions.h2
-rw-r--r--src/corelib/tools/qlist.h4
-rw-r--r--src/corelib/tools/qmap.h8
-rw-r--r--src/corelib/tools/qset.h2
53 files changed, 141 insertions, 141 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 35d0c5816b..3cb6669042 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -1040,7 +1040,7 @@
* "Weak overloads" - makes an otherwise confliciting overload weaker
* (by making it a template)
*/
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
# define Q_WEAK_OVERLOAD template <typename = void>
#else
# define Q_WEAK_OVERLOAD
@@ -1064,7 +1064,7 @@
* The workaround: declare such functions as function templates.
* (Obviously a function template does not need this marker.)
*/
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
# define QT_POST_CXX17_API_IN_EXPORTED_CLASS template <typename = void>
#else
# define QT_POST_CXX17_API_IN_EXPORTED_CLASS
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index b803a27674..9cd0044cbc 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -302,7 +302,7 @@ public:
static constexpr T fromSpecial(T source) { return qFromBigEndian(source); }
};
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template<typename T>
class QLEInteger {
public:
diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h
index c791c26ac1..26a8e5c9cf 100644
--- a/src/corelib/global/qflags.h
+++ b/src/corelib/global/qflags.h
@@ -24,7 +24,7 @@ public:
// Microsoft Visual Studio has buggy behavior when it comes to
// unsigned enums: even if the enum is unsigned, the enum tags are
// always signed
-# if !defined(__LP64__) && !defined(Q_CLANG_QDOC)
+# if !defined(__LP64__) && !defined(Q_QDOC)
constexpr inline Q_IMPLICIT QFlag(long value) noexcept : i(int(value)) {}
constexpr inline Q_IMPLICIT QFlag(ulong value) noexcept : i(int(long(value))) {}
# endif
@@ -57,7 +57,7 @@ class QFlags
static_assert((std::is_enum<Enum>::value), "QFlags is only usable on enumeration types.");
public:
-#if defined(Q_CC_MSVC) || defined(Q_CLANG_QDOC)
+#if defined(Q_CC_MSVC) || defined(Q_QDOC)
// see above for MSVC
// the definition below is too complex for qdoc
typedef int Int;
diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h
index f5beb4d38d..9765ce4a31 100644
--- a/src/corelib/global/qnumeric_p.h
+++ b/src/corelib/global/qnumeric_p.h
@@ -138,7 +138,7 @@ Q_DECL_CONST_FUNCTION static inline int qt_fpclassify(float f)
return qnumeric_std_wrapper::fpclassify(f);
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
namespace {
/*!
Returns true if the double \a v can be converted to type \c T, false if
@@ -312,7 +312,7 @@ template <auto V2, typename T> bool mul_overflow(T v1, T *r)
return qMulOverflow<V2, T>(v1, r);
}
}
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
/*
Safely narrows \a x to \c{To}. Let \c L be
diff --git a/src/corelib/global/qtversionchecks.h b/src/corelib/global/qtversionchecks.h
index 8f3bd8b371..d3b7a7b082 100644
--- a/src/corelib/global/qtversionchecks.h
+++ b/src/corelib/global/qtversionchecks.h
@@ -64,7 +64,7 @@
int size() const { return int(size(QT6_CALL_NEW_OVERLOAD)); }
*/
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
# define QT6_DECL_NEW_OVERLOAD
# define QT6_DECL_NEW_OVERLOAD_TAIL
# define QT6_IMPL_NEW_OVERLOAD
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 6c693ad142..2dc00d8dc3 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -241,7 +241,7 @@ template<typename Container, typename ...T>
using QDebugIfHasDebugStreamContainer =
std::enable_if_t<std::conjunction_v<QTypeTraits::has_ostream_operator_container<QDebug, Container, T>...>, QDebug>;
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template<typename T>
inline QDebugIfHasDebugStreamContainer<QList<T>, T> operator<<(QDebug debug, const QList<T> &vec)
@@ -380,7 +380,7 @@ QDebug operator<<(QDebug debug, const std::pair<T1, T2> &pair);
template <typename T>
QDebug operator<<(QDebug debug, const QContiguousCache<T> &cache);
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
template <class T>
inline QDebug operator<<(QDebug debug, const QSharedPointer<T> &ptr)
diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h
index 32bb471af4..7d5e940e84 100644
--- a/src/corelib/io/qdir.h
+++ b/src/corelib/io/qdir.h
@@ -66,7 +66,7 @@ public:
QDir(const QString &path = QString());
QDir(const QString &path, const QString &nameFilter,
SortFlags sort = SortFlags(Name | IgnoreCase), Filters filter = AllEntries);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
QDir(const std::filesystem::path &path);
QDir(const std::filesystem::path &path, const QString &nameFilter,
SortFlags sort = SortFlags(Name | IgnoreCase), Filters filter = AllEntries);
@@ -91,7 +91,7 @@ public:
{ d_ptr.swap(other.d_ptr); }
void setPath(const QString &path);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
void setPath(const std::filesystem::path &path);
#elif QT_CONFIG(cxx17_filesystem)
template<typename T, QtPrivate::ForceFilesystemPath<T> = 0>
@@ -103,7 +103,7 @@ public:
QString path() const;
QString absolutePath() const;
QString canonicalPath() const;
-#if QT_CONFIG(cxx17_filesystem) || defined(Q_CLANG_QDOC)
+#if QT_CONFIG(cxx17_filesystem) || defined(Q_QDOC)
std::filesystem::path filesystemPath() const
{ return QtPrivate::toFilesystemPath(path()); }
std::filesystem::path filesystemAbsolutePath() const
@@ -115,7 +115,7 @@ public:
#ifndef QT_BOOTSTRAPPED
static void setSearchPaths(const QString &prefix, const QStringList &searchPaths);
static void addSearchPath(const QString &prefix, const QString &path);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
static void addSearchPath(const QString &prefix, const std::filesystem::path &path);
#elif QT_CONFIG(cxx17_filesystem)
template<typename T, QtPrivate::ForceFilesystemPath<T> = 0>
diff --git a/src/corelib/io/qfile.h b/src/corelib/io/qfile.h
index 53b69dd8b1..25f63d01c8 100644
--- a/src/corelib/io/qfile.h
+++ b/src/corelib/io/qfile.h
@@ -11,7 +11,7 @@
#if QT_CONFIG(cxx17_filesystem)
#include <filesystem>
-#elif defined(Q_CLANG_QDOC)
+#elif defined(Q_QDOC)
namespace std {
namespace filesystem {
class path {
@@ -64,7 +64,7 @@ class Q_CORE_EXPORT QFile : public QFileDevice
public:
QFile();
QFile(const QString &name);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
QFile(const std::filesystem::path &name);
#elif QT_CONFIG(cxx17_filesystem)
template<typename T, QtPrivate::ForceFilesystemPath<T> = 0>
@@ -77,7 +77,7 @@ public:
explicit QFile(QObject *parent);
QFile(const QString &name, QObject *parent);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
QFile(const std::filesystem::path &path, QObject *parent);
#elif QT_CONFIG(cxx17_filesystem)
template<typename T, QtPrivate::ForceFilesystemPath<T> = 0>
@@ -89,12 +89,12 @@ public:
~QFile();
QString fileName() const override;
-#if QT_CONFIG(cxx17_filesystem) || defined(Q_CLANG_QDOC)
+#if QT_CONFIG(cxx17_filesystem) || defined(Q_QDOC)
std::filesystem::path filesystemFileName() const
{ return QtPrivate::toFilesystemPath(fileName()); }
#endif
void setFileName(const QString &name);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
void setFileName(const std::filesystem::path &name);
#elif QT_CONFIG(cxx17_filesystem)
template<typename T, QtPrivate::ForceFilesystemPath<T> = 0>
@@ -136,7 +136,7 @@ public:
bool exists() const;
static bool exists(const QString &fileName);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
static bool exists(const std::filesystem::path &fileName);
#elif QT_CONFIG(cxx17_filesystem)
template<typename T, QtPrivate::ForceFilesystemPath<T> = 0>
@@ -148,7 +148,7 @@ public:
QString symLinkTarget() const;
static QString symLinkTarget(const QString &fileName);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
std::filesystem::path filesystemSymLinkTarget() const;
static std::filesystem::path filesystemSymLinkTarget(const std::filesystem::path &fileName);
#elif QT_CONFIG(cxx17_filesystem)
@@ -165,7 +165,7 @@ public:
bool remove();
static bool remove(const QString &fileName);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
static bool remove(const std::filesystem::path &fileName);
#elif QT_CONFIG(cxx17_filesystem)
template<typename T, QtPrivate::ForceFilesystemPath<T> = 0>
@@ -177,7 +177,7 @@ public:
bool moveToTrash();
static bool moveToTrash(const QString &fileName, QString *pathInTrash = nullptr);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
static bool moveToTrash(const std::filesystem::path &fileName, QString *pathInTrash = nullptr);
#elif QT_CONFIG(cxx17_filesystem)
template<typename T, QtPrivate::ForceFilesystemPath<T> = 0>
@@ -189,7 +189,7 @@ public:
bool rename(const QString &newName);
static bool rename(const QString &oldName, const QString &newName);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool rename(const std::filesystem::path &newName);
static bool rename(const std::filesystem::path &oldName,
const std::filesystem::path &newName);
@@ -209,7 +209,7 @@ public:
bool link(const QString &newName);
static bool link(const QString &fileName, const QString &newName);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool link(const std::filesystem::path &newName);
static bool link(const std::filesystem::path &fileName,
const std::filesystem::path &newName);
@@ -229,7 +229,7 @@ public:
bool copy(const QString &newName);
static bool copy(const QString &fileName, const QString &newName);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool copy(const std::filesystem::path &newName);
static bool copy(const std::filesystem::path &fileName,
const std::filesystem::path &newName);
@@ -261,7 +261,7 @@ public:
static Permissions permissions(const QString &filename);
bool setPermissions(Permissions permissionSpec) override;
static bool setPermissions(const QString &filename, Permissions permissionSpec);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
static Permissions permissions(const std::filesystem::path &filename);
static bool setPermissions(const std::filesystem::path &filename, Permissions permissionSpec);
#elif QT_CONFIG(cxx17_filesystem)
diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h
index 1cb36495ef..d0ec231f89 100644
--- a/src/corelib/io/qfileinfo.h
+++ b/src/corelib/io/qfileinfo.h
@@ -34,7 +34,7 @@ public:
QFILEINFO_MAYBE_EXPLICIT QFileInfo(const QFileDevice &file);
QFILEINFO_MAYBE_EXPLICIT QFileInfo(const QDir &dir, const QString &file);
QFileInfo(const QFileInfo &fileinfo);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
QFileInfo(const std::filesystem::path &file);
QFileInfo(const QDir &dir, const std::filesystem::path &file);
#elif QT_CONFIG(cxx17_filesystem)
@@ -63,7 +63,7 @@ public:
void setFile(const QString &file);
void setFile(const QFileDevice &file);
void setFile(const QDir &dir, const QString &file);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
void setFile(const std::filesystem::path &file);
#elif QT_CONFIG(cxx17_filesystem)
template<typename T, QtPrivate::ForceFilesystemPath<T> = 0>
@@ -77,7 +77,7 @@ public:
QString filePath() const;
QString absoluteFilePath() const;
QString canonicalFilePath() const;
-#if QT_CONFIG(cxx17_filesystem) || defined(Q_CLANG_QDOC)
+#if QT_CONFIG(cxx17_filesystem) || defined(Q_QDOC)
std::filesystem::path filesystemFilePath() const
{ return QtPrivate::toFilesystemPath(filePath()); }
std::filesystem::path filesystemAbsoluteFilePath() const
@@ -95,7 +95,7 @@ public:
QString path() const;
QString absolutePath() const;
QString canonicalPath() const;
-#if QT_CONFIG(cxx17_filesystem) || defined(Q_CLANG_QDOC)
+#if QT_CONFIG(cxx17_filesystem) || defined(Q_QDOC)
std::filesystem::path filesystemPath() const { return QtPrivate::toFilesystemPath(path()); }
std::filesystem::path filesystemAbsolutePath() const
{ return QtPrivate::toFilesystemPath(absolutePath()); }
@@ -128,7 +128,7 @@ public:
QString symLinkTarget() const;
QString junctionTarget() const;
-#if QT_CONFIG(cxx17_filesystem) || defined(Q_CLANG_QDOC)
+#if QT_CONFIG(cxx17_filesystem) || defined(Q_QDOC)
std::filesystem::path filesystemSymLinkTarget() const
{ return QtPrivate::toFilesystemPath(symLinkTarget()); }
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 1af592d39d..27994591e6 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1476,7 +1476,7 @@ void QProcess::setStandardOutputProcess(QProcess *destination)
dto->stdinChannel.pipeFrom(dfrom);
}
-#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_WIN) || defined(Q_QDOC)
/*!
\since 4.7
diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h
index dba3710295..4fa1037b38 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -12,7 +12,7 @@
QT_REQUIRE_CONFIG(processenvironment);
-#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_WIN) || defined(Q_QDOC)
struct _PROCESS_INFORMATION;
struct _SECURITY_ATTRIBUTES;
struct _STARTUPINFOW;
@@ -150,7 +150,7 @@ public:
void setStandardErrorFile(const QString &fileName, OpenMode mode = Truncate);
void setStandardOutputProcess(QProcess *destination);
-#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_WIN) || defined(Q_QDOC)
QString nativeArguments() const;
void setNativeArguments(const QString &arguments);
struct CreateProcessArguments
@@ -169,8 +169,8 @@ public:
typedef std::function<void(CreateProcessArguments *)> CreateProcessArgumentModifier;
CreateProcessArgumentModifier createProcessArgumentsModifier() const;
void setCreateProcessArgumentsModifier(CreateProcessArgumentModifier modifier);
-#endif // Q_OS_WIN || Q_CLANG_QDOC
-#if defined(Q_OS_UNIX) || defined(Q_CLANG_QDOC)
+#endif // Q_OS_WIN || Q_QDOC
+#if defined(Q_OS_UNIX) || defined(Q_QDOC)
std::function<void(void)> childProcessModifier() const;
void setChildProcessModifier(const std::function<void(void)> &modifier);
#endif
diff --git a/src/corelib/io/qsettings.h b/src/corelib/io/qsettings.h
index 5d2c330728..86b55ea241 100644
--- a/src/corelib/io/qsettings.h
+++ b/src/corelib/io/qsettings.h
@@ -49,7 +49,7 @@ public:
NativeFormat,
IniFormat,
-#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_WIN) || defined(Q_QDOC)
Registry32Format,
Registry64Format,
#endif
diff --git a/src/corelib/kernel/qcoreapplication_platform.h b/src/corelib/kernel/qcoreapplication_platform.h
index fe0fee915b..5a2543146a 100644
--- a/src/corelib/kernel/qcoreapplication_platform.h
+++ b/src/corelib/kernel/qcoreapplication_platform.h
@@ -17,13 +17,13 @@
#include <QtCore/qnativeinterface.h>
#include <QtCore/qcoreapplication.h>
-#if defined(Q_OS_ANDROID) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_ANDROID) || defined(Q_QDOC)
#include <QtCore/qjnitypes.h>
#if QT_CONFIG(future) && !defined(QT_NO_QOBJECT)
#include <QtCore/qfuture.h>
#include <QtCore/qvariant.h>
#endif
-#endif // #if defined(Q_OS_ANDROID) || defined(Q_CLANG_QDOC)
+#endif // #if defined(Q_OS_ANDROID) || defined(Q_QDOC)
#if defined(Q_OS_ANDROID)
class _jobject;
@@ -38,11 +38,11 @@ Q_DECLARE_JNI_TYPE(Context, "Landroid/content/Context;")
namespace QNativeInterface
{
-#if defined(Q_OS_ANDROID) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_ANDROID) || defined(Q_QDOC)
struct Q_CORE_EXPORT QAndroidApplication
{
QT_DECLARE_NATIVE_INTERFACE(QAndroidApplication, 1, QCoreApplication)
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
static jobject context();
#else
static QtJniTypes::Context context();
diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h
index 81cd30203a..b92c808c28 100644
--- a/src/corelib/kernel/qmetaobject.h
+++ b/src/corelib/kernel/qmetaobject.h
@@ -136,7 +136,7 @@ public:
#endif
template <typename... Args>
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
@@ -150,7 +150,7 @@ public:
}
template <typename... Args>
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
@@ -161,7 +161,7 @@ public:
}
template <typename... Args>
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
@@ -172,7 +172,7 @@ public:
}
template <typename... Args>
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
@@ -183,7 +183,7 @@ public:
}
template <typename... Args>
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
@@ -196,7 +196,7 @@ public:
}
template <typename... Args>
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index f6eb4536a4..c6752205e2 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -310,7 +310,7 @@ To convertImplicit(const From& from)
class Q_CORE_EXPORT QMetaType {
public:
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
// The code that actually gets compiled.
enum Type {
// these are merged with QVariant
@@ -719,7 +719,7 @@ public:
static bool hasRegisteredMutableViewFunction(QMetaType fromType, QMetaType toType);
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template<typename, bool> friend struct QtPrivate::SequentialValueTypeIsMetaType;
template<typename, bool> friend struct QtPrivate::AssociativeValueTypeIsMetaType;
template<typename, bool> friend struct QtPrivate::IsMetaTypePair;
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 358f151495..075529571f 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -101,7 +101,7 @@ public:
virtual bool event(QEvent *event);
virtual bool eventFilter(QObject *watched, QEvent *event);
-#if defined(QT_NO_TRANSLATION) || defined(Q_CLANG_QDOC)
+#if defined(QT_NO_TRANSLATION) || defined(Q_QDOC)
static QString tr(const char *sourceText, const char * = nullptr, int = -1)
{ return QString::fromUtf8(sourceText); }
#endif // QT_NO_TRANSLATION
@@ -188,7 +188,7 @@ public:
inline QMetaObject::Connection connect(const QObject *sender, const char *signal,
const char *member, Qt::ConnectionType type = Qt::AutoConnection) const;
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template<typename PointerToMemberFunction>
static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type = Qt::AutoConnection);
template<typename PointerToMemberFunction, typename Functor>
@@ -311,7 +311,7 @@ public:
typename SignalType::ReturnType>(std::move(slot)),
type, types, &SignalType::Object::staticMetaObject);
}
-#endif //Q_CLANG_QDOC
+#endif //Q_QDOC
static bool disconnect(const QObject *sender, const char *signal,
const QObject *receiver, const char *member);
@@ -324,7 +324,7 @@ public:
{ return disconnect(this, nullptr, receiver, member); }
static bool disconnect(const QMetaObject::Connection &);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template<typename PointerToMemberFunction>
static bool disconnect(const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method);
#else
@@ -357,7 +357,7 @@ public:
return disconnectImpl(sender, reinterpret_cast<void **>(&signal), receiver, zero,
&SignalType::Object::staticMetaObject);
}
-#endif //Q_CLANG_QDOC
+#endif //Q_QDOC
void dumpObjectTree() const;
void dumpObjectInfo() const;
@@ -466,7 +466,7 @@ qobject_iid_cast(const QObject *object)
return qobject_iid_cast<std::remove_cv_t<T>>(o);
}
-#if defined(Q_CLANG_QDOC)
+#if defined(Q_QDOC)
# define Q_DECLARE_INTERFACE(IFace, IId)
#elif !defined(Q_MOC_RUN)
# define Q_DECLARE_INTERFACE(IFace, IId) \
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index 845e44882d..673d588e32 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -233,7 +233,7 @@ struct Q_CORE_EXPORT QMetaObject
{ return const_cast<QObject *>(cast(const_cast<const QObject *>(obj))); }
const QObject *cast(const QObject *obj) const;
-#if !defined(QT_NO_TRANSLATION) || defined(Q_CLANG_QDOC)
+#if !defined(QT_NO_TRANSLATION) || defined(Q_QDOC)
QString tr(const char *s, const char *c, int n = -1) const;
#endif // QT_NO_TRANSLATION
@@ -355,7 +355,7 @@ struct Q_CORE_EXPORT QMetaObject
#endif // Qt < 7.0
template <typename... Args> static
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
@@ -369,7 +369,7 @@ struct Q_CORE_EXPORT QMetaObject
}
template <typename... Args> static
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
@@ -381,7 +381,7 @@ struct Q_CORE_EXPORT QMetaObject
}
template <typename... Args> static
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
@@ -393,7 +393,7 @@ struct Q_CORE_EXPORT QMetaObject
}
template <typename... Args> static
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
bool
#else
QtPrivate::Invoke::IfNotOldStyleArgs<bool, Args...>
@@ -404,7 +404,7 @@ struct Q_CORE_EXPORT QMetaObject
return invokeMethod(obj, member, Qt::AutoConnection, r, std::forward<Args>(arguments)...);
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template<typename Functor, typename FunctorReturnType>
static bool invokeMethod(QObject *context, Functor function, Qt::ConnectionType type = Qt::AutoConnection, FunctorReturnType *ret = nullptr);
template<typename Functor, typename FunctorReturnType>
@@ -499,7 +499,7 @@ struct Q_CORE_EXPORT QMetaObject
#endif
template <typename... Args>
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
QObject *
#else
QtPrivate::Invoke::IfNotOldStyleArgs<QObject *, Args...>
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
index fbd838654f..c376fd9b2b 100644
--- a/src/corelib/kernel/qproperty.h
+++ b/src/corelib/kernel/qproperty.h
@@ -13,7 +13,7 @@
#include <QtCore/qpropertyprivate.h>
-#if __has_include(<source_location>) && __cplusplus >= 202002L && !defined(Q_CLANG_QDOC)
+#if __has_include(<source_location>) && __cplusplus >= 202002L && !defined(Q_QDOC)
#include <source_location>
#if defined(__cpp_lib_source_location)
#define QT_SOURCE_LOCATION_NAMESPACE std
@@ -22,7 +22,7 @@
#endif
#endif
-#if __has_include(<experimental/source_location>) && !defined(Q_CLANG_QDOC)
+#if __has_include(<experimental/source_location>) && !defined(Q_QDOC)
#include <experimental/source_location>
#if !defined(QT_PROPERTY_COLLECT_BINDING_LOCATION)
#if defined(__cpp_lib_experimental_source_location)
@@ -334,7 +334,7 @@ public:
explicit QProperty(const QPropertyBinding<T> &binding)
: QProperty()
{ setBinding(binding); }
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Functor>
explicit QProperty(Functor &&f, const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
typename std::enable_if_t<std::is_invocable_r_v<T, Functor&>> * = nullptr)
@@ -417,7 +417,7 @@ public:
return true;
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Functor>
QPropertyBinding<T> setBinding(Functor &&f,
const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
@@ -759,7 +759,7 @@ public:
#endif
return QPropertyBinding<T>();
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Functor>
QPropertyBinding<T> setBinding(Functor &&f,
const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
@@ -861,7 +861,7 @@ public:
return QBindable<T>(aliasedProperty(), iface).setBinding(newBinding);
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Functor>
QPropertyBinding<T> setBinding(Functor &&f,
const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
@@ -951,7 +951,7 @@ public:
explicit QObjectBindableProperty(const QPropertyBinding<T> &binding)
: QObjectBindableProperty()
{ setBinding(binding); }
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Functor>
explicit QObjectBindableProperty(Functor &&f, const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
typename std::enable_if_t<std::is_invocable_r_v<T, Functor&>> * = nullptr)
@@ -1044,7 +1044,7 @@ public:
return true;
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Functor>
QPropertyBinding<T> setBinding(Functor &&f,
const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
diff --git a/src/corelib/kernel/qproperty_p.h b/src/corelib/kernel/qproperty_p.h
index 2fa6cfca0c..38380f0207 100644
--- a/src/corelib/kernel/qproperty_p.h
+++ b/src/corelib/kernel/qproperty_p.h
@@ -570,7 +570,7 @@ public:
return true;
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Functor>
QPropertyBinding<T> setBinding(Functor &&f,
const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h
index 00c06186c3..5599b60bd7 100644
--- a/src/corelib/kernel/qtimer.h
+++ b/src/corelib/kernel/qtimer.h
@@ -49,7 +49,7 @@ public:
static void singleShot(int msec, const QObject *receiver, const char *member);
static void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member);
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template<typename PointerToMemberFunction>
static void singleShot(int msec, const QObject *receiver, PointerToMemberFunction method);
template<typename PointerToMemberFunction>
diff --git a/src/corelib/kernel/qtmetamacros.h b/src/corelib/kernel/qtmetamacros.h
index 79e3375ed5..1ce6a49bde 100644
--- a/src/corelib/kernel/qtmetamacros.h
+++ b/src/corelib/kernel/qtmetamacros.h
@@ -89,7 +89,7 @@ QT_BEGIN_NAMESPACE
# define QT_TR_FUNCTIONS
#endif
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
#define QT_TR_FUNCTIONS
#endif
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 98193cfc4e..844ad3cd65 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -429,7 +429,7 @@ public:
}
template<typename T>
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
static inline auto fromValue(const T &value)
noexcept(std::is_nothrow_copy_constructible_v<T> && Private::CanUseInternalSpace<T>)
-> std::enable_if_t<std::is_copy_constructible_v<T> && std::is_destructible_v<T>, QVariant>
diff --git a/src/corelib/kernel/qwineventnotifier.h b/src/corelib/kernel/qwineventnotifier.h
index 560a5ab965..bd0ece1f5b 100644
--- a/src/corelib/kernel/qwineventnotifier.h
+++ b/src/corelib/kernel/qwineventnotifier.h
@@ -6,7 +6,7 @@
#include "QtCore/qobject.h"
-#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_WIN) || defined(Q_QDOC)
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/plugin/qfactoryinterface.h b/src/corelib/plugin/qfactoryinterface.h
index f95c8ce330..098b7d4201 100644
--- a/src/corelib/plugin/qfactoryinterface.h
+++ b/src/corelib/plugin/qfactoryinterface.h
@@ -15,7 +15,7 @@ struct Q_CORE_EXPORT QFactoryInterface
virtual QStringList keys() const = 0;
};
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
Q_DECLARE_INTERFACE(QFactoryInterface, "org.qt-project.Qt.QFactoryInterface")
#endif
diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h
index 376b06c726..64aa891ba1 100644
--- a/src/corelib/plugin/quuid.h
+++ b/src/corelib/plugin/quuid.h
@@ -6,7 +6,7 @@
#include <QtCore/qstring.h>
-#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_WIN) || defined(Q_QDOC)
#ifndef GUID_DEFINED
#define GUID_DEFINED
typedef struct _GUID
@@ -19,7 +19,7 @@ typedef struct _GUID
#endif
#endif
-#if defined(Q_OS_DARWIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
Q_FORWARD_DECLARE_CF_TYPE(CFUUID);
Q_FORWARD_DECLARE_OBJC_CLASS(NSUUID);
#endif
@@ -101,7 +101,7 @@ public:
bool operator<(const QUuid &other) const noexcept;
bool operator>(const QUuid &other) const noexcept;
-#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_WIN) || defined(Q_QDOC)
// On Windows we have a type GUID that is used by the platform API, so we
// provide convenience operators to cast from and to this type.
constexpr QUuid(const GUID &guid) noexcept
@@ -151,7 +151,7 @@ public:
QUuid::Variant variant() const noexcept;
QUuid::Version version() const noexcept;
-#if defined(Q_OS_DARWIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
static QUuid fromCFUUID(CFUUIDRef uuid);
CFUUIDRef toCFUUID() const Q_DECL_CF_RETURNS_RETAINED;
static QUuid fromNSUUID(const NSUUID *uuid);
diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h
index 20541725ec..8d89e4bb45 100644
--- a/src/corelib/serialization/qdatastream.h
+++ b/src/corelib/serialization/qdatastream.h
@@ -404,7 +404,7 @@ typename std::enable_if_t<std::is_enum<T>::value, QDataStream &>
operator>>(QDataStream &s, T &t)
{ return s >> reinterpret_cast<typename std::underlying_type<T>::type &>(t); }
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template<typename T>
inline QDataStreamIfHasIStreamOperatorsContainer<QList<T>, T> operator>>(QDataStream &s, QList<T> &v)
@@ -537,7 +537,7 @@ QDataStream &operator>>(QDataStream& s, std::pair<T1, T2> &p);
template <class T1, class T2>
QDataStream &operator<<(QDataStream& s, const std::pair<T1, T2> &p);
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
inline QDataStream &operator>>(QDataStream &s, QKeyCombination &combination)
{
diff --git a/src/corelib/serialization/qjsondocument.cpp b/src/corelib/serialization/qjsondocument.cpp
index a77aab3895..01df13d097 100644
--- a/src/corelib/serialization/qjsondocument.cpp
+++ b/src/corelib/serialization/qjsondocument.cpp
@@ -251,7 +251,7 @@ QVariant QJsonDocument::toVariant() const
\sa fromJson(), JsonFormat
*/
-#if !defined(QT_JSON_READONLY) || defined(Q_CLANG_QDOC)
+#if !defined(QT_JSON_READONLY) || defined(Q_QDOC)
QByteArray QJsonDocument::toJson(JsonFormat format) const
{
QByteArray json;
diff --git a/src/corelib/serialization/qjsondocument.h b/src/corelib/serialization/qjsondocument.h
index e580c0122d..350c6bb76d 100644
--- a/src/corelib/serialization/qjsondocument.h
+++ b/src/corelib/serialization/qjsondocument.h
@@ -80,7 +80,7 @@ public:
static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = nullptr);
-#if !defined(QT_JSON_READONLY) || defined(Q_CLANG_QDOC)
+#if !defined(QT_JSON_READONLY) || defined(Q_QDOC)
QByteArray toJson(JsonFormat format = Indented) const;
#endif
diff --git a/src/corelib/text/qanystringview.h b/src/corelib/text/qanystringview.h
index 2f8291b168..bdb2387ebb 100644
--- a/src/corelib/text/qanystringview.h
+++ b/src/corelib/text/qanystringview.h
@@ -163,7 +163,7 @@ public:
constexpr QAnyStringView(const Char *f, const Char *l)
: QAnyStringView(f, l - f) {}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename Char, size_t N>
constexpr QAnyStringView(const Char (&array)[N]) noexcept;
diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h
index d73224cf17..1079555c84 100644
--- a/src/corelib/text/qbytearray.h
+++ b/src/corelib/text/qbytearray.h
@@ -173,7 +173,7 @@ public:
void truncate(qsizetype pos);
void chop(qsizetype n);
-#if !defined(Q_CLANG_QDOC)
+#if !defined(Q_QDOC)
[[nodiscard]] QByteArray toLower() const &
{ return toLower_helper(*this); }
[[nodiscard]] QByteArray toLower() &&
diff --git a/src/corelib/text/qbytearraylist.h b/src/corelib/text/qbytearraylist.h
index 59df569456..f5302884f1 100644
--- a/src/corelib/text/qbytearraylist.h
+++ b/src/corelib/text/qbytearraylist.h
@@ -19,7 +19,7 @@ typedef QListIterator<QByteArray> QByteArrayListIterator;
typedef QMutableListIterator<QByteArray> QMutableByteArrayListIterator;
#endif
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
namespace QtPrivate {
#if QT_CORE_REMOVED_SINCE(6, 3) && QT_POINTER_SIZE != 4
@@ -29,13 +29,13 @@ namespace QtPrivate {
}
#endif
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
class QByteArrayList : public QList<QByteArray>
#else
template <> struct QListSpecialMethods<QByteArray> : QListSpecialMethodsBase<QByteArray>
#endif
{
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
protected:
~QListSpecialMethods() = default;
#endif
diff --git a/src/corelib/text/qchar.h b/src/corelib/text/qchar.h
index 904611d87d..e9f0cf3346 100644
--- a/src/corelib/text/qchar.h
+++ b/src/corelib/text/qchar.h
@@ -81,7 +81,7 @@ public:
constexpr Q_IMPLICIT QChar(SpecialCharacter s) noexcept : ucs(char16_t(s)) {}
constexpr Q_IMPLICIT QChar(QLatin1Char ch) noexcept : ucs(ch.unicode()) {}
constexpr Q_IMPLICIT QChar(char16_t ch) noexcept : ucs(ch) {}
-#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
+#if defined(Q_OS_WIN) || defined(Q_QDOC)
constexpr Q_IMPLICIT QChar(wchar_t ch) noexcept : ucs(char16_t(ch)) {}
#endif
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h
index 512fa489f9..d30bc0b851 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -51,7 +51,7 @@ namespace QtPrivate {
template <bool...B> class BoolList;
}
-#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_CLANG_QDOC)
+#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_QDOC)
# define Q_L1S_VIEW_IS_PRIMARY
class QLatin1StringView
#else
@@ -443,7 +443,7 @@ public:
QString(QChar c);
QString(qsizetype size, QChar c);
inline QString(QLatin1StringView latin1);
-#if defined(__cpp_char8_t) || defined(Q_CLANG_QDOC)
+#if defined(__cpp_char8_t) || defined(Q_QDOC)
Q_WEAK_OVERLOAD
inline QString(const char8_t *str)
: QString(fromUtf8(str))
@@ -536,7 +536,7 @@ private:
public:
template <typename...Args>
[[nodiscard]]
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
QString
#else
typename std::enable_if<
@@ -646,7 +646,7 @@ public:
[[nodiscard]] QString leftJustified(qsizetype width, QChar fill = u' ', bool trunc = false) const;
[[nodiscard]] QString rightJustified(qsizetype width, QChar fill = u' ', bool trunc = false) const;
-#if !defined(Q_CLANG_QDOC)
+#if !defined(Q_QDOC)
[[nodiscard]] QString toLower() const &
{ return toLower_helper(*this); }
[[nodiscard]] QString toLower() &&
@@ -772,7 +772,7 @@ public:
const ushort *utf16() const; // ### Qt 7 char16_t
-#if !defined(Q_CLANG_QDOC)
+#if !defined(Q_QDOC)
[[nodiscard]] QByteArray toLatin1() const &
{ return toLatin1_helper(*this); }
[[nodiscard]] QByteArray toLatin1() &&
@@ -807,7 +807,7 @@ public:
{
return fromUtf8(QByteArrayView(utf8, !utf8 || size < 0 ? qstrlen(utf8) : size));
}
-#if defined(__cpp_char8_t) || defined(Q_CLANG_QDOC)
+#if defined(__cpp_char8_t) || defined(Q_QDOC)
Q_WEAK_OVERLOAD
static inline QString fromUtf8(const char8_t *str)
{ return fromUtf8(reinterpret_cast<const char *>(str)); }
diff --git a/src/corelib/text/qstringfwd.h b/src/corelib/text/qstringfwd.h
index d7be5f11db..2e3c9e8248 100644
--- a/src/corelib/text/qstringfwd.h
+++ b/src/corelib/text/qstringfwd.h
@@ -26,7 +26,7 @@ QT_END_NO_CHAR8_T_NAMESPACE
class QByteArray;
class QByteArrayView;
-#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_CLANG_QDOC)
+#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_QDOC)
class QLatin1StringView;
using QLatin1String = QLatin1StringView;
#else
@@ -40,7 +40,7 @@ class QChar;
class QRegularExpression;
class QRegularExpressionMatch;
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
// ### Qt 7: remove the non-char8_t version of QUtf8StringView
QT_BEGIN_NO_CHAR8_T_NAMESPACE
using QUtf8StringView = QBasicUtf8StringView<false>;
@@ -49,7 +49,7 @@ QT_END_NO_CHAR8_T_NAMESPACE
QT_BEGIN_HAS_CHAR8_T_NAMESPACE
using QUtf8StringView = QBasicUtf8StringView<true>;
QT_END_HAS_CHAR8_T_NAMESPACE
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
QT_END_NAMESPACE
diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h
index d820ec8ad0..2015927f19 100644
--- a/src/corelib/text/qstringview.h
+++ b/src/corelib/text/qstringview.h
@@ -150,7 +150,7 @@ public:
constexpr QStringView(const Char *f, const Char *l)
: QStringView(f, l - f) {}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename Char, size_t N>
constexpr QStringView(const Char (&array)[N]) noexcept;
@@ -163,7 +163,7 @@ public:
: QStringView(str, str ? lengthHelperPointer(str) : 0) {}
#endif
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
QStringView(const QString &str) noexcept;
#else
template <typename String, if_compatible_qstring_like<String> = true>
diff --git a/src/corelib/text/qutf8stringview.h b/src/corelib/text/qutf8stringview.h
index 232b6f43f7..3baac9c885 100644
--- a/src/corelib/text/qutf8stringview.h
+++ b/src/corelib/text/qutf8stringview.h
@@ -83,7 +83,7 @@ struct wrap_char { using type = char; };
} // namespace QtPrivate
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
#define QBasicUtf8StringView QUtf8StringView
#else
template <bool UseChar8T>
@@ -91,7 +91,7 @@ template <bool UseChar8T>
class QBasicUtf8StringView
{
public:
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
using storage_type = typename std::conditional<UseChar8T,
QtPrivate::hide_char8_t,
QtPrivate::wrap_char
@@ -162,7 +162,7 @@ public:
constexpr QBasicUtf8StringView(const Char *f, const Char *l)
: QBasicUtf8StringView(f, l - f) {}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename Char, size_t N>
constexpr QBasicUtf8StringView(const Char (&array)[N]) noexcept;
@@ -175,7 +175,7 @@ public:
str ? std::char_traits<std::remove_cv_t<std::remove_pointer_t<Pointer>>>::length(str) : 0) {}
#endif
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
QBasicUtf8StringView(const QByteArray &str) noexcept;
#else
template <typename String, if_compatible_qstring_like<String> = true>
@@ -200,7 +200,7 @@ public:
[[nodiscard]] constexpr qsizetype size() const noexcept { return m_size; }
[[nodiscard]] const_pointer data() const noexcept { return reinterpret_cast<const_pointer>(m_data); }
-#if defined(__cpp_char8_t) || defined(Q_CLANG_QDOC)
+#if defined(__cpp_char8_t) || defined(Q_QDOC)
[[nodiscard]] const char8_t *utf8() const noexcept { return reinterpret_cast<const char8_t*>(m_data); }
#endif
@@ -321,12 +321,12 @@ private:
qsizetype m_size;
};
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
#undef QBasicUtf8StringView
#else
template <bool UseChar8T>
Q_DECLARE_TYPEINFO_BODY(QBasicUtf8StringView<UseChar8T>, Q_PRIMITIVE_TYPE);
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
template <typename QStringLike, std::enable_if_t<std::is_same_v<QStringLike, QByteArray>, bool> = true>
[[nodiscard]] inline q_no_char8_t::QUtf8StringView qToUtf8StringViewIgnoringNull(const QStringLike &s) noexcept
diff --git a/src/corelib/text/qvsnprintf.cpp b/src/corelib/text/qvsnprintf.cpp
index 4e6845ad1c..839fc24217 100644
--- a/src/corelib/text/qvsnprintf.cpp
+++ b/src/corelib/text/qvsnprintf.cpp
@@ -10,7 +10,7 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_VSNPRINTF) || defined(Q_CLANG_QDOC)
+#if !defined(QT_VSNPRINTF) || defined(Q_QDOC)
/*!
\relates QByteArray
diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h
index e0e9ca947c..24f2616e82 100644
--- a/src/corelib/thread/qatomic.h
+++ b/src/corelib/thread/qatomic.h
@@ -34,7 +34,7 @@ public:
return *this;
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
T loadRelaxed() const;
T loadAcquire() const;
void storeRelaxed(T newValue);
diff --git a/src/corelib/thread/qexception.cpp b/src/corelib/thread/qexception.cpp
index 6b066c3075..a623dc1c6e 100644
--- a/src/corelib/thread/qexception.cpp
+++ b/src/corelib/thread/qexception.cpp
@@ -4,7 +4,7 @@
#include "qexception.h"
#include "QtCore/qshareddata.h"
-#if !defined(QT_NO_EXCEPTIONS) || defined(Q_CLANG_QDOC)
+#if !defined(QT_NO_EXCEPTIONS) || defined(Q_QDOC)
QT_BEGIN_NAMESPACE
@@ -180,7 +180,7 @@ QUnhandledException *QUnhandledException::clone() const
return new QUnhandledException(*this);
}
-#if !defined(Q_CLANG_QDOC)
+#if !defined(Q_QDOC)
namespace QtPrivate {
@@ -224,7 +224,7 @@ void ExceptionStore::rethrowException() const
} // namespace QtPrivate
-#endif //Q_CLANG_QDOC
+#endif //Q_QDOC
QT_END_NAMESPACE
diff --git a/src/corelib/thread/qexception.h b/src/corelib/thread/qexception.h
index b9c9c58494..62b9e70bea 100644
--- a/src/corelib/thread/qexception.h
+++ b/src/corelib/thread/qexception.h
@@ -16,7 +16,7 @@ QT_REQUIRE_CONFIG(future);
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_EXCEPTIONS) || defined(Q_CLANG_QDOC)
+#if !defined(QT_NO_EXCEPTIONS) || defined(Q_QDOC)
class Q_CORE_EXPORT QException : public std::exception
{
diff --git a/src/corelib/thread/qfuture.h b/src/corelib/thread/qfuture.h
index 5b618e5acb..34fb8a039d 100644
--- a/src/corelib/thread/qfuture.h
+++ b/src/corelib/thread/qfuture.h
@@ -55,7 +55,7 @@ public:
return *this;
}
-#if defined(Q_CLANG_QDOC)
+#if defined(Q_QDOC)
~QFuture() { }
QFuture(const QFuture<T> &) { }
QFuture<T> & operator=(const QFuture<T> &) { }
@@ -155,7 +155,7 @@ QT_WARNING_POP
template<class Function, typename = std::enable_if_t<std::is_invocable_r_v<T, Function>>>
QFuture<T> onCanceled(QObject *context, Function &&handler);
-#if !defined(Q_CLANG_QDOC)
+#if !defined(Q_QDOC)
template<class U = T, typename = std::enable_if_t<QtPrivate::isQFutureV<U>>>
auto unwrap();
#else
@@ -445,7 +445,7 @@ struct MetaTypeQFutureHelper<QFuture<T>>
namespace QtFuture {
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template<typename OutputSequence, typename InputIt,
typename ValueType = typename std::iterator_traits<InputIt>::value_type,
@@ -520,7 +520,7 @@ QFuture<QtFuture::WhenAnyResult<T>> whenAny(InputIt first, InputIt last);
template<typename... Futures>
QFuture<std::variant<std::decay_t<Futures>...>> whenAny(Futures &&... futures);
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
} // namespace QtFuture
diff --git a/src/corelib/thread/qfuture_impl.h b/src/corelib/thread/qfuture_impl.h
index 8e96b943ef..6bf3a7406a 100644
--- a/src/corelib/thread/qfuture_impl.h
+++ b/src/corelib/thread/qfuture_impl.h
@@ -960,7 +960,7 @@ static QFuture<std::decay_t<T>> makeReadyFuture(T &&value)
return promise.future();
}
-#if defined(Q_CLANG_QDOC)
+#if defined(Q_QDOC)
static QFuture<void> makeReadyFuture()
#else
template<typename T = void>
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h
index ab531ef70e..af77f556fd 100644
--- a/src/corelib/thread/qmutex.h
+++ b/src/corelib/thread/qmutex.h
@@ -17,7 +17,7 @@ class tst_QMutex;
QT_BEGIN_NAMESPACE
-#if QT_CONFIG(thread) || defined(Q_CLANG_QDOC)
+#if QT_CONFIG(thread) || defined(Q_QDOC)
#if defined(Q_OS_LINUX) || defined(Q_OS_WIN) // these platforms use futex
# define QT_MUTEX_LOCK_NOEXCEPT noexcept
@@ -289,7 +289,7 @@ private:
bool m_isLocked = false;
};
-#else // !QT_CONFIG(thread) && !Q_CLANG_QDOC
+#else // !QT_CONFIG(thread) && !Q_QDOC
class QMutex
{
@@ -339,7 +339,7 @@ private:
typedef QMutex QBasicMutex;
-#endif // !QT_CONFIG(thread) && !Q_CLANG_QDOC
+#endif // !QT_CONFIG(thread) && !Q_QDOC
QT_END_NAMESPACE
diff --git a/src/corelib/thread/qpromise.h b/src/corelib/thread/qpromise.h
index 43c30582be..5620811bae 100644
--- a/src/corelib/thread/qpromise.h
+++ b/src/corelib/thread/qpromise.h
@@ -79,7 +79,7 @@ public:
d.swap(other.d);
}
-#if defined(Q_CLANG_QDOC) // documentation-only simplified signatures
+#if defined(Q_QDOC) // documentation-only simplified signatures
bool addResult(const T &result, int index = -1) { }
bool addResult(T &&result, int index = -1) { }
#endif
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h
index d856d8daa8..e9af85ee99 100644
--- a/src/corelib/thread/qthread.h
+++ b/src/corelib/thread/qthread.h
@@ -69,7 +69,7 @@ public:
bool event(QEvent *event) override;
int loopLevel() const;
-#if QT_CONFIG(cxx11_future) || defined(Q_CLANG_QDOC)
+#if QT_CONFIG(cxx11_future) || defined(Q_QDOC)
template <typename Function, typename... Args>
[[nodiscard]] static QThread *create(Function &&f, Args &&... args);
#endif
diff --git a/src/corelib/tools/qcontainerfwd.h b/src/corelib/tools/qcontainerfwd.h
index c8d791f200..b876c4648f 100644
--- a/src/corelib/tools/qcontainerfwd.h
+++ b/src/corelib/tools/qcontainerfwd.h
@@ -28,7 +28,7 @@ template <typename T> class QStack;
template <typename T, qsizetype Prealloc = 256> class QVarLengthArray;
template <typename T> class QList;
class QString;
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template<typename T> using QVector = QList<T>;
using QStringList = QList<QString>;
class QByteArray;
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index 70703fe0ab..98fa82fda9 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -63,7 +63,7 @@ public:
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QContiguousCache)
void swap(QContiguousCache &other) noexcept { qt_ptr_swap(d, other.d); }
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename U = T>
QTypeTraits::compare_eq_result<U> operator==(const QContiguousCache<T> &other) const
{
@@ -85,7 +85,7 @@ public:
#else
bool operator==(const QContiguousCache &other) const;
bool operator!=(const QContiguousCache &other) const;
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
inline qsizetype capacity() const {return d->alloc; }
inline qsizetype count() const { return d->count; }
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 5aa0acd9ea..2d2061c707 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -1440,7 +1440,7 @@ size_t qHash(double key, size_t seed) noexcept
}
}
-#if !defined(Q_OS_DARWIN) || defined(Q_CLANG_QDOC)
+#if !defined(Q_OS_DARWIN) || defined(Q_QDOC)
/*! \relates QHash
\since 5.3
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 9b27415244..eedb594e26 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -891,7 +891,7 @@ public:
#endif
void swap(QHash &other) noexcept { qt_ptr_swap(d, other.d); }
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename AKey = Key, typename AT = T>
QTypeTraits::compare_eq_result_container<QHash, AKey, AT> operator==(const QHash &other) const noexcept
{
@@ -914,7 +914,7 @@ public:
#else
bool operator==(const QHash &other) const;
bool operator!=(const QHash &other) const;
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
inline qsizetype size() const noexcept { return d ? qsizetype(d->size) : 0; }
inline bool isEmpty() const noexcept { return !d || d->size == 0; }
@@ -1438,7 +1438,7 @@ public:
std::swap(m_size, other.m_size);
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename AKey = Key, typename AT = T>
QTypeTraits::compare_eq_result_container<QMultiHash, AKey, AT> operator==(const QMultiHash &other) const noexcept
{
@@ -1479,7 +1479,7 @@ public:
#else
bool operator==(const QMultiHash &other) const;
bool operator!=(const QMultiHash &other) const;
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
inline qsizetype size() const noexcept { return m_size; }
diff --git a/src/corelib/tools/qhashfunctions.h b/src/corelib/tools/qhashfunctions.h
index c946cc61bc..029d98674c 100644
--- a/src/corelib/tools/qhashfunctions.h
+++ b/src/corelib/tools/qhashfunctions.h
@@ -120,7 +120,7 @@ Q_DECL_CONST_FUNCTION inline size_t qHash(float key, size_t seed = 0) noexcept
return QHashPrivate::hash(k, seed);
}
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION size_t qHash(double key, size_t seed = 0) noexcept;
-#if !defined(Q_OS_DARWIN) || defined(Q_CLANG_QDOC)
+#if !defined(Q_OS_DARWIN) || defined(Q_QDOC)
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION size_t qHash(long double key, size_t seed = 0) noexcept;
#endif
Q_DECL_CONST_FUNCTION constexpr inline size_t qHash(wchar_t key, size_t seed = 0) noexcept
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index ce161f62a1..2856510d93 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -317,7 +317,7 @@ public:
void swap(QList &other) noexcept { d.swap(other.d); }
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename U = T>
QTypeTraits::compare_eq_result_container<QList, U> operator==(const QList &other) const
{
@@ -373,7 +373,7 @@ public:
bool operator>(const QList &other) const;
bool operator<=(const QList &other) const;
bool operator>=(const QList &other) const;
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
qsizetype size() const noexcept { return d->size; }
qsizetype count() const noexcept { return size(); }
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index 9ba01bee2c..1a6506348f 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -240,7 +240,7 @@ public:
return {};
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename AKey = Key, typename AT = T> friend
QTypeTraits::compare_eq_result_container<QMap, AKey, AT> operator==(const QMap &lhs, const QMap &rhs)
{
@@ -261,7 +261,7 @@ public:
#else
friend bool operator==(const QMap &lhs, const QMap &rhs);
friend bool operator!=(const QMap &lhs, const QMap &rhs);
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
size_type size() const { return d ? size_type(d->m.size()) : size_type(0); }
@@ -885,7 +885,7 @@ public:
return {};
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename AKey = Key, typename AT = T> friend
QTypeTraits::compare_eq_result_container<QMultiMap, AKey, AT> operator==(const QMultiMap &lhs, const QMultiMap &rhs)
{
@@ -906,7 +906,7 @@ public:
#else
friend bool operator==(const QMultiMap &lhs, const QMultiMap &rhs);
friend bool operator!=(const QMultiMap &lhs, const QMultiMap &rhs);
-#endif // Q_CLANG_QDOC
+#endif // Q_QDOC
size_type size() const { return d ? size_type(d->m.size()) : size_type(0); }
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h
index 2981bffa35..a59670ccca 100644
--- a/src/corelib/tools/qset.h
+++ b/src/corelib/tools/qset.h
@@ -35,7 +35,7 @@ public:
inline void swap(QSet<T> &other) noexcept { q_hash.swap(other.q_hash); }
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename U = T>
QTypeTraits::compare_eq_result_container<QSet, U> operator==(const QSet<T> &other) const
{ return q_hash == other.q_hash; }