summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qprocess.cpp3
-rw-r--r--src/corelib/io/qprocess.h4
-rw-r--r--src/testlib/qbenchmarkvalgrind.cpp2
-rw-r--r--tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp2
5 files changed, 8 insertions, 5 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 00b5cb9df6..1c7ea36105 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1623,7 +1623,7 @@ void QProcess::setWorkingDirectory(const QString &dir)
d->workingDirectory = dir;
}
-
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\deprecated
Use processId() instead.
@@ -1640,6 +1640,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 541086e1b0..101bfcc384 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -222,8 +222,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);
diff --git a/src/testlib/qbenchmarkvalgrind.cpp b/src/testlib/qbenchmarkvalgrind.cpp
index 44888c4d30..29cbcd8e3c 100644
--- a/src/testlib/qbenchmarkvalgrind.cpp
+++ b/src/testlib/qbenchmarkvalgrind.cpp
@@ -187,7 +187,7 @@ bool QBenchmarkValgrindUtils::runCallgrindSubProcess(const QStringList &origAppA
process.start(QLatin1String("valgrind"), args);
process.waitForStarted(-1);
QBenchmarkGlobalData::current->callgrindOutFileBase =
- QBenchmarkValgrindUtils::outFileBase(process.pid());
+ QBenchmarkValgrindUtils::outFileBase(process.processId());
const bool finishedOk = process.waitForFinished(-1);
exitCode = process.exitCode();
diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
index 42bdf3eabf..708716e7e2 100644
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
@@ -328,7 +328,7 @@ void tst_QLockFile::staleShortLockFromBusyProcess()
QString hostname, appname;
QTRY_VERIFY(secondLock.getLockInfo(&pid, &hostname, &appname));
#ifdef Q_OS_UNIX
- QCOMPARE(pid, proc.pid());
+ QCOMPARE(pid, proc.processId());
#endif
secondLock.setStaleLockTime(100);
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 1570bb9977..7703e91e37 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -216,7 +216,7 @@ void tst_QProcess::constructing()
QCOMPARE(process.environment(), QStringList());
QCOMPARE(process.error(), QProcess::UnknownError);
QCOMPARE(process.state(), QProcess::NotRunning);
- QCOMPARE(process.pid(), Q_PID(0));
+ QCOMPARE(process.processId(), 0);
QCOMPARE(process.readAllStandardOutput(), QByteArray());
QCOMPARE(process.readAllStandardError(), QByteArray());
QCOMPARE(process.canReadLine(), false);