mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-02 10:01:14 +02:00
WL 21666 - Window.domainChanged() isn't emitted if domain isn't running
This commit is contained in:
parent
c33c637f07
commit
46de7ed83b
2 changed files with 7 additions and 0 deletions
|
@ -49,6 +49,8 @@ void CustomPromptResultFromScriptValue(const QScriptValue& object, CustomPromptR
|
||||||
WindowScriptingInterface::WindowScriptingInterface() {
|
WindowScriptingInterface::WindowScriptingInterface() {
|
||||||
const DomainHandler& domainHandler = DependencyManager::get<NodeList>()->getDomainHandler();
|
const DomainHandler& domainHandler = DependencyManager::get<NodeList>()->getDomainHandler();
|
||||||
connect(&domainHandler, &DomainHandler::connectedToDomain, this, &WindowScriptingInterface::domainChanged);
|
connect(&domainHandler, &DomainHandler::connectedToDomain, this, &WindowScriptingInterface::domainChanged);
|
||||||
|
connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, &WindowScriptingInterface::disconnectedFromDomain);
|
||||||
|
|
||||||
connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &WindowScriptingInterface::domainConnectionRefused);
|
connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &WindowScriptingInterface::domainConnectionRefused);
|
||||||
|
|
||||||
connect(qApp, &Application::svoImportRequested, [this](const QString& urlString) {
|
connect(qApp, &Application::svoImportRequested, [this](const QString& urlString) {
|
||||||
|
@ -134,6 +136,10 @@ void WindowScriptingInterface::promptAsync(const QString& message, const QString
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WindowScriptingInterface::disconnectedFromDomain() {
|
||||||
|
emit domainChanged("");
|
||||||
|
}
|
||||||
|
|
||||||
CustomPromptResult WindowScriptingInterface::customPrompt(const QVariant& config) {
|
CustomPromptResult WindowScriptingInterface::customPrompt(const QVariant& config) {
|
||||||
CustomPromptResult result;
|
CustomPromptResult result;
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
|
|
@ -83,6 +83,7 @@ public slots:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onMessageBoxSelected(int button);
|
void onMessageBoxSelected(int button);
|
||||||
|
void disconnectedFromDomain();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void domainChanged(const QString& domainHostname);
|
void domainChanged(const QString& domainHostname);
|
||||||
|
|
Loading…
Reference in a new issue