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:
hjk
2022-01-27 10:55:39 +01:00
parent a386725c6c
commit 4e34921451
13 changed files with 16 additions and 16 deletions

View File

@@ -154,7 +154,7 @@ void DockerDeviceProcess::start(const Runnable &runnable)
m_process.setCommand(command);
m_process.setEnvironment(runnable.environment);
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::readyReadStandardOutput,
this, &DeviceProcess::readyReadStandardOutput);
@@ -569,7 +569,7 @@ DockerDevice::DockerDevice(const DockerDeviceData &data)
}
proc->deleteLater();
});
QObject::connect(proc, &DeviceProcess::error, [proc] {
QObject::connect(proc, &DeviceProcess::errorOccurred, [proc] {
MessageManager::writeDisrupting(tr("Error starting remote shell."));
proc->deleteLater();
});

View File

@@ -149,7 +149,7 @@ void PerfConfigWidget::setTarget(ProjectExplorer::Target *target)
connect(m_process.get(), &ProjectExplorer::DeviceProcess::finished,
this, &PerfConfigWidget::handleProcessFinished);
connect(m_process.get(), &ProjectExplorer::DeviceProcess::error,
connect(m_process.get(), &ProjectExplorer::DeviceProcess::errorOccurred,
this, &PerfConfigWidget::handleProcessError);
useTracePointsButton->setEnabled(true);

View File

@@ -133,7 +133,7 @@ public:
connect(m_process, &DeviceProcess::started, this, &RunWorker::reportStarted);
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
// in that. FailedToStart is the only actual failure.
if (e == QProcess::FailedToStart) {

View File

@@ -113,7 +113,7 @@ void PerfTracePointDialog::runScript()
connect(m_process.get(), &DeviceProcess::finished,
this, &PerfTracePointDialog::handleProcessFinished);
connect(m_process.get(), &DeviceProcess::error,
connect(m_process.get(), &DeviceProcess::errorOccurred,
this, &PerfTracePointDialog::handleProcessError);
m_process->start(runnable);

View File

@@ -424,7 +424,7 @@ void ApplicationLauncherPrivate::start(const Runnable &runnable, const IDevice::
this, &ApplicationLauncherPrivate::handleRemoteStdout);
connect(m_deviceProcess, &DeviceProcess::readyReadStandardError,
this, &ApplicationLauncherPrivate::handleRemoteStderr);
connect(m_deviceProcess, &DeviceProcess::error,
connect(m_deviceProcess, &DeviceProcess::errorOccurred,
this, &ApplicationLauncherPrivate::handleApplicationError);
connect(m_deviceProcess, &DeviceProcess::finished,
this, &ApplicationLauncherPrivate::handleApplicationFinished);

View File

@@ -42,7 +42,7 @@ DesktopDeviceProcess::DesktopDeviceProcess(const QSharedPointer<const IDevice> &
: DeviceProcess(device, parent)
, 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::readyReadStandardOutput,
this, &DeviceProcess::readyReadStandardOutput);

View File

@@ -62,7 +62,7 @@ public:
signals:
void started();
void finished();
void error(QProcess::ProcessError error);
void errorOccurred(QProcess::ProcessError error);
void readyReadStandardOutput();
void readyReadStandardError();

View File

@@ -79,7 +79,7 @@ void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &device)
connect(d->process.data(), &DeviceProcess::finished,
this, &DeviceUsedPortsGatherer::handleProcessFinished);
connect(d->process.data(), &DeviceProcess::error,
connect(d->process.data(), &DeviceProcess::errorOccurred,
this, &DeviceUsedPortsGatherer::handleProcessError);
connect(d->process.data(), &DeviceProcess::readyReadStandardOutput,
this, &DeviceUsedPortsGatherer::handleRemoteStdOut);

View File

@@ -194,7 +194,7 @@ void SshDeviceProcess::handleConnected()
if (runInTerminal()) {
d->process->setUseTerminal(true);
connect(&d->consoleProcess, &QtcProcess::errorOccurred,
this, &DeviceProcess::error);
this, &DeviceProcess::errorOccurred);
connect(&d->consoleProcess, &QtcProcess::started,
this, &SshDeviceProcess::handleProcessStarted);
connect(&d->consoleProcess, &QtcProcess::finished,
@@ -231,7 +231,7 @@ void SshDeviceProcess::handleDisconnected()
switch (oldState) {
case SshDeviceProcessPrivate::Connecting:
case SshDeviceProcessPrivate::Connected:
emit error(QProcess::FailedToStart);
emit errorOccurred(QProcess::FailedToStart);
break;
case SshDeviceProcessPrivate::ProcessRunning:
d->exitStatus = QProcess::CrashExit;
@@ -317,7 +317,7 @@ void SshDeviceProcess::SshDeviceProcessPrivate::doSignal(Signal signal)
case SshDeviceProcessPrivate::Connecting:
errorMessage = tr("Terminated by request.");
setState(SshDeviceProcessPrivate::Inactive);
emit q->error(QProcess::FailedToStart);
emit q->errorOccurred(QProcess::FailedToStart);
break;
case SshDeviceProcessPrivate::Connected:
case SshDeviceProcessPrivate::ProcessRunning:

View File

@@ -104,7 +104,7 @@ void QnxDevice::updateVersionNumber() const
QEventLoop eventLoop;
SshDeviceProcess versionNumberProcess(sharedFromThis());
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;
r.command = {"uname", {"-r"}};

View File

@@ -60,7 +60,7 @@ Slog2InfoRunner::Slog2InfoRunner(RunControl *runControl)
m_logProcess = new QnxDeviceProcess(device(), this);
connect(m_logProcess, &DeviceProcess::readyReadStandardOutput, this, &Slog2InfoRunner::readLogStandardOutput);
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()

View File

@@ -324,7 +324,7 @@ LinuxDevice::LinuxDevice()
}
proc->deleteLater();
});
QObject::connect(proc, &DeviceProcess::error, [proc] {
QObject::connect(proc, &DeviceProcess::errorOccurred, [proc] {
Core::MessageManager::writeDisrupting(tr("Error starting remote shell."));
proc->deleteLater();
});

View File

@@ -54,7 +54,7 @@ void RemoteLinuxEnvironmentReader::start()
}
m_stop = false;
m_deviceProcess = m_device->createProcess(this);
connect(m_deviceProcess, &DeviceProcess::error,
connect(m_deviceProcess, &DeviceProcess::errorOccurred,
this, &RemoteLinuxEnvironmentReader::handleError);
connect(m_deviceProcess, &DeviceProcess::finished,
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);