Commit 2795c0a1 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files
parent 3590453b
...@@ -104,11 +104,17 @@ void PartTest::testFd(bool runShell) ...@@ -104,11 +104,17 @@ void PartTest::testFd(bool runShell)
// test that the 2nd argument of openTeletype is optional, // test that the 2nd argument of openTeletype is optional,
// to run without shell // to run without shell
auto optArgRunShell = runShell ? QGenericArgument() : Q_ARG(bool, false); if (runShell) {
// connect to an existing pty // connect to an existing pty
bool result = QMetaObject::invokeMethod(terminalPart, "openTeletype", bool result = QMetaObject::invokeMethod(terminalPart, "openTeletype",
Qt::DirectConnection, Q_ARG(int, fd), optArgRunShell); Qt::DirectConnection, Q_ARG(int, fd));
QVERIFY(result); QVERIFY(result);
} else {
// test the optional 2nd argument of openTeletype, to run without shell
bool result = QMetaObject::invokeMethod(terminalPart, "openTeletype",
Qt::DirectConnection, Q_ARG(int, fd), Q_ARG(bool, false));
QVERIFY(result);
}
// suspend the KPtyDevice so that the embedded terminal gets a chance to // suspend the KPtyDevice so that the embedded terminal gets a chance to
// read from the pty. Otherwise the KPtyDevice will simply read everything // read from the pty. Otherwise the KPtyDevice will simply read everything
......
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