mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:43:03 +02:00
don't replace url query in XMLHttpRequest class
This commit is contained in:
parent
5b3897f1cf
commit
7ad590c578
1 changed files with 9 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <qurlquery.h>
|
||||||
|
|
||||||
#include <NetworkAccessManager.h>
|
#include <NetworkAccessManager.h>
|
||||||
|
|
||||||
|
@ -207,7 +208,14 @@ void XMLHttpRequestClass::open(const QString& method, const QString& url, bool a
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (url.toLower().left(33) == "https://data.highfidelity.io/api/") {
|
if (url.toLower().left(33) == "https://data.highfidelity.io/api/") {
|
||||||
_url.setQuery("access_token=" + AccountManager::getInstance().getAccountInfo().getAccessToken().token);
|
AccountManager& accountManager = AccountManager::getInstance();
|
||||||
|
|
||||||
|
if (accountManager.hasValidAccessToken()) {
|
||||||
|
QUrlQuery urlQuery(_url.query());
|
||||||
|
urlQuery.addQueryItem("access_token", accountManager.getAccountInfo().getAccessToken().token);
|
||||||
|
_url.setQuery(urlQuery);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!username.isEmpty()) {
|
if (!username.isEmpty()) {
|
||||||
_url.setUserName(username);
|
_url.setUserName(username);
|
||||||
|
|
Loading…
Reference in a new issue