Revert "QProcess: do not emit aboutToClose() twice"
This reverts commit efb90f6e7e.
Reason for revert: behavior change for signal listeners
Change-Id: Ibe3c5d496cd61a9fccab17a10cc9fda8334fc9d4
Reviewed-by: Björn Schäpers <qt-codereview@hazardy.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
parent
11fc0e7fb3
commit
d3a622f817
|
|
@ -1567,6 +1567,7 @@ qint64 QProcess::processId() const
|
|||
void QProcess::close()
|
||||
{
|
||||
Q_D(QProcess);
|
||||
emit aboutToClose();
|
||||
while (waitForBytesWritten(-1))
|
||||
;
|
||||
kill();
|
||||
|
|
|
|||
|
|
@ -835,7 +835,6 @@ void tst_QProcess::closeReadChannel()
|
|||
void tst_QProcess::openModes()
|
||||
{
|
||||
QProcess proc;
|
||||
QSignalSpy spyAboutToClose(&proc, &QProcess::aboutToClose);
|
||||
QVERIFY(!proc.isOpen());
|
||||
QCOMPARE(proc.openMode(), QProcess::NotOpen);
|
||||
proc.start("testProcessEcho3/testProcessEcho3");
|
||||
|
|
@ -871,7 +870,6 @@ void tst_QProcess::openModes()
|
|||
QVERIFY(!proc.isOpen());
|
||||
QVERIFY(!proc.isReadable());
|
||||
QVERIFY(!proc.isWritable());
|
||||
QCOMPARE(spyAboutToClose.count(), 1);
|
||||
QCOMPARE(proc.state(), QProcess::NotRunning);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue