mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
temporary fix to OSX 10.8 problem by delaying creation of _networkAccessManager
This commit is contained in:
parent
4fbb4b240e
commit
e2415642f0
1 changed files with 11 additions and 1 deletions
|
@ -35,7 +35,7 @@ const QString ACCOUNTS_GROUP = "accounts";
|
|||
|
||||
AccountManager::AccountManager() :
|
||||
_authURL(),
|
||||
_networkAccessManager(new QNetworkAccessManager(this)),
|
||||
_networkAccessManager(NULL),
|
||||
_pendingCallbackMap(),
|
||||
_accountInfo()
|
||||
{
|
||||
|
@ -109,6 +109,11 @@ void AccountManager::authenticatedRequest(const QString& path, QNetworkAccessMan
|
|||
|
||||
void AccountManager::invokedRequest(const QString& path, QNetworkAccessManager::Operation operation,
|
||||
const JSONCallbackParameters& callbackParams, const QByteArray& dataByteArray) {
|
||||
|
||||
if (!_networkAccessManager) {
|
||||
_networkAccessManager = new QNetworkAccessManager(this);
|
||||
}
|
||||
|
||||
if (hasValidAccessToken()) {
|
||||
QNetworkRequest authenticatedRequest;
|
||||
|
||||
|
@ -229,6 +234,11 @@ bool AccountManager::checkAndSignalForAccessToken() {
|
|||
}
|
||||
|
||||
void AccountManager::requestAccessToken(const QString& login, const QString& password) {
|
||||
|
||||
if (!_networkAccessManager) {
|
||||
_networkAccessManager = new QNetworkAccessManager(this);
|
||||
}
|
||||
|
||||
QNetworkRequest request;
|
||||
|
||||
QUrl grantURL = _authURL;
|
||||
|
|
Loading…
Reference in a new issue