diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-04 19:42:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 19:42:36 +0200 |
commit | ae793f6cf11658c9abc5111e82d5ba7b3e6af127 (patch) | |
tree | ed41f30e2c0f02e4be1d42324b3f05fbab75b2cd /launcher/minecraft/MinecraftLoadAndCheck.cpp | |
parent | 50c7d39e082f0a7dbd977401e16d5adf534d9770 (diff) | |
parent | 1d638e018ac40fbfb35dd117f9a948c0cf35eadd (diff) | |
download | PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.gz PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.bz2 PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.zip |
Merge pull request #1459 from Scrumplex/format
Diffstat (limited to 'launcher/minecraft/MinecraftLoadAndCheck.cpp')
-rw-r--r-- | launcher/minecraft/MinecraftLoadAndCheck.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/launcher/minecraft/MinecraftLoadAndCheck.cpp b/launcher/minecraft/MinecraftLoadAndCheck.cpp index 2a369879..818e90cf 100644 --- a/launcher/minecraft/MinecraftLoadAndCheck.cpp +++ b/launcher/minecraft/MinecraftLoadAndCheck.cpp @@ -2,9 +2,7 @@ #include "MinecraftInstance.h" #include "PackProfile.h" -MinecraftLoadAndCheck::MinecraftLoadAndCheck(MinecraftInstance *inst, QObject *parent) : Task(parent), m_inst(inst) -{ -} +MinecraftLoadAndCheck::MinecraftLoadAndCheck(MinecraftInstance* inst, QObject* parent) : Task(parent), m_inst(inst) {} void MinecraftLoadAndCheck::executeTask() { @@ -13,14 +11,13 @@ void MinecraftLoadAndCheck::executeTask() components->reload(Net::Mode::Offline); m_task = components->getCurrentTask(); - if(!m_task) - { + if (!m_task) { emitSucceeded(); return; } connect(m_task.get(), &Task::succeeded, this, &MinecraftLoadAndCheck::subtaskSucceeded); connect(m_task.get(), &Task::failed, this, &MinecraftLoadAndCheck::subtaskFailed); - connect(m_task.get(), &Task::aborted, this, [this]{ subtaskFailed(tr("Aborted")); }); + connect(m_task.get(), &Task::aborted, this, [this] { subtaskFailed(tr("Aborted")); }); connect(m_task.get(), &Task::progress, this, &MinecraftLoadAndCheck::progress); connect(m_task.get(), &Task::stepProgress, this, &MinecraftLoadAndCheck::propagateStepProgress); connect(m_task.get(), &Task::status, this, &MinecraftLoadAndCheck::setStatus); @@ -28,8 +25,7 @@ void MinecraftLoadAndCheck::executeTask() void MinecraftLoadAndCheck::subtaskSucceeded() { - if(isFinished()) - { + if (isFinished()) { qCritical() << "MinecraftUpdate: Subtask" << sender() << "succeeded, but work was already done!"; return; } @@ -38,8 +34,7 @@ void MinecraftLoadAndCheck::subtaskSucceeded() void MinecraftLoadAndCheck::subtaskFailed(QString error) { - if(isFinished()) - { + if (isFinished()) { qCritical() << "MinecraftUpdate: Subtask" << sender() << "failed, but work was already done!"; return; } |