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/corelib/io/qfile.h | |
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/corelib/io/qfile.h')
-rw-r--r-- | src/corelib/io/qfile.h | 26 |
1 files changed, 13 insertions, 13 deletions
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) |