From: Manuel Nickschas Date: Tue, 7 Jan 2020 19:40:01 +0000 (+0100) Subject: qa: Use QProcess::errorOccurred instead of QProcess::error if possible X-Git-Tag: test-travis-01~15 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=4037c8e9557da772664a18a953d7c05e463de938;hp=56491f1d5772764aa82a5bda85c83ab336af4346 qa: Use QProcess::errorOccurred instead of QProcess::error if possible To avoid an overloaded signal name, Qt 5.6 introduced the signal QProcess::errorOccurred() to replace QProcess::error(). The latter one is deprecated since Qt 5.14, so avoid using it if possible. --- diff --git a/src/client/execwrapper.cpp b/src/client/execwrapper.cpp index f87eb0c7..b5853fe7 100644 --- a/src/client/execwrapper.cpp +++ b/src/client/execwrapper.cpp @@ -34,7 +34,11 @@ ExecWrapper::ExecWrapper(QObject* parent) connect(&_process, &QProcess::readyReadStandardOutput, this, &ExecWrapper::processReadStdout); connect(&_process, &QProcess::readyReadStandardError, this, &ExecWrapper::processReadStderr); connect(&_process, selectOverload(&QProcess::finished), this, &ExecWrapper::processFinished); +#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) connect(&_process, selectOverload(&QProcess::error), this, &ExecWrapper::processError); +#else + connect(&_process, &QProcess::errorOccurred, this, &ExecWrapper::processError); +#endif connect(this, &ExecWrapper::output, this, &ExecWrapper::postStdout); connect(this, &ExecWrapper::error, this, &ExecWrapper::postStderr);