mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-10 01:14:01 +02:00
Apply suggestions from code review
Co-authored-by: David Rowe <david@ctrlaltstudio.com>
This commit is contained in:
parent
3610446150
commit
fd5b84b6eb
2 changed files with 4 additions and 8 deletions
|
@ -695,7 +695,7 @@ void AccountManager::setAccessTokens(const QString& response) {
|
|||
} else {
|
||||
// clear the path from the response URL so we have the right root URL for this access token
|
||||
QUrl rootURL = rootObject.contains("url") ? rootObject["url"].toString() : _authURL;
|
||||
rootURL.setPath(getMetaverseServerURLPath() + "");
|
||||
rootURL.setPath(getMetaverseServerURLPath());
|
||||
|
||||
qCDebug(networking) << "Storing an account with access-token for" << qPrintable(rootURL.toString());
|
||||
|
||||
|
@ -730,7 +730,7 @@ void AccountManager::requestAccessTokenFinished() {
|
|||
} else {
|
||||
// clear the path from the response URL so we have the right root URL for this access token
|
||||
QUrl rootURL = requestReply->url();
|
||||
rootURL.setPath(getMetaverseServerURLPath() + "");
|
||||
rootURL.setPath(getMetaverseServerURLPath());
|
||||
|
||||
qCDebug(networking) << "Storing an account with access-token for" << qPrintable(rootURL.toString());
|
||||
|
||||
|
@ -766,7 +766,7 @@ void AccountManager::refreshAccessTokenFinished() {
|
|||
} else {
|
||||
// clear the path from the response URL so we have the right root URL for this access token
|
||||
QUrl rootURL = requestReply->url();
|
||||
rootURL.setPath(getMetaverseServerURLPath() + "");
|
||||
rootURL.setPath(getMetaverseServerURLPath());
|
||||
|
||||
qCDebug(networking) << "Storing an account with a refreshed access-token for" << qPrintable(rootURL.toString());
|
||||
|
||||
|
|
|
@ -39,11 +39,7 @@ namespace MetaverseAPI {
|
|||
QString getCurrentMetaverseServerURLPath(bool appendForwardSlash){
|
||||
QString path = getCurrentMetaverseServerURL().path();
|
||||
|
||||
if (path.isEmpty()) {
|
||||
return path;
|
||||
}
|
||||
|
||||
if (appendForwardSlash) {
|
||||
if (!path.isEmpty() && appendForwardSlash) {
|
||||
path.append("/");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue