mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:13:05 +02:00
name emit from AddressManager like an event
This commit is contained in:
parent
9f2be4db8f
commit
12eb0e4109
3 changed files with 7 additions and 8 deletions
|
@ -1169,7 +1169,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
connect(addressManager.data(), &AddressManager::hostChanged, this, &Application::updateWindowTitle);
|
connect(addressManager.data(), &AddressManager::hostChanged, this, &Application::updateWindowTitle);
|
||||||
connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);
|
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, &Application::updateThreadPoolCount);
|
||||||
connect(this, &Application::activeDisplayPluginChanged, this, [](){
|
connect(this, &Application::activeDisplayPluginChanged, this, [](){
|
||||||
|
@ -3116,10 +3116,10 @@ bool Application::isServerlessMode() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::setServerlessDomain(bool serverlessDomain) {
|
void Application::setServerlessDomain(bool isHifiScheme) {
|
||||||
auto tree = getEntities()->getTree();
|
auto tree = getEntities()->getTree();
|
||||||
if (tree) {
|
if (tree) {
|
||||||
tree->setIsServerlessMode(serverlessDomain);
|
tree->setIsServerlessMode(!isHifiScheme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
||||||
|
|
||||||
qCDebug(networking) << "Trying to go to URL" << lookupUrl.toString();
|
qCDebug(networking) << "Trying to go to URL" << lookupUrl.toString();
|
||||||
|
|
||||||
emit setServerlessDomain(false);
|
emit urlHandled(false);
|
||||||
DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::LookupAddress);
|
DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::LookupAddress);
|
||||||
|
|
||||||
// there are 4 possible lookup strings
|
// there are 4 possible lookup strings
|
||||||
|
@ -295,7 +295,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
||||||
lookupUrl.scheme() == URL_SCHEME_FILE) {
|
lookupUrl.scheme() == URL_SCHEME_FILE) {
|
||||||
_previousLookup.clear();
|
_previousLookup.clear();
|
||||||
QUrl domainUrl = PathUtils::expandToLocalDataAbsolutePath(lookupUrl);
|
QUrl domainUrl = PathUtils::expandToLocalDataAbsolutePath(lookupUrl);
|
||||||
emit setServerlessDomain(true);
|
emit urlHandled(true);
|
||||||
setDomainInfo(domainUrl, trigger);
|
setDomainInfo(domainUrl, trigger);
|
||||||
DependencyManager::get<NodeList>()->getDomainHandler().setIsConnected(true);
|
DependencyManager::get<NodeList>()->getDomainHandler().setIsConnected(true);
|
||||||
emit lookupResultsFinished();
|
emit lookupResultsFinished();
|
||||||
|
|
|
@ -400,7 +400,7 @@ signals:
|
||||||
void goBackPossible(bool isPossible);
|
void goBackPossible(bool isPossible);
|
||||||
|
|
||||||
/**jsdoc
|
/**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.)
|
* {@link location.goForward|goForward}. (Reflects changes in the state of the "Goto" dialog's forward arrow.)
|
||||||
* @function location.goForwardPossible
|
* @function location.goForwardPossible
|
||||||
* @param {boolean} isPossible - <code>true</code> if there's a forward location to navigate to, otherwise
|
* @param {boolean} isPossible - <code>true</code> if there's a forward location to navigate to, otherwise
|
||||||
|
@ -415,8 +415,7 @@ signals:
|
||||||
*/
|
*/
|
||||||
void goForwardPossible(bool isPossible);
|
void goForwardPossible(bool isPossible);
|
||||||
|
|
||||||
void setServerlessDomain(bool serverlessDomain);
|
void urlHandled(bool isHifiScheme);
|
||||||
void loadServerlessDomain(QUrl domainURL);
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleAPIResponse(QNetworkReply& requestReply);
|
void handleAPIResponse(QNetworkReply& requestReply);
|
||||||
|
|
Loading…
Reference in a new issue