diff --git a/interface/src/Application.h b/interface/src/Application.h index de02b7f140..4446a7d406 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -346,6 +346,7 @@ public slots: bool importEntities(const QString& url); void updateThreadPoolCount() const; void updateSystemTabletMode(); + void goToErrorDomainURL(QUrl errorDomainURL); Q_INVOKABLE void loadDialog(); Q_INVOKABLE void loadScriptURLDialog() const; @@ -474,7 +475,6 @@ private slots: void setSessionUUID(const QUuid& sessionUUID) const; void domainURLChanged(QUrl domainURL); - void goToErrorDomainURL(QUrl errorDomainURL); void updateWindowTitle() const; void nodeAdded(SharedNodePointer node) const; void nodeActivated(SharedNodePointer node); diff --git a/interface/src/ConnectionMonitor.cpp b/interface/src/ConnectionMonitor.cpp index 2407e1bfdf..6578abf285 100644 --- a/interface/src/ConnectionMonitor.cpp +++ b/interface/src/ConnectionMonitor.cpp @@ -11,16 +11,19 @@ #include "ConnectionMonitor.h" +#include "Application.h" #include "ui/DialogsManager.h" #include #include +#include #include // Because the connection monitor is created at startup, the time we wait on initial load // should be longer to allow the application to initialize. static const int ON_INITIAL_LOAD_DISPLAY_AFTER_DISCONNECTED_FOR_X_MS = 10000; static const int DISPLAY_AFTER_DISCONNECTED_FOR_X_MS = 5000; +static const QString ERROR_DOMAIN_URL = "file:///~/serverless/redirect.json"; void ConnectionMonitor::init() { // Connect to domain disconnected message @@ -38,6 +41,7 @@ void ConnectionMonitor::init() { connect(&_timer, &QTimer::timeout, this, []() { qDebug() << "ConnectionMonitor: Showing connection failure window"; + qApp->goToErrorDomainURL(REDIRECT_HIFI_ADDRESS); }); }