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