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/ui/dialogs/ProfileSetupDialog.h | |
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/ui/dialogs/ProfileSetupDialog.h')
-rw-r--r-- | launcher/ui/dialogs/ProfileSetupDialog.h | 56 |
1 files changed, 19 insertions, 37 deletions
diff --git a/launcher/ui/dialogs/ProfileSetupDialog.h b/launcher/ui/dialogs/ProfileSetupDialog.h index 6f413ebd..09f8124e 100644 --- a/launcher/ui/dialogs/ProfileSetupDialog.h +++ b/launcher/ui/dialogs/ProfileSetupDialog.h @@ -17,65 +17,48 @@ #include <QDialog> #include <QIcon> -#include <QTimer> #include <QNetworkReply> +#include <QTimer> -#include <memory> #include <minecraft/auth/MinecraftAccount.h> +#include <memory> -namespace Ui -{ +namespace Ui { class ProfileSetupDialog; } -class ProfileSetupDialog : public QDialog -{ +class ProfileSetupDialog : public QDialog { Q_OBJECT -public: - - explicit ProfileSetupDialog(MinecraftAccountPtr accountToSetup, QWidget *parent = 0); + public: + explicit ProfileSetupDialog(MinecraftAccountPtr accountToSetup, QWidget* parent = 0); ~ProfileSetupDialog(); - enum class NameStatus - { - NotSet, - Pending, - Available, - Exists, - Error - } nameStatus = NameStatus::NotSet; + enum class NameStatus { NotSet, Pending, Available, Exists, Error } nameStatus = NameStatus::NotSet; -private slots: + private slots: void on_buttonBox_accepted(); void on_buttonBox_rejected(); - void nameEdited(const QString &name); - void checkFinished( - QNetworkReply::NetworkError error, - QByteArray data, - QList<QNetworkReply::RawHeaderPair> headers - ); + void nameEdited(const QString& name); + void checkFinished(QNetworkReply::NetworkError error, QByteArray data, QList<QNetworkReply::RawHeaderPair> headers); void startCheck(); - void setupProfileFinished( - QNetworkReply::NetworkError error, - QByteArray data, - QList<QNetworkReply::RawHeaderPair> headers - ); -protected: - void scheduleCheck(const QString &name); - void checkName(const QString &name); + void setupProfileFinished(QNetworkReply::NetworkError error, QByteArray data, QList<QNetworkReply::RawHeaderPair> headers); + + protected: + void scheduleCheck(const QString& name); + void checkName(const QString& name); void setNameStatus(NameStatus status, QString errorString); - void setupProfile(const QString & profileName); + void setupProfile(const QString& profileName); -private: + private: MinecraftAccountPtr m_accountToSetup; - Ui::ProfileSetupDialog *ui; + Ui::ProfileSetupDialog* ui; QIcon goodIcon; QIcon yellowIcon; QIcon badIcon; - QAction * validityAction = nullptr; + QAction* validityAction = nullptr; QString queuedCheck; @@ -85,4 +68,3 @@ private: QTimer checkStartTimer; }; - |