summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-30 22:37:43 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-10-01 05:40:20 +0000
commit37f5c4a3ee314ac671c07bea6ebf5ae985013cc1 (patch)
treeacb9e4123cb23f1bf2b98d969e56acdfb48f999b /src/corelib/io
parentb92db2388497cdec153b76d0c595a6a91190dfce (diff)
Properly deprecate QProcess::pid
Address an old ### Qt 5 comment. The method has been documented as deprecated and replaced by QProcess::processId since at least Qt 5.9, so we can first properly flag it as such for 5.15.2, and remove it from Qt 6 in a follow-up commit. Change-Id: Ic4e3351740617083b16723db8eef7a341bccfbf6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 3fb8f9e44e8cbf5937257505d0bc2d1457a26da1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qprocess.cpp3
-rw-r--r--src/corelib/io/qprocess.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index f0c70af361..c9aec0202a 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1642,7 +1642,7 @@ void QProcess::setWorkingDirectory(const QString &dir)
d->workingDirectory = dir;
}
-
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\deprecated
Use processId() instead.
@@ -1659,6 +1659,7 @@ Q_PID QProcess::pid() const // ### Qt 6 remove or rename this method to processI
Q_D(const QProcess);
return d->pid;
}
+#endif
/*!
\since 5.3
diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h
index 8c55080252..1e152e4d5c 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -232,8 +232,10 @@ public:
QProcess::ProcessError error() const;
QProcess::ProcessState state() const;
- // #### Qt 5: Q_PID is a pointer on Windows and a value on Unix
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X_5_15("Use processId() instead")
Q_PID pid() const;
+#endif
qint64 processId() const;
bool waitForStarted(int msecs = 30000);