From 1e6c5f7c25ddd2094e26e6af1159ec5912448705 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 1 Sep 2013 13:40:44 +0200 Subject: - 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 --- src/nxmaccessmanager.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/nxmaccessmanager.cpp') 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 . #include "utility.h" #include "selfupdater.h" #include +#include #include #include #include #include +#include #include #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 buttons = m_ProgressDialog.findChildren(); + 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 { -- cgit v1.3.1