mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 17:29:47 +02:00
use const QUrls rather than functions
This commit is contained in:
parent
8a08039efe
commit
4505fce508
2 changed files with 3 additions and 11 deletions
|
@ -13,21 +13,13 @@
|
|||
#include "NetworkingConstants.h"
|
||||
|
||||
namespace NetworkingConstants {
|
||||
QUrl METAVERSE_SERVER_URL_STABLE() {
|
||||
return QUrl("https://metaverse.highfidelity.com");
|
||||
}
|
||||
|
||||
QUrl METAVERSE_SERVER_URL_STAGING() {
|
||||
return QUrl("https://staging.highfidelity.com");
|
||||
}
|
||||
|
||||
// You can change the return of this function if you want to use a custom metaverse URL at compile time
|
||||
// or you can pass a custom URL via the env variable
|
||||
QUrl METAVERSE_SERVER_URL() {
|
||||
static const QString HIFI_METAVERSE_URL_ENV = "HIFI_METAVERSE_URL";
|
||||
static const QUrl serverURL = QProcessEnvironment::systemEnvironment().contains(HIFI_METAVERSE_URL_ENV)
|
||||
? QUrl(QProcessEnvironment::systemEnvironment().value(HIFI_METAVERSE_URL_ENV))
|
||||
: METAVERSE_SERVER_URL_STABLE();
|
||||
: METAVERSE_SERVER_URL_STABLE;
|
||||
return serverURL;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ namespace NetworkingConstants {
|
|||
// if you manually generate a personal access token for the domains scope
|
||||
// at https://staging.highfidelity.com/user/tokens/new?for_domain_server=true
|
||||
|
||||
QUrl METAVERSE_SERVER_URL_STABLE();
|
||||
QUrl METAVERSE_SERVER_URL_STAGING();
|
||||
const QUrl METAVERSE_SERVER_URL_STABLE { "https://metaverse.highfidelity.com" };
|
||||
const QUrl METAVERSE_SERVER_URL_STAGING { "https://staging.highfidelity.com" };
|
||||
QUrl METAVERSE_SERVER_URL();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue