summaryrefslogtreecommitdiffstats
path: root/libmultimc/src/logintask.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-03-13 13:25:24 -0500
committerAndrew <forkk@forkk.net>2013-03-13 13:25:24 -0500
commit8864c7ebdc7c6591f17ed65a474113b66e974488 (patch)
tree4a8ad6a1e771834f2060fcffd77e2dc820fb5cab /libmultimc/src/logintask.cpp
parentf0cb300d04aac77fbe6e03dfdbe201f5f834d886 (diff)
parent46f93311afc9f1e2afc306f63cee0e4f462758e2 (diff)
downloadMultiMC-8864c7ebdc7c6591f17ed65a474113b66e974488.tar
MultiMC-8864c7ebdc7c6591f17ed65a474113b66e974488.tar.gz
MultiMC-8864c7ebdc7c6591f17ed65a474113b66e974488.tar.lz
MultiMC-8864c7ebdc7c6591f17ed65a474113b66e974488.tar.xz
MultiMC-8864c7ebdc7c6591f17ed65a474113b66e974488.zip
Merge branch 'master' of git://github.com/peterix/MultiMC5
Diffstat (limited to 'libmultimc/src/logintask.cpp')
-rw-r--r--libmultimc/src/logintask.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/libmultimc/src/logintask.cpp b/libmultimc/src/logintask.cpp
index 71075630..e042a93f 100644
--- a/libmultimc/src/logintask.cpp
+++ b/libmultimc/src/logintask.cpp
@@ -24,8 +24,8 @@
#include <QUrl>
#include <QUrlQuery>
-LoginTask::LoginTask(const UserInfo &uInfo, QObject *parent) :
- Task(parent), uInfo(uInfo)
+LoginTask::LoginTask( const UserInfo& uInfo, QString inst, QObject* parent ) :
+ Task(parent), uInfo(uInfo), inst(inst)
{
}
@@ -78,42 +78,42 @@ void LoginTask::processNetReply(QNetworkReply *reply)
QString sessionID = strings[3];
LoginResponse response(username, sessionID, latestVersion);
- emit loginComplete(response);
+ emit loginComplete(inst, response);
}
else
{
- emit loginFailed("Failed to parse Minecraft version string.");
+ emit loginFailed(inst, "Failed to parse Minecraft version string.");
}
}
else
{
if (responseStr.toLower() == "bad login")
- emit loginFailed("Invalid username or password.");
+ emit loginFailed(inst, "Invalid username or password.");
else if (responseStr.toLower() == "old version")
- emit loginFailed("Launcher outdated, please update.");
+ emit loginFailed(inst, "Launcher outdated, please update.");
else
- emit loginFailed("Login failed: " + responseStr);
+ emit loginFailed(inst, "Login failed: " + responseStr);
}
}
else if (responseCode == 503)
{
- emit loginFailed("The login servers are currently unavailable. "
+ emit loginFailed(inst, "The login servers are currently unavailable. "
"Check http://help.mojang.com/ for more info.");
}
else
{
- emit loginFailed(QString("Login failed: Unknown HTTP error %1 occurred.").
+ emit loginFailed(inst, QString("Login failed: Unknown HTTP error %1 occurred.").
arg(QString::number(responseCode)));
}
break;
}
case QNetworkReply::OperationCanceledError:
- emit loginFailed("Login canceled.");
+ emit loginFailed(inst, "Login canceled.");
break;
default:
- emit loginFailed("Login failed: " + reply->errorString());
+ emit loginFailed(inst, "Login failed: " + reply->errorString());
break;
}