Commit cf391316 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Use QProcess::processId() directly

The inheritance goes Pty -> KPtyProcess -> KProcess -> QProcess, so using
processId() can be done without the deprecation wrappers.
parent 5bbb4334
......@@ -72,13 +72,7 @@ void PtyTest::testRunProgram()
QCOMPARE(result, 0);
// since there is no other processes using this pty, the two methods
// should return the same pid.
#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 78, 0)
QCOMPARE(pty.foregroundProcessGroup(), pty.processId());
#else
QCOMPARE(pty.foregroundProcessGroup(), pty.pid());
#endif
}
QTEST_GUILESS_MAIN(PtyTest)
......@@ -1529,11 +1529,7 @@ void Session::setPreferredSize(const QSize& size)
int Session::processId() const
{
#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 78, 0)
return _shellProcess->processId();
#else
return _shellProcess->pid();
#endif
}
void Session::setTitle(int role , const QString& title)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment