Commit 5bc8d10b authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Remove uses of deprecated QProcess::error signal

This overload of error is deprecated in 5.6.

Replace with errorOccurred, which was introduced in 5.6.

Change-Id: Iccfba7e7103b7ce377471696f1f2ec217e52c840
Reviewed-by: Alessandro Portale's avatarAlessandro Portale <alessandro.portale@qt.io>
parent b17b2461
......@@ -511,8 +511,7 @@ void PluginDumper::runQmlDump(const QmlJS::ModelManagerInterface::ProjectInfo &i
process->setEnvironment(info.qmlDumpEnvironment.toStringList());
connect(process, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
this, &PluginDumper::qmlPluginTypeDumpDone);
connect(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &PluginDumper::qmlPluginTypeDumpError);
connect(process, &QProcess::errorOccurred, this, &PluginDumper::qmlPluginTypeDumpError);
process->start(info.qmlDumpPath, arguments);
m_runningQmldumps.insert(process, importPath);
}
......
......@@ -739,7 +739,7 @@ void QtcProcess::start()
setErrorString(tr("Error in command line."));
// Should be FailedToStart, but we cannot set the process error from the outside,
// so it would be inconsistent.
emit error(QProcess::UnknownError);
emit errorOccurred(QProcess::UnknownError);
return;
}
QProcess::start(command, arguments.toUnixArgs());
......
......@@ -300,8 +300,7 @@ SynchronousProcess::SynchronousProcess() :
connect(&d->m_process,
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &SynchronousProcess::finished);
connect(&d->m_process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &SynchronousProcess::error);
connect(&d->m_process, &QProcess::errorOccurred, this, &SynchronousProcess::error);
connect(&d->m_process, &QProcess::readyReadStandardOutput,
this, [this]() {
d->m_hangTimerCount = 0;
......
......@@ -48,11 +48,8 @@ GdbServerProviderProcess::GdbServerProviderProcess(
if (Utils::HostOsInfo::isWindowsHost())
m_process->setUseCtrlCStub(true);
connect(m_process,
static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &GdbServerProviderProcess::error);
connect(m_process,
static_cast<void (QProcess::*)(int)>(&QProcess::finished),
connect(m_process, &QProcess::errorOccurred, this, &GdbServerProviderProcess::error);
connect(m_process, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
this, &GdbServerProviderProcess::finished);
connect(m_process, &QProcess::readyReadStandardOutput,
......
......@@ -84,14 +84,11 @@ ClangStaticAnalyzerRunner::ClangStaticAnalyzerRunner(const QString &clangExecuta
m_process.setProcessChannelMode(QProcess::MergedChannels);
m_process.setProcessEnvironment(environment.toProcessEnvironment());
m_process.setWorkingDirectory(m_clangLogFileDir); // Current clang-cl puts log file into working dir.
connect(&m_process, &QProcess::started,
this, &ClangStaticAnalyzerRunner::onProcessStarted);
connect(&m_process, &QProcess::started, this, &ClangStaticAnalyzerRunner::onProcessStarted);
connect(&m_process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &ClangStaticAnalyzerRunner::onProcessFinished);
connect(&m_process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &ClangStaticAnalyzerRunner::onProcessError);
connect(&m_process, &QProcess::readyRead,
this, &ClangStaticAnalyzerRunner::onProcessOutput);
connect(&m_process, &QProcess::errorOccurred, this, &ClangStaticAnalyzerRunner::onProcessError);
connect(&m_process, &QProcess::readyRead, this, &ClangStaticAnalyzerRunner::onProcessOutput);
}
ClangStaticAnalyzerRunner::~ClangStaticAnalyzerRunner()
......
......@@ -626,8 +626,7 @@ void ExternalToolRunner::run()
connect(m_process, &QProcess::started, this, &ExternalToolRunner::started);
connect(m_process, static_cast<void (QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
this, &ExternalToolRunner::finished);
connect(m_process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &ExternalToolRunner::error);
connect(m_process, &QProcess::errorOccurred, this, &ExternalToolRunner::error);
connect(m_process, &QProcess::readyReadStandardOutput,
this, &ExternalToolRunner::readStandardOutput);
connect(m_process, &QProcess::readyReadStandardError,
......
......@@ -249,8 +249,7 @@ CdbEngine::CdbEngine(const DebuggerRunParameters &sp) :
this, &CdbEngine::createFullBacktrace);
connect(&m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished),
this, &CdbEngine::processFinished);
connect(&m_process, static_cast<void(QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &CdbEngine::processError);
connect(&m_process, &QProcess::errorOccurred, this, &CdbEngine::processError);
connect(&m_process, &QProcess::readyReadStandardOutput,
this, &CdbEngine::readyReadStandardOut);
connect(&m_process, &QProcess::readyReadStandardError,
......
......@@ -3990,8 +3990,7 @@ void GdbEngine::startGdb(const QStringList &args)
gdbArgs << "-n";
gdbArgs += args;
connect(&m_gdbProc, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &GdbEngine::handleGdbError);
connect(&m_gdbProc, &QProcess::errorOccurred, this, &GdbEngine::handleGdbError);
connect(&m_gdbProc, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &GdbEngine::handleGdbFinished);
connect(&m_gdbProc, &QtcProcess::readyReadStandardOutput, this, &GdbEngine::readGdbStandardOutput);
......
......@@ -60,8 +60,7 @@ GdbRemoteServerEngine::GdbRemoteServerEngine(const DebuggerRunParameters &runPar
if (HostOsInfo::isWindowsHost())
m_gdbProc.setUseCtrlCStub(runParameters.useCtrlCStub); // This is only set for QNX/BlackBerry
connect(&m_uploadProc, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &GdbRemoteServerEngine::uploadProcError);
connect(&m_uploadProc, &QProcess::errorOccurred, this, &GdbRemoteServerEngine::uploadProcError);
connect(&m_uploadProc, &QProcess::readyReadStandardOutput,
this, &GdbRemoteServerEngine::readUploadStandardOutput);
connect(&m_uploadProc, &QProcess::readyReadStandardError,
......
......@@ -248,8 +248,7 @@ void LldbEngine::setupEngine()
void LldbEngine::startLldb()
{
QString lldbCmd = runParameters().debugger.executable;
connect(&m_lldbProc, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &LldbEngine::handleLldbError);
connect(&m_lldbProc, &QProcess::errorOccurred, this, &LldbEngine::handleLldbError);
connect(&m_lldbProc, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &LldbEngine::handleLldbFinished);
connect(&m_lldbProc, &QProcess::readyReadStandardOutput,
......
......@@ -120,8 +120,7 @@ void PdbEngine::setupEngine()
m_interpreter = runParameters().interpreter;
QString bridge = ICore::resourcePath() + QLatin1String("/debugger/pdbbridge.py");
connect(&m_proc, static_cast<void(QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &PdbEngine::handlePdbError);
connect(&m_proc, &QProcess::errorOccurred, this, &PdbEngine::handlePdbError);
connect(&m_proc, static_cast<void(QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
this, &PdbEngine::handlePdbFinished);
connect(&m_proc, &QProcess::readyReadStandardOutput,
......
......@@ -268,8 +268,7 @@ QueryContext::QueryContext(const QStringList &queries,
this, &QueryContext::readyReadStandardOutput);
connect(&m_process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &QueryContext::processFinished);
connect(&m_process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &QueryContext::processError);
connect(&m_process, &QProcess::errorOccurred, this, &QueryContext::processError);
connect(&m_watcher, &QFutureWatcherBase::canceled, this, &QueryContext::terminate);
m_watcher.setFuture(m_progress.future());
m_process.setProcessEnvironment(Git::Internal::GitPlugin::client()->processEnvironment());
......
......@@ -142,8 +142,7 @@ FetchContext::FetchContext(const QSharedPointer<GerritChange> &change,
, m_parameters(p)
, m_state(FetchState)
{
connect(&m_process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &FetchContext::processError);
connect(&m_process, &QProcess::errorOccurred, this, &FetchContext::processError);
connect(&m_process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &FetchContext::processFinished);
connect(&m_process, &QProcess::readyReadStandardError,
......
......@@ -231,9 +231,7 @@ IosToolHandlerPrivate::IosToolHandlerPrivate(const IosDeviceType &devType,
QObject::connect(&process,
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
q, &IosToolHandler::subprocessFinished);
QObject::connect(&process,
static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
q, &IosToolHandler::subprocessError);
QObject::connect(&process, &QProcess::errorOccurred, q, &IosToolHandler::subprocessError);
QObject::connect(&killTimer, &QTimer::timeout,
q, &IosToolHandler::killProcess);
}
......
......@@ -41,8 +41,7 @@ namespace Internal {
PerforceChecker::PerforceChecker(QObject *parent) : QObject(parent)
{
connect(&m_process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &PerforceChecker::slotError);
connect(&m_process, &QProcess::errorOccurred, this, &PerforceChecker::slotError);
connect(&m_process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &PerforceChecker::slotFinished);
}
......
......@@ -100,14 +100,12 @@ ApplicationLauncher::ApplicationLauncher(QObject *parent) : QObject(parent),
}
connect(&d->m_guiProcess, &QProcess::readyReadStandardOutput,
this, &ApplicationLauncher::readStandardOutput);
connect(&d->m_guiProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
connect(&d->m_guiProcess, &QProcess::errorOccurred,
this, &ApplicationLauncher::guiProcessError);
connect(&d->m_guiProcess, static_cast<void (QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
this, &ApplicationLauncher::processDone);
connect(&d->m_guiProcess, &QProcess::started,
this, &ApplicationLauncher::bringToForeground);
connect(&d->m_guiProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &ApplicationLauncher::error);
connect(&d->m_guiProcess, &QProcess::started, this, &ApplicationLauncher::bringToForeground);
connect(&d->m_guiProcess, &QProcess::errorOccurred, this, &ApplicationLauncher::error);
#ifdef Q_OS_UNIX
d->m_consoleProcess.setSettings(Core::ICore::settings());
......
......@@ -39,8 +39,7 @@ DesktopDeviceProcess::DesktopDeviceProcess(const QSharedPointer<const IDevice> &
QObject *parent)
: DeviceProcess(device, parent)
{
connect(&m_process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &DeviceProcess::error);
connect(&m_process, &QProcess::errorOccurred, this, &DeviceProcess::error);
connect(&m_process, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
this, &DeviceProcess::finished);
connect(&m_process, &QProcess::readyReadStandardOutput,
......
......@@ -102,9 +102,7 @@ void WinRtDeviceFactory::autoDetect()
if (!m_process) {
m_process = new Utils::QtcProcess(this);
connect(m_process,
static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &WinRtDeviceFactory::onProcessError);
connect(m_process, &QProcess::errorOccurred, this, &WinRtDeviceFactory::onProcessError);
connect(m_process,
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &WinRtDeviceFactory::onProcessFinished);
......
......@@ -232,8 +232,7 @@ void WinRtRunnerHelper::startWinRtRunner(const RunConf &conf)
connect(process,
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &WinRtRunnerHelper::onProcessFinished);
connect(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &WinRtRunnerHelper::onProcessError);
connect(process, &QProcess::errorOccurred, this, &WinRtRunnerHelper::onProcessError);
connect(process, &QProcess::readyReadStandardOutput, this, &WinRtRunnerHelper::onProcessReadyReadStdOut);
connect(process, &QProcess::readyReadStandardError, this, &WinRtRunnerHelper::onProcessReadyReadStdErr);
}
......
......@@ -52,9 +52,7 @@ BacktraceCollector::BacktraceCollector(QObject *parent) :
connect(&d->debugger,
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &BacktraceCollector::onDebuggerFinished);
connect(&d->debugger,
static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &BacktraceCollector::onDebuggerError);
connect(&d->debugger, &QProcess::errorOccurred, this, &BacktraceCollector::onDebuggerError);
connect(&d->debugger, &QIODevice::readyRead,
this, &BacktraceCollector::onDebuggerOutputAvailable);
d->debugger.setProcessChannelMode(QProcess::MergedChannels);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment