mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fixed deprecated method QProcess::finished(int) (#2512)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
ce947a89d7
commit
7002954aa9
|
@ -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());
|
||||||
|
|
Loading…
Reference in a new issue