summaryrefslogtreecommitdiffstats
path: root/src/corelib/compat
diff options
context:
space:
mode:
authorRym Bouabid <rym.bouabid@qt.io>2024-02-13 18:22:06 +0100
committerRym Bouabid <rym.bouabid@qt.io>2024-02-22 13:37:41 +0100
commit22ebe86f1511f7f06031df1da030b78c1e8092c9 (patch)
tree0ed3790749530366d0a129c7eeb4dd3f2dacd42a /src/corelib/compat
parent14b058048247098ba4d81427290f2a083d513dc2 (diff)
QProcessEnvironment: Use new comparison helper macros
QProcessEnvironment had operator==() and operator!=() defined as public member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of these methods and replace them with a hidden friend. Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests. Use new \compares command in the documentation to describe the comparison operators provided by QProcessEnvironment. Task-number: QTBUG-120303 Change-Id: I4c57f6cfb9589e82a37eea6993e079212b34cecd Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/corelib/compat')
-rw-r--r--src/corelib/compat/removed_api.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp
index 0553d32807..405f22e3d9 100644
--- a/src/corelib/compat/removed_api.cpp
+++ b/src/corelib/compat/removed_api.cpp
@@ -938,6 +938,15 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo) const
return comparesEqual(*this, fileinfo);
}
+#if QT_CONFIG(processenvironment)
+#include "qprocess.h" // inlined API
+
+bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
+{
+ return comparesEqual(*this, other);
+}
+#endif // QT_CONFIG(processenvironment)
+
// #include "qotherheader.h"
// // implement removed functions from qotherheader.h
// order sections alphabetically to reduce chances of merge conflicts