forked from qt-creator/qt-creator
ProjectExplorer: Rename DeviceProcess::error to errorOccured
That's what QProcess favors nowadays and QtcProcess uses. Change-Id: Ie9492ae62f23e35a8a70f72196c3d1b6bc50cbdc Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -154,7 +154,7 @@ void DockerDeviceProcess::start(const Runnable &runnable)
|
|||||||
m_process.setCommand(command);
|
m_process.setCommand(command);
|
||||||
m_process.setEnvironment(runnable.environment);
|
m_process.setEnvironment(runnable.environment);
|
||||||
m_process.setWorkingDirectory(runnable.workingDirectory);
|
m_process.setWorkingDirectory(runnable.workingDirectory);
|
||||||
connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::error);
|
connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::errorOccurred);
|
||||||
connect(&m_process, &QtcProcess::finished, this, &DeviceProcess::finished);
|
connect(&m_process, &QtcProcess::finished, this, &DeviceProcess::finished);
|
||||||
connect(&m_process, &QtcProcess::readyReadStandardOutput,
|
connect(&m_process, &QtcProcess::readyReadStandardOutput,
|
||||||
this, &DeviceProcess::readyReadStandardOutput);
|
this, &DeviceProcess::readyReadStandardOutput);
|
||||||
@@ -569,7 +569,7 @@ DockerDevice::DockerDevice(const DockerDeviceData &data)
|
|||||||
}
|
}
|
||||||
proc->deleteLater();
|
proc->deleteLater();
|
||||||
});
|
});
|
||||||
QObject::connect(proc, &DeviceProcess::error, [proc] {
|
QObject::connect(proc, &DeviceProcess::errorOccurred, [proc] {
|
||||||
MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
||||||
proc->deleteLater();
|
proc->deleteLater();
|
||||||
});
|
});
|
||||||
|
@@ -149,7 +149,7 @@ void PerfConfigWidget::setTarget(ProjectExplorer::Target *target)
|
|||||||
connect(m_process.get(), &ProjectExplorer::DeviceProcess::finished,
|
connect(m_process.get(), &ProjectExplorer::DeviceProcess::finished,
|
||||||
this, &PerfConfigWidget::handleProcessFinished);
|
this, &PerfConfigWidget::handleProcessFinished);
|
||||||
|
|
||||||
connect(m_process.get(), &ProjectExplorer::DeviceProcess::error,
|
connect(m_process.get(), &ProjectExplorer::DeviceProcess::errorOccurred,
|
||||||
this, &PerfConfigWidget::handleProcessError);
|
this, &PerfConfigWidget::handleProcessError);
|
||||||
|
|
||||||
useTracePointsButton->setEnabled(true);
|
useTracePointsButton->setEnabled(true);
|
||||||
|
@@ -133,7 +133,7 @@ public:
|
|||||||
|
|
||||||
connect(m_process, &DeviceProcess::started, this, &RunWorker::reportStarted);
|
connect(m_process, &DeviceProcess::started, this, &RunWorker::reportStarted);
|
||||||
connect(m_process, &DeviceProcess::finished, this, &RunWorker::reportStopped);
|
connect(m_process, &DeviceProcess::finished, this, &RunWorker::reportStopped);
|
||||||
connect(m_process, &DeviceProcess::error, [this](QProcess::ProcessError e) {
|
connect(m_process, &DeviceProcess::errorOccurred, [this](QProcess::ProcessError e) {
|
||||||
// The terminate() below will frequently lead to QProcess::Crashed. We're not interested
|
// The terminate() below will frequently lead to QProcess::Crashed. We're not interested
|
||||||
// in that. FailedToStart is the only actual failure.
|
// in that. FailedToStart is the only actual failure.
|
||||||
if (e == QProcess::FailedToStart) {
|
if (e == QProcess::FailedToStart) {
|
||||||
|
@@ -113,7 +113,7 @@ void PerfTracePointDialog::runScript()
|
|||||||
connect(m_process.get(), &DeviceProcess::finished,
|
connect(m_process.get(), &DeviceProcess::finished,
|
||||||
this, &PerfTracePointDialog::handleProcessFinished);
|
this, &PerfTracePointDialog::handleProcessFinished);
|
||||||
|
|
||||||
connect(m_process.get(), &DeviceProcess::error,
|
connect(m_process.get(), &DeviceProcess::errorOccurred,
|
||||||
this, &PerfTracePointDialog::handleProcessError);
|
this, &PerfTracePointDialog::handleProcessError);
|
||||||
|
|
||||||
m_process->start(runnable);
|
m_process->start(runnable);
|
||||||
|
@@ -424,7 +424,7 @@ void ApplicationLauncherPrivate::start(const Runnable &runnable, const IDevice::
|
|||||||
this, &ApplicationLauncherPrivate::handleRemoteStdout);
|
this, &ApplicationLauncherPrivate::handleRemoteStdout);
|
||||||
connect(m_deviceProcess, &DeviceProcess::readyReadStandardError,
|
connect(m_deviceProcess, &DeviceProcess::readyReadStandardError,
|
||||||
this, &ApplicationLauncherPrivate::handleRemoteStderr);
|
this, &ApplicationLauncherPrivate::handleRemoteStderr);
|
||||||
connect(m_deviceProcess, &DeviceProcess::error,
|
connect(m_deviceProcess, &DeviceProcess::errorOccurred,
|
||||||
this, &ApplicationLauncherPrivate::handleApplicationError);
|
this, &ApplicationLauncherPrivate::handleApplicationError);
|
||||||
connect(m_deviceProcess, &DeviceProcess::finished,
|
connect(m_deviceProcess, &DeviceProcess::finished,
|
||||||
this, &ApplicationLauncherPrivate::handleApplicationFinished);
|
this, &ApplicationLauncherPrivate::handleApplicationFinished);
|
||||||
|
@@ -42,7 +42,7 @@ DesktopDeviceProcess::DesktopDeviceProcess(const QSharedPointer<const IDevice> &
|
|||||||
: DeviceProcess(device, parent)
|
: DeviceProcess(device, parent)
|
||||||
, m_process(ProcessMode::Writer)
|
, m_process(ProcessMode::Writer)
|
||||||
{
|
{
|
||||||
connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::error);
|
connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::errorOccurred);
|
||||||
connect(&m_process, &QtcProcess::finished, this, &DeviceProcess::finished);
|
connect(&m_process, &QtcProcess::finished, this, &DeviceProcess::finished);
|
||||||
connect(&m_process, &QtcProcess::readyReadStandardOutput,
|
connect(&m_process, &QtcProcess::readyReadStandardOutput,
|
||||||
this, &DeviceProcess::readyReadStandardOutput);
|
this, &DeviceProcess::readyReadStandardOutput);
|
||||||
|
@@ -62,7 +62,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void started();
|
void started();
|
||||||
void finished();
|
void finished();
|
||||||
void error(QProcess::ProcessError error);
|
void errorOccurred(QProcess::ProcessError error);
|
||||||
|
|
||||||
void readyReadStandardOutput();
|
void readyReadStandardOutput();
|
||||||
void readyReadStandardError();
|
void readyReadStandardError();
|
||||||
|
@@ -79,7 +79,7 @@ void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &device)
|
|||||||
|
|
||||||
connect(d->process.data(), &DeviceProcess::finished,
|
connect(d->process.data(), &DeviceProcess::finished,
|
||||||
this, &DeviceUsedPortsGatherer::handleProcessFinished);
|
this, &DeviceUsedPortsGatherer::handleProcessFinished);
|
||||||
connect(d->process.data(), &DeviceProcess::error,
|
connect(d->process.data(), &DeviceProcess::errorOccurred,
|
||||||
this, &DeviceUsedPortsGatherer::handleProcessError);
|
this, &DeviceUsedPortsGatherer::handleProcessError);
|
||||||
connect(d->process.data(), &DeviceProcess::readyReadStandardOutput,
|
connect(d->process.data(), &DeviceProcess::readyReadStandardOutput,
|
||||||
this, &DeviceUsedPortsGatherer::handleRemoteStdOut);
|
this, &DeviceUsedPortsGatherer::handleRemoteStdOut);
|
||||||
|
@@ -194,7 +194,7 @@ void SshDeviceProcess::handleConnected()
|
|||||||
if (runInTerminal()) {
|
if (runInTerminal()) {
|
||||||
d->process->setUseTerminal(true);
|
d->process->setUseTerminal(true);
|
||||||
connect(&d->consoleProcess, &QtcProcess::errorOccurred,
|
connect(&d->consoleProcess, &QtcProcess::errorOccurred,
|
||||||
this, &DeviceProcess::error);
|
this, &DeviceProcess::errorOccurred);
|
||||||
connect(&d->consoleProcess, &QtcProcess::started,
|
connect(&d->consoleProcess, &QtcProcess::started,
|
||||||
this, &SshDeviceProcess::handleProcessStarted);
|
this, &SshDeviceProcess::handleProcessStarted);
|
||||||
connect(&d->consoleProcess, &QtcProcess::finished,
|
connect(&d->consoleProcess, &QtcProcess::finished,
|
||||||
@@ -231,7 +231,7 @@ void SshDeviceProcess::handleDisconnected()
|
|||||||
switch (oldState) {
|
switch (oldState) {
|
||||||
case SshDeviceProcessPrivate::Connecting:
|
case SshDeviceProcessPrivate::Connecting:
|
||||||
case SshDeviceProcessPrivate::Connected:
|
case SshDeviceProcessPrivate::Connected:
|
||||||
emit error(QProcess::FailedToStart);
|
emit errorOccurred(QProcess::FailedToStart);
|
||||||
break;
|
break;
|
||||||
case SshDeviceProcessPrivate::ProcessRunning:
|
case SshDeviceProcessPrivate::ProcessRunning:
|
||||||
d->exitStatus = QProcess::CrashExit;
|
d->exitStatus = QProcess::CrashExit;
|
||||||
@@ -317,7 +317,7 @@ void SshDeviceProcess::SshDeviceProcessPrivate::doSignal(Signal signal)
|
|||||||
case SshDeviceProcessPrivate::Connecting:
|
case SshDeviceProcessPrivate::Connecting:
|
||||||
errorMessage = tr("Terminated by request.");
|
errorMessage = tr("Terminated by request.");
|
||||||
setState(SshDeviceProcessPrivate::Inactive);
|
setState(SshDeviceProcessPrivate::Inactive);
|
||||||
emit q->error(QProcess::FailedToStart);
|
emit q->errorOccurred(QProcess::FailedToStart);
|
||||||
break;
|
break;
|
||||||
case SshDeviceProcessPrivate::Connected:
|
case SshDeviceProcessPrivate::Connected:
|
||||||
case SshDeviceProcessPrivate::ProcessRunning:
|
case SshDeviceProcessPrivate::ProcessRunning:
|
||||||
|
@@ -104,7 +104,7 @@ void QnxDevice::updateVersionNumber() const
|
|||||||
QEventLoop eventLoop;
|
QEventLoop eventLoop;
|
||||||
SshDeviceProcess versionNumberProcess(sharedFromThis());
|
SshDeviceProcess versionNumberProcess(sharedFromThis());
|
||||||
QObject::connect(&versionNumberProcess, &SshDeviceProcess::finished, &eventLoop, &QEventLoop::quit);
|
QObject::connect(&versionNumberProcess, &SshDeviceProcess::finished, &eventLoop, &QEventLoop::quit);
|
||||||
QObject::connect(&versionNumberProcess, &DeviceProcess::error, &eventLoop, &QEventLoop::quit);
|
QObject::connect(&versionNumberProcess, &DeviceProcess::errorOccurred, &eventLoop, &QEventLoop::quit);
|
||||||
|
|
||||||
Runnable r;
|
Runnable r;
|
||||||
r.command = {"uname", {"-r"}};
|
r.command = {"uname", {"-r"}};
|
||||||
|
@@ -60,7 +60,7 @@ Slog2InfoRunner::Slog2InfoRunner(RunControl *runControl)
|
|||||||
m_logProcess = new QnxDeviceProcess(device(), this);
|
m_logProcess = new QnxDeviceProcess(device(), this);
|
||||||
connect(m_logProcess, &DeviceProcess::readyReadStandardOutput, this, &Slog2InfoRunner::readLogStandardOutput);
|
connect(m_logProcess, &DeviceProcess::readyReadStandardOutput, this, &Slog2InfoRunner::readLogStandardOutput);
|
||||||
connect(m_logProcess, &DeviceProcess::readyReadStandardError, this, &Slog2InfoRunner::readLogStandardError);
|
connect(m_logProcess, &DeviceProcess::readyReadStandardError, this, &Slog2InfoRunner::readLogStandardError);
|
||||||
connect(m_logProcess, &DeviceProcess::error, this, &Slog2InfoRunner::handleLogError);
|
connect(m_logProcess, &DeviceProcess::errorOccurred, this, &Slog2InfoRunner::handleLogError);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Slog2InfoRunner::printMissingWarning()
|
void Slog2InfoRunner::printMissingWarning()
|
||||||
|
@@ -324,7 +324,7 @@ LinuxDevice::LinuxDevice()
|
|||||||
}
|
}
|
||||||
proc->deleteLater();
|
proc->deleteLater();
|
||||||
});
|
});
|
||||||
QObject::connect(proc, &DeviceProcess::error, [proc] {
|
QObject::connect(proc, &DeviceProcess::errorOccurred, [proc] {
|
||||||
Core::MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
Core::MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
||||||
proc->deleteLater();
|
proc->deleteLater();
|
||||||
});
|
});
|
||||||
|
@@ -54,7 +54,7 @@ void RemoteLinuxEnvironmentReader::start()
|
|||||||
}
|
}
|
||||||
m_stop = false;
|
m_stop = false;
|
||||||
m_deviceProcess = m_device->createProcess(this);
|
m_deviceProcess = m_device->createProcess(this);
|
||||||
connect(m_deviceProcess, &DeviceProcess::error,
|
connect(m_deviceProcess, &DeviceProcess::errorOccurred,
|
||||||
this, &RemoteLinuxEnvironmentReader::handleError);
|
this, &RemoteLinuxEnvironmentReader::handleError);
|
||||||
connect(m_deviceProcess, &DeviceProcess::finished,
|
connect(m_deviceProcess, &DeviceProcess::finished,
|
||||||
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);
|
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);
|
||||||
|
Reference in New Issue
Block a user