diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-02 18:35:35 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-02 18:35:35 +0200 |
commit | 1d468ac35ad88d8c77cc83f25e3704d9bd7df01b (patch) | |
tree | 8644b1574c947a1a87c5c7b2567f746cfe17882f /launcher/InstancePageProvider.h | |
parent | ce2ca1381519a2e261d7f76dffa874d559d979c2 (diff) | |
download | PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.gz PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.bz2 PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.zip |
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/InstancePageProvider.h')
-rw-r--r-- | launcher/InstancePageProvider.h | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/launcher/InstancePageProvider.h b/launcher/InstancePageProvider.h index d25cd330..66d2b675 100644 --- a/launcher/InstancePageProvider.h +++ b/launcher/InstancePageProvider.h @@ -1,35 +1,31 @@ #pragma once -#include "minecraft/MinecraftInstance.h" #include <FileSystem.h> +#include "minecraft/MinecraftInstance.h" #include "ui/pages/BasePage.h" #include "ui/pages/BasePageProvider.h" +#include "ui/pages/instance/InstanceSettingsPage.h" #include "ui/pages/instance/LogPage.h" -#include "ui/pages/instance/VersionPage.h" #include "ui/pages/instance/ManagedPackPage.h" #include "ui/pages/instance/ModFolderPage.h" -#include "ui/pages/instance/ResourcePackPage.h" -#include "ui/pages/instance/TexturePackPage.h" -#include "ui/pages/instance/ShaderPackPage.h" #include "ui/pages/instance/NotesPage.h" -#include "ui/pages/instance/ScreenshotsPage.h" -#include "ui/pages/instance/InstanceSettingsPage.h" #include "ui/pages/instance/OtherLogsPage.h" -#include "ui/pages/instance/WorldListPage.h" +#include "ui/pages/instance/ResourcePackPage.h" +#include "ui/pages/instance/ScreenshotsPage.h" #include "ui/pages/instance/ServersPage.h" +#include "ui/pages/instance/ShaderPackPage.h" +#include "ui/pages/instance/TexturePackPage.h" +#include "ui/pages/instance/VersionPage.h" +#include "ui/pages/instance/WorldListPage.h" -class InstancePageProvider : protected QObject, public BasePageProvider -{ +class InstancePageProvider : protected QObject, public BasePageProvider { Q_OBJECT -public: - explicit InstancePageProvider(InstancePtr parent) - { - inst = parent; - } + public: + explicit InstancePageProvider(InstancePtr parent) { inst = parent; } - virtual ~InstancePageProvider() {}; - virtual QList<BasePage *> getPages() override + virtual ~InstancePageProvider(){}; + virtual QList<BasePage*> getPages() override { - QList<BasePage *> values; + QList<BasePage*> values; values.append(new LogPage(inst)); std::shared_ptr<MinecraftInstance> onesix = std::dynamic_pointer_cast<MinecraftInstance>(inst); values.append(new VersionPage(onesix.get())); @@ -49,18 +45,14 @@ public: values.append(new ScreenshotsPage(FS::PathCombine(onesix->gameRoot(), "screenshots"))); values.append(new InstanceSettingsPage(onesix.get())); auto logMatcher = inst->getLogFileMatcher(); - if(logMatcher) - { + if (logMatcher) { values.append(new OtherLogsPage(inst->getLogFileRoot(), logMatcher)); } return values; } - virtual QString dialogTitle() override - { - return tr("Edit Instance (%1)").arg(inst->name()); - } -protected: + virtual QString dialogTitle() override { return tr("Edit Instance (%1)").arg(inst->name()); } + + protected: InstancePtr inst; }; - |