diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-07 04:00:58 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-07 04:00:58 +0200 |
commit | 6892c11e9f287dcfb1e698f8f46233a01fb7abb6 (patch) | |
tree | ee94607e92bcf39faef7f35842499fafbb2e270f /logic/tasks/LoginTask.cpp | |
parent | 3f30055afe757637ae865b2adc7cf021edd9b8b5 (diff) | |
download | MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.tar MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.tar.gz MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.tar.lz MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.tar.xz MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.zip |
Move a good chunk of the singleton objects into a new QApplication subclass.
Diffstat (limited to 'logic/tasks/LoginTask.cpp')
-rw-r--r-- | logic/tasks/LoginTask.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/logic/tasks/LoginTask.cpp b/logic/tasks/LoginTask.cpp index 4e2f0fb7..ad9de7f5 100644 --- a/logic/tasks/LoginTask.cpp +++ b/logic/tasks/LoginTask.cpp @@ -14,7 +14,7 @@ */ #include "LoginTask.h" -#include "logic/net/NetWorker.h" +#include "MultiMC.h" #include <QStringList> @@ -29,8 +29,8 @@ LoginTask::LoginTask( const UserInfo& uInfo, QObject* parent ) : Task(parent), u void LoginTask::executeTask() { setStatus("Logging in..."); - auto & worker = NetWorker::qnam(); - connect(&worker, SIGNAL(finished(QNetworkReply*)), this, SLOT(processNetReply(QNetworkReply*))); + auto worker = MMC->qnam(); + connect(worker, SIGNAL(finished(QNetworkReply*)), this, SLOT(processNetReply(QNetworkReply*))); QUrl loginURL("https://login.minecraft.net/"); QNetworkRequest netRequest(loginURL); @@ -41,7 +41,7 @@ void LoginTask::executeTask() params.addQueryItem("password", uInfo.password); params.addQueryItem("version", "13"); - netReply = worker.post(netRequest, params.query(QUrl::EncodeSpaces).toUtf8()); + netReply = worker->post(netRequest, params.query(QUrl::EncodeSpaces).toUtf8()); } void LoginTask::processNetReply(QNetworkReply *reply) |