Showing the changes to interface/src/Application.cpp (1 of 11 files). Show all
Unified · Split
| @@ -513,12 +513,12 @@ bool isDomainURL(QUrl url) { · 512 unmodified lines | ||
| 513 | 513 | if (!url.isValid()) { |
| 514 | 514 | return false; |
| 515 | 515 | } |
| 516 | − if (url.scheme() == HIFI_URL_SCHEME) { | |
| 516 | + if (url.scheme() == URL_SCHEME_HIFI) { | |
| 517 | 517 | return true; |
| 518 | 518 | } |
| 519 | − if (url.scheme() != "file" && | |
| 520 | − url.scheme() != "http" && | |
| 521 | − url.scheme() != "https") { | |
| 519 | + if (url.scheme() != URL_SCHEME_FILE && | |
| 520 | + url.scheme() != URL_SCHEME_HTTP && | |
| 521 | + url.scheme() != URL_SCHEME_HTTPS) { | |
| 522 | 522 | return false; |
| 523 | 523 | } |
| 524 | 524 | if (url.path().endsWith(".json", Qt::CaseInsensitive) || |
| @@ -3109,16 +3109,15 @@ bool Application::importFromZIP(const QString& filePath) { · 2584 unmodified lines | ||
| 3109 | 3109 | } |
| 3110 | 3110 | |
| 3111 | 3111 | bool Application::isServerlessMode() const { |
| 3112 | − auto& tree = getEntities()->getTree(); | |
| 3112 | + auto tree = getEntities()->getTree(); | |
| 3113 | 3113 | if (tree) { |
| 3114 | 3114 | return tree->isServerlessMode(); |
| 3115 | − } else { | |
| 3116 | − return false; | |
| 3117 | 3115 | } |
| 3116 | + return false; | |
| 3118 | 3117 | } |
| 3119 | 3118 | |
| 3120 | 3119 | void Application::setServerlessDomain(bool serverlessDomain) { |
| 3121 | − auto& tree = getEntities()->getTree(); | |
| 3120 | + auto tree = getEntities()->getTree(); | |
| 3122 | 3121 | if (tree) { |
| 3123 | 3122 | tree->setIsServerlessMode(serverlessDomain); |
| 3124 | 3123 | } |
| @@ -5885,7 +5884,7 @@ void Application::domainURLChanged(QUrl domainURL) { · 2760 unmodified lines | ||
| 5885 | 5884 | updateWindowTitle(); |
| 5886 | 5885 | // disable physics until we have enough information about our new location to not cause craziness. |
| 5887 | 5886 | resetPhysicsReadyInformation(); |
| 5888 | − if (domainURL.scheme() != HIFI_URL_SCHEME) { | |
| 5887 | + if (domainURL.scheme() != URL_SCHEME_HIFI) { | |
| 5889 | 5888 | loadServerlessDomain(domainURL); |
| 5890 | 5889 | } |
| 5891 | 5890 | } |
| @@ -6257,7 +6256,7 @@ bool Application::canAcceptURL(const QString& urlString) const { · 365 unmodified lines | ||
| 6257 | 6256 | QUrl url(urlString); |
| 6258 | 6257 | if (url.query().contains(WEB_VIEW_TAG)) { |
| 6259 | 6258 | return false; |
| 6260 | − } else if (urlString.startsWith(HIFI_URL_SCHEME)) { | |
| 6259 | + } else if (urlString.startsWith(URL_SCHEME_HIFI)) { | |
| 6261 | 6260 | return true; |
| 6262 | 6261 | } |
| 6263 | 6262 | QHashIterator<QString, AcceptURLMethod> i(_acceptedExtensions); |