forked from qt-creator/qt-creator
ProcessInterface: Rename interruptProcess() -> interrupt()
Both functionalities meant to do the same. Change-Id: Idd9373cdb24b7b41f9e4befb09326c339263eeb1 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -248,6 +248,7 @@ public:
|
||||
m_terminal.setEnvironment(m_setup->m_environment);
|
||||
m_terminal.start();
|
||||
}
|
||||
void interrupt() override { m_terminal.interrupt(); }
|
||||
void terminate() override { m_terminal.stopProcess(); }
|
||||
void kill() override { m_terminal.stopProcess(); }
|
||||
void close() override { m_terminal.stopProcess(); }
|
||||
@@ -268,7 +269,6 @@ public:
|
||||
bool waitForFinished(int) override { return false; }
|
||||
|
||||
void kickoffProcess() override { m_terminal.kickoffProcess(); }
|
||||
void interruptProcess() override { m_terminal.interruptProcess(); }
|
||||
qint64 applicationMainThreadID() const override { return m_terminal.applicationMainThreadID(); }
|
||||
|
||||
private:
|
||||
@@ -411,6 +411,8 @@ public:
|
||||
QByteArray readAllStandardOutput() override { return m_process->readAllStandardOutput(); }
|
||||
QByteArray readAllStandardError() override { return m_process->readAllStandardError(); }
|
||||
|
||||
void interrupt() override
|
||||
{ QTC_CHECK(false); } // TODO: provide default impl
|
||||
void terminate() override
|
||||
{ m_process->terminate(); }
|
||||
void kill() override
|
||||
@@ -507,6 +509,8 @@ public:
|
||||
QByteArray readAllStandardOutput() override { return m_handle->readAllStandardOutput(); }
|
||||
QByteArray readAllStandardError() override { return m_handle->readAllStandardError(); }
|
||||
|
||||
void interrupt() override
|
||||
{ QTC_CHECK(false); } // TODO: send it to process launcher and use there a default impl of QProcessImpl
|
||||
void terminate() override { cancel(); } // TODO: what are differences among terminate, kill and close?
|
||||
void kill() override { cancel(); } // TODO: see above
|
||||
void close() override { cancel(); } // TODO: see above
|
||||
@@ -690,11 +694,6 @@ void ProcessInterface::kickoffProcess()
|
||||
QTC_CHECK(false);
|
||||
}
|
||||
|
||||
void ProcessInterface::interruptProcess()
|
||||
{
|
||||
QTC_CHECK(false);
|
||||
}
|
||||
|
||||
qint64 ProcessInterface::applicationMainThreadID() const
|
||||
{
|
||||
QTC_CHECK(false); return -1;
|
||||
@@ -939,9 +938,12 @@ void QtcProcess::terminate()
|
||||
void QtcProcess::interrupt()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
QTC_ASSERT(d->m_setup->m_useCtrlCStub, return);
|
||||
EnumWindows(sendInterruptMessageToAllWindowsOfProcess_enumWnd, processId());
|
||||
if (d->m_setup->m_useCtrlCStub)
|
||||
EnumWindows(sendInterruptMessageToAllWindowsOfProcess_enumWnd, processId());
|
||||
else
|
||||
#endif
|
||||
if (d->m_process)
|
||||
d->m_process->interrupt();
|
||||
}
|
||||
|
||||
bool QtcProcess::startDetached(const CommandLine &cmd, const FilePath &workingDirectory, qint64 *pid)
|
||||
@@ -1236,12 +1238,6 @@ void QtcProcess::kickoffProcess()
|
||||
d->m_process->kickoffProcess();
|
||||
}
|
||||
|
||||
void QtcProcess::interruptProcess()
|
||||
{
|
||||
if (d->m_process)
|
||||
d->m_process->interruptProcess();
|
||||
}
|
||||
|
||||
qint64 QtcProcess::applicationMainThreadID() const
|
||||
{
|
||||
if (d->m_process)
|
||||
@@ -1378,7 +1374,6 @@ QString QtcProcess::locateBinary(const QString &binary)
|
||||
return locateBinary(QString::fromLocal8Bit(path), binary);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\class Utils::SynchronousProcess
|
||||
|
||||
|
||||
Reference in New Issue
Block a user