summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-03-11 22:19:17 +0100
committerPetr Mrázek <peterix@gmail.com>2013-03-11 22:19:17 +0100
commit46f93311afc9f1e2afc306f63cee0e4f462758e2 (patch)
treecc945d66e6ca5e68c43b354d3f8f6d6e70cf5326 /main.cpp
parent36396f7c6aca9fcc61c8620e10c31ed2c8999ebd (diff)
downloadMultiMC-46f93311afc9f1e2afc306f63cee0e4f462758e2.tar
MultiMC-46f93311afc9f1e2afc306f63cee0e4f462758e2.tar.gz
MultiMC-46f93311afc9f1e2afc306f63cee0e4f462758e2.tar.lz
MultiMC-46f93311afc9f1e2afc306f63cee0e4f462758e2.tar.xz
MultiMC-46f93311afc9f1e2afc306f63cee0e4f462758e2.zip
Instance view, model, delegate.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/main.cpp b/main.cpp
index 465ee3c7..cf193ff0 100644
--- a/main.cpp
+++ b/main.cpp
@@ -81,7 +81,7 @@ private slots:
QApplication::instance()->quit();
}
- void onLoginComplete(LoginResponse response)
+ void onLoginComplete(QString instId, LoginResponse response)
{
// TODO: console
console = new ConsoleWindow();
@@ -92,7 +92,7 @@ private slots:
proc->launch();
}
- void doLogin(const QString &errorMsg)
+ void doLogin(QString instId, const QString &errorMsg)
{
LoginDialog* loginDlg = new LoginDialog(nullptr, errorMsg);
if (loginDlg->exec())
@@ -100,11 +100,11 @@ private slots:
UserInfo uInfo(loginDlg->getUsername(), loginDlg->getPassword());
TaskDialog* tDialog = new TaskDialog(nullptr);
- LoginTask* loginTask = new LoginTask(uInfo, tDialog);
- connect(loginTask, SIGNAL(loginComplete(LoginResponse)),
- SLOT(onLoginComplete(LoginResponse)), Qt::QueuedConnection);
- connect(loginTask, SIGNAL(loginFailed(QString)),
- SLOT(doLogin(QString)), Qt::QueuedConnection);
+ LoginTask* loginTask = new LoginTask(uInfo, instance.data()->id(), tDialog);
+ connect(loginTask, SIGNAL(loginComplete(QString, LoginResponse)),
+ SLOT(onLoginComplete(QString, LoginResponse)), Qt::QueuedConnection);
+ connect(loginTask, SIGNAL(loginFailed(QString, QString)),
+ SLOT(doLogin(QString, QString)), Qt::QueuedConnection);
tDialog->exec(loginTask);
}
//onLoginComplete(LoginResponse("Offline","Offline", 1));
@@ -125,7 +125,7 @@ public:
}
std::cout << "Logging in..." << std::endl;
- doLogin("");
+ doLogin(instance->id(),"");
return QApplication::instance()->exec();
}