From 7002954aa953cc68ed532d20f876250ff31f07cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= Date: Sat, 13 Mar 2021 20:14:47 +0100 Subject: [PATCH] Fixed deprecated method QProcess::finished(int) (#2512) Co-authored-by: pajlada --- src/util/StreamLink.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/util/StreamLink.cpp b/src/util/StreamLink.cpp index 4251425e2..2ac42cfa6 100644 --- a/src/util/StreamLink.cpp +++ b/src/util/StreamLink.cpp @@ -68,11 +68,9 @@ namespace { if (getSettings()->streamlinkUseCustomPath) { - msg->showMessage( - "Unable to find Streamlink executable\nMake sure your custom " - "path " - "is pointing " - "to the DIRECTORY where the streamlink executable is located"); + msg->showMessage("Unable to find Streamlink executable\nMake sure " + "your custom path is pointing to the DIRECTORY " + "where the streamlink executable is located"); } else { @@ -101,8 +99,10 @@ namespace { }); QObject::connect( - p, static_cast(&QProcess::finished), - [=](int res) { + p, + static_cast( + &QProcess::finished), + [=](int /*exitCode*/, QProcess::ExitStatus /*exitStatus*/) { p->deleteLater(); }); @@ -117,11 +117,13 @@ void getStreamQualities(const QString &channelURL, auto p = createStreamlinkProcess(); QObject::connect( - p, static_cast(&QProcess::finished), - [=](int res) { - if (res != 0) + p, + static_cast( + &QProcess::finished), + [=](int exitCode, QProcess::ExitStatus /*exitStatus*/) { + if (exitCode != 0) { - qCWarning(chatterinoStreamlink) << "Got error code" << res; + qCWarning(chatterinoStreamlink) << "Got error code" << exitCode; // return; } QString lastLine = QString(p->readAllStandardOutput());