From 6892c11e9f287dcfb1e698f8f46233a01fb7abb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 7 Sep 2013 04:00:58 +0200 Subject: Move a good chunk of the singleton objects into a new QApplication subclass. --- logic/tasks/LoginTask.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'logic/tasks') 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 @@ -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) -- cgit v1.2.3