diff options
| author | Tannin <devnull@localhost> | 2013-09-01 13:40:44 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-09-01 13:40:44 +0200 |
| commit | 1e6c5f7c25ddd2094e26e6af1159ec5912448705 (patch) | |
| tree | 83ff6e2fd35c1614f2e13ff22f0f7b8214ab042b /src/nxmaccessmanager.cpp | |
| parent | 49e1dd23b699b499d9b715ef74cb7ca5b0189584 (diff) | |
- added a new column for not-yet-endorsed mods
- set categories menu no longer closes when the mouse cursor leaves the menu
- MO will no longer change the endorsement flag if an update doesn't contain it
- the column selection for the mod list can now only be accessed by mouse,
hotkeys open the context menu of the mod
- now displaying a progress dialog during login. For unknown reasons MO hangs during that time
Diffstat (limited to 'src/nxmaccessmanager.cpp')
| -rw-r--r-- | src/nxmaccessmanager.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp index dce2131a..008d20a6 100644 --- a/src/nxmaccessmanager.cpp +++ b/src/nxmaccessmanager.cpp @@ -23,10 +23,12 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "utility.h" #include "selfupdater.h" #include <QMessageBox> +#include <QPushButton> #include <QNetworkProxy> #include <QNetworkRequest> #include <QNetworkCookie> #include <QNetworkCookieJar> +#include <QCoreApplication> #include <gameinfo.h> #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) @@ -117,8 +119,13 @@ void NXMAccessManager::pageLogin() postDataQuery = postData.encodedQuery(); #endif - m_LoginReply = post(request, postDataQuery); + m_ProgressDialog.setLabelText(tr("Logging into Nexus")); + QList<QPushButton*> buttons = m_ProgressDialog.findChildren<QPushButton*>(); + buttons.at(0)->setEnabled(false); + m_ProgressDialog.show(); + QCoreApplication::processEvents(); // for some reason the whole app hangs during the login. This way the user has at least a little feedback + m_LoginReply = post(request, postDataQuery); m_LoginTimeout.start(); connect(m_LoginReply, SIGNAL(finished()), this, SLOT(loginFinished())); connect(m_LoginReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(loginError(QNetworkReply::NetworkError))); @@ -138,6 +145,7 @@ void NXMAccessManager::loginTimeout() void NXMAccessManager::loginError(QNetworkReply::NetworkError) { + m_ProgressDialog.hide(); emit loginFailed(m_LoginReply->errorString()); m_LoginTimeout.stop(); m_LoginReply->deleteLater(); @@ -162,6 +170,7 @@ bool NXMAccessManager::hasLoginCookies() const void NXMAccessManager::loginFinished() { + m_ProgressDialog.hide(); if (hasLoginCookies()) { emit loginSuccessful(true); } else { |
