diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-04-17 17:51:34 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-04-17 18:23:18 -0700 |
commit | 12f0d51c0cd03d660425566264b502736b104310 (patch) | |
tree | fda9fe0325e4f330d62690b312d82d8928d2a117 /launcher/LoggedProcess.cpp | |
parent | 1b053032506afc3b7ad9734aea461dc39101ba64 (diff) | |
download | PrismLauncher-12f0d51c0cd03d660425566264b502736b104310.tar.gz PrismLauncher-12f0d51c0cd03d660425566264b502736b104310.tar.bz2 PrismLauncher-12f0d51c0cd03d660425566264b502736b104310.zip |
Fix: signal/slot macro -> func pointer & network fixes
- convert qt connect calls to use function pointers instead of the signal/slot macros wherever practical (UI classes were mostly left alone, target was tasks and processes)
- give signals an explicit receivers to use the static method over the instance method wherever practical
- ensure networks tasks are using the `errorOccured` signal added in Qt5.15 over the deprecated `error` signal
- ensure all networks tasks have an sslErrors signal connected
- add seemingly missing `MinecraftAccount::authSucceeded` connection for `MSAInteractive` login flow
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/LoggedProcess.cpp')
-rw-r--r-- | launcher/LoggedProcess.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/launcher/LoggedProcess.cpp b/launcher/LoggedProcess.cpp index c8d5c34e..763a9b5c 100644 --- a/launcher/LoggedProcess.cpp +++ b/launcher/LoggedProcess.cpp @@ -44,11 +44,11 @@ LoggedProcess::LoggedProcess(QObject *parent) : QProcess(parent) // QProcess has a strange interface... let's map a lot of those into a few. connect(this, &QProcess::readyReadStandardOutput, this, &LoggedProcess::on_stdOut); connect(this, &QProcess::readyReadStandardError, this, &LoggedProcess::on_stdErr); - connect(this, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(on_exit(int,QProcess::ExitStatus))); -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - connect(this, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(on_error(QProcess::ProcessError))); + connect(this, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &LoggedProcess::on_exit); +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) // &QProcess::errorOccurred added in 5.6 + connect(this, &QProcess::errorOccurred, this, &LoggedProcess::on_error); #else - connect(this, SIGNAL(error(QProcess::ProcessError)), this, SLOT(on_error(QProcess::ProcessError))); + connect(this, QOverload<QProcess::ProcessError>::of(&QProcess::error), this, &LoggedProcess::on_error); #endif connect(this, &QProcess::stateChanged, this, &LoggedProcess::on_stateChange); } |