From 12eb0e4109791a0271713cd30047bb6b901a70c4 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 7 Mar 2018 15:36:35 -0800 Subject: [PATCH] name emit from AddressManager like an event --- interface/src/Application.cpp | 6 +++--- libraries/networking/src/AddressManager.cpp | 4 ++-- libraries/networking/src/AddressManager.h | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 1a5ceec34c..454c46c16e 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1169,7 +1169,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo connect(addressManager.data(), &AddressManager::hostChanged, this, &Application::updateWindowTitle); connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress); - connect(addressManager.data(), &AddressManager::setServerlessDomain, this, &Application::setServerlessDomain); + connect(addressManager.data(), &AddressManager::urlHandled, this, &Application::setServerlessDomain); connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateThreadPoolCount); connect(this, &Application::activeDisplayPluginChanged, this, [](){ @@ -3116,10 +3116,10 @@ bool Application::isServerlessMode() const { return false; } -void Application::setServerlessDomain(bool serverlessDomain) { +void Application::setServerlessDomain(bool isHifiScheme) { auto tree = getEntities()->getTree(); if (tree) { - tree->setIsServerlessMode(serverlessDomain); + tree->setIsServerlessMode(!isHifiScheme); } } diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 5a89d222b7..b3cc3b09c3 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -212,7 +212,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { qCDebug(networking) << "Trying to go to URL" << lookupUrl.toString(); - emit setServerlessDomain(false); + emit urlHandled(false); DependencyManager::get()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::LookupAddress); // there are 4 possible lookup strings @@ -295,7 +295,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) { lookupUrl.scheme() == URL_SCHEME_FILE) { _previousLookup.clear(); QUrl domainUrl = PathUtils::expandToLocalDataAbsolutePath(lookupUrl); - emit setServerlessDomain(true); + emit urlHandled(true); setDomainInfo(domainUrl, trigger); DependencyManager::get()->getDomainHandler().setIsConnected(true); emit lookupResultsFinished(); diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index eb06043ad6..baab939c14 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -400,7 +400,7 @@ signals: void goBackPossible(bool isPossible); /**jsdoc - * Triggered when there's a change in whether or not there's a forward location that can be navigated to using + * Triggered when there's a change in whether or not there's a forward location that can be navigated to using * {@link location.goForward|goForward}. (Reflects changes in the state of the "Goto" dialog's forward arrow.) * @function location.goForwardPossible * @param {boolean} isPossible - true if there's a forward location to navigate to, otherwise @@ -415,8 +415,7 @@ signals: */ void goForwardPossible(bool isPossible); - void setServerlessDomain(bool serverlessDomain); - void loadServerlessDomain(QUrl domainURL); + void urlHandled(bool isHifiScheme); private slots: void handleAPIResponse(QNetworkReply& requestReply);