From 4e34921451ee7dfc2980aa8b22abf02b8b318fcb Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 27 Jan 2022 10:55:39 +0100 Subject: [PATCH] ProjectExplorer: Rename DeviceProcess::error to errorOccured That's what QProcess favors nowadays and QtcProcess uses. Change-Id: Ie9492ae62f23e35a8a70f72196c3d1b6bc50cbdc Reviewed-by: Jarek Kobus --- src/plugins/docker/dockerdevice.cpp | 4 ++-- src/plugins/perfprofiler/perfconfigwidget.cpp | 2 +- src/plugins/perfprofiler/perfprofilerruncontrol.cpp | 2 +- src/plugins/perfprofiler/perftracepointdialog.cpp | 2 +- src/plugins/projectexplorer/applicationlauncher.cpp | 2 +- .../projectexplorer/devicesupport/desktopdeviceprocess.cpp | 2 +- src/plugins/projectexplorer/devicesupport/deviceprocess.h | 2 +- .../devicesupport/deviceusedportsgatherer.cpp | 2 +- .../projectexplorer/devicesupport/sshdeviceprocess.cpp | 6 +++--- src/plugins/qnx/qnxdevice.cpp | 2 +- src/plugins/qnx/slog2inforunner.cpp | 2 +- src/plugins/remotelinux/linuxdevice.cpp | 2 +- src/plugins/remotelinux/remotelinuxenvironmentreader.cpp | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 9fe4ac081b8..e97d64e3964 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -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(); }); diff --git a/src/plugins/perfprofiler/perfconfigwidget.cpp b/src/plugins/perfprofiler/perfconfigwidget.cpp index d201a08ff0d..b58900c5d60 100644 --- a/src/plugins/perfprofiler/perfconfigwidget.cpp +++ b/src/plugins/perfprofiler/perfconfigwidget.cpp @@ -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); diff --git a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp index 4bdecd52dbb..684918bb6a8 100644 --- a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp +++ b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp @@ -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) { diff --git a/src/plugins/perfprofiler/perftracepointdialog.cpp b/src/plugins/perfprofiler/perftracepointdialog.cpp index b439fd7cbe9..3bb2197ea58 100644 --- a/src/plugins/perfprofiler/perftracepointdialog.cpp +++ b/src/plugins/perfprofiler/perftracepointdialog.cpp @@ -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); diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp index 63621eab68c..475622c7038 100644 --- a/src/plugins/projectexplorer/applicationlauncher.cpp +++ b/src/plugins/projectexplorer/applicationlauncher.cpp @@ -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); diff --git a/src/plugins/projectexplorer/devicesupport/desktopdeviceprocess.cpp b/src/plugins/projectexplorer/devicesupport/desktopdeviceprocess.cpp index 0bb27f3435d..004eef0af51 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdeviceprocess.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopdeviceprocess.cpp @@ -42,7 +42,7 @@ DesktopDeviceProcess::DesktopDeviceProcess(const QSharedPointer & : 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); diff --git a/src/plugins/projectexplorer/devicesupport/deviceprocess.h b/src/plugins/projectexplorer/devicesupport/deviceprocess.h index 4aa197666c3..c097bc6d09b 100644 --- a/src/plugins/projectexplorer/devicesupport/deviceprocess.h +++ b/src/plugins/projectexplorer/devicesupport/deviceprocess.h @@ -62,7 +62,7 @@ public: signals: void started(); void finished(); - void error(QProcess::ProcessError error); + void errorOccurred(QProcess::ProcessError error); void readyReadStandardOutput(); void readyReadStandardError(); diff --git a/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp b/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp index 377be1d5206..d2d3961a015 100644 --- a/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp +++ b/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp @@ -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); diff --git a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp index 3b848b84089..71d7b14cd71 100644 --- a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp +++ b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp @@ -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: diff --git a/src/plugins/qnx/qnxdevice.cpp b/src/plugins/qnx/qnxdevice.cpp index 37d29516583..4c88743f2ad 100644 --- a/src/plugins/qnx/qnxdevice.cpp +++ b/src/plugins/qnx/qnxdevice.cpp @@ -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"}}; diff --git a/src/plugins/qnx/slog2inforunner.cpp b/src/plugins/qnx/slog2inforunner.cpp index cd341899ade..c5209fdfe54 100644 --- a/src/plugins/qnx/slog2inforunner.cpp +++ b/src/plugins/qnx/slog2inforunner.cpp @@ -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() diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 9387b46b7cd..171f6d7421f 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -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(); }); diff --git a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp index 6f477bdcce6..fd59e384317 100644 --- a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp +++ b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp @@ -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);