Fixed deprecated method QProcess::finished(int) (#2512)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Paweł 2021-03-13 20:14:47 +01:00 committed by GitHub
parent ce947a89d7
commit 7002954aa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,11 +68,9 @@ namespace {
if (getSettings()->streamlinkUseCustomPath) if (getSettings()->streamlinkUseCustomPath)
{ {
msg->showMessage( msg->showMessage("Unable to find Streamlink executable\nMake sure "
"Unable to find Streamlink executable\nMake sure your custom " "your custom path is pointing to the DIRECTORY "
"path " "where the streamlink executable is located");
"is pointing "
"to the DIRECTORY where the streamlink executable is located");
} }
else else
{ {
@ -101,8 +99,10 @@ namespace {
}); });
QObject::connect( QObject::connect(
p, static_cast<void (QProcess::*)(int)>(&QProcess::finished), p,
[=](int res) { static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(
&QProcess::finished),
[=](int /*exitCode*/, QProcess::ExitStatus /*exitStatus*/) {
p->deleteLater(); p->deleteLater();
}); });
@ -117,11 +117,13 @@ void getStreamQualities(const QString &channelURL,
auto p = createStreamlinkProcess(); auto p = createStreamlinkProcess();
QObject::connect( QObject::connect(
p, static_cast<void (QProcess::*)(int)>(&QProcess::finished), p,
[=](int res) { static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(
if (res != 0) &QProcess::finished),
[=](int exitCode, QProcess::ExitStatus /*exitStatus*/) {
if (exitCode != 0)
{ {
qCWarning(chatterinoStreamlink) << "Got error code" << res; qCWarning(chatterinoStreamlink) << "Got error code" << exitCode;
// return; // return;
} }
QString lastLine = QString(p->readAllStandardOutput()); QString lastLine = QString(p->readAllStandardOutput());