mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
konsole: suspend PTY device before opening teletype
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
60db16b570
commit
87b3437422
1 changed files with 5 additions and 4 deletions
|
@ -63,16 +63,17 @@ void PartTest::testFd()
|
|||
ptyProcess.start();
|
||||
QVERIFY(ptyProcess.waitForStarted());
|
||||
|
||||
// suspend the KPtyDevice so that the embedded terminal gets a chance to
|
||||
// read from the pty. Otherwise the KPtyDevice will simply read everything
|
||||
// as soon as it becomes available and the terminal will not display any output
|
||||
ptyProcess.pty()->setSuspended(true);
|
||||
|
||||
int fd = ptyProcess.pty()->masterFd();
|
||||
|
||||
bool result = QMetaObject::invokeMethod(terminalPart, "openTeletype",
|
||||
Qt::DirectConnection, Q_ARG(int, fd));
|
||||
QVERIFY(result);
|
||||
|
||||
// suspend the KPtyDevice so that the embedded terminal gets a chance to
|
||||
// read from the pty. Otherwise the KPtyDevice will simply read everything
|
||||
// as soon as it becomes available and the terminal will not display any output
|
||||
ptyProcess.pty()->setSuspended(true);
|
||||
|
||||
QWeakPointer<KDialog> dialog = new KDialog();
|
||||
dialog.data()->setButtons(0);
|
||||
|
|
Loading…
Add table
Reference in a new issue