diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-05 19:04:53 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-05 19:04:53 +0300 |
commit | 91eb30f03795921b48360b79bdb739dcd0f10f17 (patch) | |
tree | 1a2fccbbbf4751cf2cf6f6418cb525dcee5f2acd /launcher/ui/dialogs/ProfileSetupDialog.h | |
parent | a3ffa6455021b69bd1940b65fefb3b6177c96730 (diff) | |
parent | ae793f6cf11658c9abc5111e82d5ba7b3e6af127 (diff) | |
download | PrismLauncher-91eb30f03795921b48360b79bdb739dcd0f10f17.tar.gz PrismLauncher-91eb30f03795921b48360b79bdb739dcd0f10f17.tar.bz2 PrismLauncher-91eb30f03795921b48360b79bdb739dcd0f10f17.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into pack_changelog
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; }; - |