diff options
| author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-23 13:54:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-23 13:54:36 +0200 |
| commit | c65f5f772887bb0751e1c3996a5a1739435e3284 (patch) | |
| tree | 6571df3fa7ef7675dc661367c06c037d791205e4 /launcher/minecraft/auth/steps/LauncherLoginStep.cpp | |
| parent | 74b62727af0819b63174e02873908fb3e4d34c11 (diff) | |
| parent | 2e94562f79d45eb746c54b3ffc9776afdb499096 (diff) | |
| download | PrismLauncher-c65f5f772887bb0751e1c3996a5a1739435e3284.tar.gz PrismLauncher-c65f5f772887bb0751e1c3996a5a1739435e3284.tar.bz2 PrismLauncher-c65f5f772887bb0751e1c3996a5a1739435e3284.zip | |
Merge pull request #877 from Scrumplex/refactor-offline-accounts
Diffstat (limited to 'launcher/minecraft/auth/steps/LauncherLoginStep.cpp')
| -rw-r--r-- | launcher/minecraft/auth/steps/LauncherLoginStep.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/launcher/minecraft/auth/steps/LauncherLoginStep.cpp b/launcher/minecraft/auth/steps/LauncherLoginStep.cpp index f5697223..8c53f037 100644 --- a/launcher/minecraft/auth/steps/LauncherLoginStep.cpp +++ b/launcher/minecraft/auth/steps/LauncherLoginStep.cpp @@ -5,6 +5,7 @@ #include "minecraft/auth/AuthRequest.h" #include "minecraft/auth/Parsers.h" #include "minecraft/auth/AccountTask.h" +#include "net/NetUtils.h" LauncherLoginStep::LauncherLoginStep(AccountData* data) : AuthStep(data) { @@ -58,10 +59,18 @@ void LauncherLoginStep::onRequestDone( #ifndef NDEBUG qDebug() << data; #endif - emit finished( - AccountTaskState::STATE_FAILED_SOFT, - tr("Failed to get Minecraft access token: %1").arg(requestor->errorString_) - ); + if (Net::isApplicationError(error)) { + emit finished( + AccountTaskState::STATE_FAILED_SOFT, + tr("Failed to get Minecraft access token: %1").arg(requestor->errorString_) + ); + } + else { + emit finished( + AccountTaskState::STATE_OFFLINE, + tr("Failed to get Minecraft access token: %1").arg(requestor->errorString_) + ); + } return; } |
