summaryrefslogtreecommitdiffstats
path: root/gui/dialogs
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-12-01 14:28:47 -0600
committerAndrew <forkk@forkk.net>2013-12-01 14:28:47 -0600
commit613699b3626aea750093ab7eaaeccaa28c0e87c6 (patch)
tree7fd542b8f4be10359ba2aaeac9834f1b5c86a750 /gui/dialogs
parent2427ad687137bbcfc7303a931d7e0b74d5325e48 (diff)
parent75c4d97b90e39f2bda6e682def0fdda044cbcf6f (diff)
downloadMultiMC-613699b3626aea750093ab7eaaeccaa28c0e87c6.tar
MultiMC-613699b3626aea750093ab7eaaeccaa28c0e87c6.tar.gz
MultiMC-613699b3626aea750093ab7eaaeccaa28c0e87c6.tar.lz
MultiMC-613699b3626aea750093ab7eaaeccaa28c0e87c6.tar.xz
MultiMC-613699b3626aea750093ab7eaaeccaa28c0e87c6.zip
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop
Diffstat (limited to 'gui/dialogs')
-rw-r--r--gui/dialogs/AccountListDialog.cpp17
-rw-r--r--gui/dialogs/AccountListDialog.h6
-rw-r--r--gui/dialogs/AccountSelectDialog.cpp8
-rw-r--r--gui/dialogs/AccountSelectDialog.h10
-rw-r--r--gui/dialogs/CopyInstanceDialog.cpp2
-rw-r--r--gui/dialogs/EditAccountDialog.cpp10
-rw-r--r--gui/dialogs/EditAccountDialog.h11
-rw-r--r--gui/dialogs/EditNotesDialog.cpp4
-rw-r--r--gui/dialogs/InstanceSettings.cpp2
-rw-r--r--gui/dialogs/LegacyModEditDialog.cpp2
-rw-r--r--gui/dialogs/OneSixModEditDialog.cpp2
11 files changed, 34 insertions, 40 deletions
diff --git a/gui/dialogs/AccountListDialog.cpp b/gui/dialogs/AccountListDialog.cpp
index dfac4989..f5268b61 100644
--- a/gui/dialogs/AccountListDialog.cpp
+++ b/gui/dialogs/AccountListDialog.cpp
@@ -20,7 +20,7 @@
#include <logger/QsLog.h>
-#include <logic/auth/AuthenticateTask.h>
+#include <logic/auth/flows/AuthenticateTask.h>
#include <logic/net/NetJob.h>
#include <gui/dialogs/EditAccountDialog.h>
@@ -29,9 +29,8 @@
#include <MultiMC.h>
-AccountListDialog::AccountListDialog(QWidget *parent) :
- QDialog(parent),
- ui(new Ui::AccountListDialog)
+AccountListDialog::AccountListDialog(QWidget *parent)
+ : QDialog(parent), ui(new Ui::AccountListDialog)
{
ui->setupUi(this);
@@ -44,8 +43,8 @@ AccountListDialog::AccountListDialog(QWidget *parent) :
connect(selectionModel, &QItemSelectionModel::selectionChanged,
[this] (const QItemSelection& sel, const QItemSelection& dsel) { updateButtonStates(); });
- connect(m_accounts.get(), SIGNAL(listChanged), SLOT(listChanged));
- connect(m_accounts.get(), SIGNAL(activeAccountChanged), SLOT(listChanged));
+ connect(m_accounts.get(), SIGNAL(listChanged()), SLOT(listChanged()));
+ connect(m_accounts.get(), SIGNAL(activeAccountChanged()), SLOT(listChanged()));
updateButtonStates();
}
@@ -60,7 +59,6 @@ void AccountListDialog::listChanged()
updateButtonStates();
}
-
void AccountListDialog::on_addAccountBtn_clicked()
{
addAccount(tr("Please enter your Mojang or Minecraft account username and password to add your account."));
@@ -84,7 +82,7 @@ void AccountListDialog::on_setDefaultBtn_clicked()
QModelIndex selected = selection.first();
MojangAccountPtr account = selected.data(MojangAccountList::PointerRole).value<MojangAccountPtr>();
m_accounts->setActiveAccount(account->username());
- }
+ }
}
void AccountListDialog::on_noDefaultBtn_clicked()
@@ -104,7 +102,7 @@ void AccountListDialog::updateButtonStates()
ui->rmAccountBtn->setEnabled(selection.size() > 0);
ui->setDefaultBtn->setEnabled(selection.size() > 0);
-
+
ui->noDefaultBtn->setDown(m_accounts->activeAccount().get() == nullptr);
}
@@ -146,4 +144,3 @@ void AccountListDialog::addAccount(const QString& errMsg)
}
}
}
-
diff --git a/gui/dialogs/AccountListDialog.h b/gui/dialogs/AccountListDialog.h
index 634d944a..84ff8e0e 100644
--- a/gui/dialogs/AccountListDialog.h
+++ b/gui/dialogs/AccountListDialog.h
@@ -21,7 +21,8 @@
#include "logic/lists/MojangAccountList.h"
-namespace Ui {
+namespace Ui
+{
class AccountListDialog;
}
@@ -29,7 +30,7 @@ class AuthenticateTask;
class AccountListDialog : public QDialog
{
-Q_OBJECT
+ Q_OBJECT
public:
explicit AccountListDialog(QWidget *parent = 0);
~AccountListDialog();
@@ -62,4 +63,3 @@ slots:
private:
Ui::AccountListDialog *ui;
};
-
diff --git a/gui/dialogs/AccountSelectDialog.cpp b/gui/dialogs/AccountSelectDialog.cpp
index db1bd192..b8fa9e42 100644
--- a/gui/dialogs/AccountSelectDialog.cpp
+++ b/gui/dialogs/AccountSelectDialog.cpp
@@ -20,15 +20,14 @@
#include <logger/QsLog.h>
-#include <logic/auth/AuthenticateTask.h>
+#include <logic/auth/flows/AuthenticateTask.h>
#include <gui/dialogs/ProgressDialog.h>
#include <MultiMC.h>
-AccountSelectDialog::AccountSelectDialog(const QString& message, int flags, QWidget *parent) :
- QDialog(parent),
- ui(new Ui::AccountSelectDialog)
+AccountSelectDialog::AccountSelectDialog(const QString &message, int flags, QWidget *parent)
+ : QDialog(parent), ui(new Ui::AccountSelectDialog)
{
ui->setupUi(this);
@@ -85,4 +84,3 @@ void AccountSelectDialog::on_buttonBox_rejected()
{
close();
}
-
diff --git a/gui/dialogs/AccountSelectDialog.h b/gui/dialogs/AccountSelectDialog.h
index 41af4f7c..a539e7e9 100644
--- a/gui/dialogs/AccountSelectDialog.h
+++ b/gui/dialogs/AccountSelectDialog.h
@@ -21,17 +21,18 @@
#include "logic/lists/MojangAccountList.h"
-namespace Ui {
+namespace Ui
+{
class AccountSelectDialog;
}
class AccountSelectDialog : public QDialog
{
-Q_OBJECT
+ Q_OBJECT
public:
enum Flags
{
- NoFlags=0,
+ NoFlags = 0,
/*!
* Shows a check box on the dialog that allows the user to specify that the account
@@ -75,7 +76,7 @@ public:
public
slots:
void on_buttonBox_accepted();
-
+
void on_buttonBox_rejected();
protected:
@@ -87,4 +88,3 @@ protected:
private:
Ui::AccountSelectDialog *ui;
};
-
diff --git a/gui/dialogs/CopyInstanceDialog.cpp b/gui/dialogs/CopyInstanceDialog.cpp
index 4d588a1e..9d7ac30c 100644
--- a/gui/dialogs/CopyInstanceDialog.cpp
+++ b/gui/dialogs/CopyInstanceDialog.cpp
@@ -33,7 +33,7 @@
#include "logic/BaseInstance.h"
CopyInstanceDialog::CopyInstanceDialog(BaseInstance *original, QWidget *parent)
- : m_original(original), QDialog(parent), ui(new Ui::CopyInstanceDialog)
+ :QDialog(parent), ui(new Ui::CopyInstanceDialog), m_original(original)
{
MultiMCPlatform::fixWM_CLASS(this);
ui->setupUi(this);
diff --git a/gui/dialogs/EditAccountDialog.cpp b/gui/dialogs/EditAccountDialog.cpp
index d28336f7..dd3f0523 100644
--- a/gui/dialogs/EditAccountDialog.cpp
+++ b/gui/dialogs/EditAccountDialog.cpp
@@ -16,11 +16,10 @@
#include "EditAccountDialog.h"
#include "ui_EditAccountDialog.h"
-EditAccountDialog::EditAccountDialog(const QString& text, QWidget *parent, int flags) :
- QDialog(parent),
- ui(new Ui::EditAccountDialog)
+EditAccountDialog::EditAccountDialog(const QString &text, QWidget *parent, int flags)
+ : QDialog(parent), ui(new Ui::EditAccountDialog)
{
- ui->setupUi(this);
+ ui->setupUi(this);
ui->label->setText(text);
ui->label->setVisible(!text.isEmpty());
@@ -31,7 +30,7 @@ EditAccountDialog::EditAccountDialog(const QString& text, QWidget *parent, int f
EditAccountDialog::~EditAccountDialog()
{
- delete ui;
+ delete ui;
}
QString EditAccountDialog::username() const
@@ -43,4 +42,3 @@ QString EditAccountDialog::password() const
{
return ui->passTextBox->text();
}
-
diff --git a/gui/dialogs/EditAccountDialog.h b/gui/dialogs/EditAccountDialog.h
index 847c3be5..be3a88d8 100644
--- a/gui/dialogs/EditAccountDialog.h
+++ b/gui/dialogs/EditAccountDialog.h
@@ -17,16 +17,18 @@
#include <QDialog>
-namespace Ui {
+namespace Ui
+{
class EditAccountDialog;
}
class EditAccountDialog : public QDialog
{
-Q_OBJECT
+ Q_OBJECT
public:
- explicit EditAccountDialog(const QString& text="", QWidget *parent = 0, int flags=UsernameField | PasswordField);
+ explicit EditAccountDialog(const QString &text = "", QWidget *parent = 0,
+ int flags = UsernameField | PasswordField);
~EditAccountDialog();
/*!
@@ -41,7 +43,7 @@ public:
enum Flags
{
- NoFlags=0,
+ NoFlags = 0,
//! Specifies that the dialog should have a username field.
UsernameField,
@@ -53,4 +55,3 @@ public:
private:
Ui::EditAccountDialog *ui;
};
-
diff --git a/gui/dialogs/EditNotesDialog.cpp b/gui/dialogs/EditNotesDialog.cpp
index cd52e694..a265a4d0 100644
--- a/gui/dialogs/EditNotesDialog.cpp
+++ b/gui/dialogs/EditNotesDialog.cpp
@@ -21,8 +21,8 @@
#include <QApplication>
EditNotesDialog::EditNotesDialog(QString notes, QString name, QWidget *parent)
- : m_instance_notes(notes), m_instance_name(name), QDialog(parent),
- ui(new Ui::EditNotesDialog)
+ : QDialog(parent), ui(new Ui::EditNotesDialog), m_instance_name(name),
+ m_instance_notes(notes)
{
MultiMCPlatform::fixWM_CLASS(this);
ui->setupUi(this);
diff --git a/gui/dialogs/InstanceSettings.cpp b/gui/dialogs/InstanceSettings.cpp
index f059047f..bc6b266a 100644
--- a/gui/dialogs/InstanceSettings.cpp
+++ b/gui/dialogs/InstanceSettings.cpp
@@ -32,7 +32,7 @@
#include <QMessageBox>
InstanceSettings::InstanceSettings(SettingsObject *obj, QWidget *parent)
- : m_obj(obj), QDialog(parent), ui(new Ui::InstanceSettings)
+ : QDialog(parent), ui(new Ui::InstanceSettings), m_obj(obj)
{
MultiMCPlatform::fixWM_CLASS(this);
ui->setupUi(this);
diff --git a/gui/dialogs/LegacyModEditDialog.cpp b/gui/dialogs/LegacyModEditDialog.cpp
index 25a1c616..66d53ee1 100644
--- a/gui/dialogs/LegacyModEditDialog.cpp
+++ b/gui/dialogs/LegacyModEditDialog.cpp
@@ -31,7 +31,7 @@
#include <QKeyEvent>
LegacyModEditDialog::LegacyModEditDialog(LegacyInstance *inst, QWidget *parent)
- : m_inst(inst), QDialog(parent), ui(new Ui::LegacyModEditDialog)
+ : QDialog(parent), ui(new Ui::LegacyModEditDialog), m_inst(inst)
{
MultiMCPlatform::fixWM_CLASS(this);
ui->setupUi(this);
diff --git a/gui/dialogs/OneSixModEditDialog.cpp b/gui/dialogs/OneSixModEditDialog.cpp
index dea1b86b..51ea2d19 100644
--- a/gui/dialogs/OneSixModEditDialog.cpp
+++ b/gui/dialogs/OneSixModEditDialog.cpp
@@ -40,7 +40,7 @@
#include "logic/ForgeInstaller.h"
OneSixModEditDialog::OneSixModEditDialog(OneSixInstance *inst, QWidget *parent)
- : m_inst(inst), QDialog(parent), ui(new Ui::OneSixModEditDialog)
+ : QDialog(parent), ui(new Ui::OneSixModEditDialog), m_inst(inst)
{
MultiMCPlatform::fixWM_CLASS(this);
ui->setupUi(this);