Revert "make sure UserActivityLogger::close() waits for the pending log message to complete"

This reverts commit 3bd3f5a6d2.
This commit is contained in:
Stephen Birarda 2015-03-12 15:04:51 -07:00
parent 6e10ed7f9b
commit df8864f9b0
3 changed files with 1 additions and 19 deletions

View file

@ -19,7 +19,6 @@
#include <QtCore/QUrlQuery>
#include <QtNetwork/QHttpMultiPart>
#include <QtNetwork/QNetworkRequest>
#include <QEventLoop>
#include <qthread.h>
#include <SettingHandle.h>
@ -300,8 +299,6 @@ void AccountManager::processReply() {
passErrorToCallback(requestReply);
}
delete requestReply;
emit replyFinished();
}
void AccountManager::passSuccessToCallback(QNetworkReply* requestReply) {
@ -342,15 +339,6 @@ void AccountManager::passErrorToCallback(QNetworkReply* requestReply) {
}
}
void AccountManager::waitForAllPendingReplies() {
while (_pendingCallbackMap.size() > 0) {
QEventLoop loop;
QObject::connect(this, &AccountManager::replyFinished, &loop, &QEventLoop::quit);
loop.exec();
}
}
void AccountManager::persistAccountToSettings() {
if (_shouldPersistToSettingsFile) {
// store this access token into the local settings

View file

@ -72,8 +72,6 @@ public:
void requestProfile();
DataServerAccountInfo& getAccountInfo() { return _accountInfo; }
void waitForAllPendingReplies();
public slots:
void requestAccessToken(const QString& login, const QString& password);
@ -95,8 +93,6 @@ signals:
void loginFailed();
void logoutComplete();
void balanceChanged(qint64 newBalance);
void replyFinished();
private slots:
void processReply();
void handleKeypairGenerationError();

View file

@ -61,7 +61,7 @@ void UserActivityLogger::logAction(QString action, QJsonObject details, JSONCall
params.errorCallbackReceiver = this;
params.errorCallbackMethod = "requestError";
}
accountManager.authenticatedRequest(USER_ACTIVITY_URL,
QNetworkAccessManager::PostOperation,
params,
@ -89,8 +89,6 @@ void UserActivityLogger::launch(QString applicationVersion) {
void UserActivityLogger::close() {
const QString ACTION_NAME = "close";
logAction(ACTION_NAME, QJsonObject());
AccountManager::getInstance().waitForAllPendingReplies();
}
void UserActivityLogger::changedDisplayName(QString displayName) {