diff options
author | Andrew <forkk@forkk.net> | 2013-03-13 13:25:24 -0500 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-03-13 13:25:24 -0500 |
commit | 8864c7ebdc7c6591f17ed65a474113b66e974488 (patch) | |
tree | 4a8ad6a1e771834f2060fcffd77e2dc820fb5cab /libmultimc/src | |
parent | f0cb300d04aac77fbe6e03dfdbe201f5f834d886 (diff) | |
parent | 46f93311afc9f1e2afc306f63cee0e4f462758e2 (diff) | |
download | MultiMC-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')
-rw-r--r-- | libmultimc/src/appsettings.cpp | 3 | ||||
-rw-r--r-- | libmultimc/src/instancelist.cpp | 2 | ||||
-rw-r--r-- | libmultimc/src/logintask.cpp | 22 |
3 files changed, 14 insertions, 13 deletions
diff --git a/libmultimc/src/appsettings.cpp b/libmultimc/src/appsettings.cpp index 68d2c015..7c886fdb 100644 --- a/libmultimc/src/appsettings.cpp +++ b/libmultimc/src/appsettings.cpp @@ -18,10 +18,11 @@ #include <setting.h> #include <QPoint> +#include <QApplication> //#include <QColor> AppSettings::AppSettings(QObject *parent) : - BasicSettingsObject(parent) + INISettingsObject(QApplication::applicationDirPath() + "/multimc.cfg",parent) { // Updates registerSetting(new Setting("UseDevBuilds", false)); diff --git a/libmultimc/src/instancelist.cpp b/libmultimc/src/instancelist.cpp index 3b0b668f..78650634 100644 --- a/libmultimc/src/instancelist.cpp +++ b/libmultimc/src/instancelist.cpp @@ -28,7 +28,7 @@ InstanceList::InstanceList(const QString &instDir, QObject *parent) : - QObject(parent), m_instDir(instDir) + QObject(parent), m_instDir("instances") { } 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; } |