mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
handle unable to connect to domain case
This commit is contained in:
parent
45b2098346
commit
de5a0a714b
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "ConnectionMonitor.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "ui/DialogsManager.h"
|
||||
|
||||
#include <DependencyManager.h>
|
||||
|
@ -21,6 +22,7 @@
|
|||
// 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,7 +40,7 @@ void ConnectionMonitor::init() {
|
|||
|
||||
connect(&_timer, &QTimer::timeout, this, []() {
|
||||
qDebug() << "ConnectionMonitor: Showing connection failure window";
|
||||
//DependencyManager::get<DialogsManager>()->setDomainConnectionFailureVisibility(true);
|
||||
qApp->goToErrorDomainURL(ERROR_DOMAIN_URL);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -48,5 +50,4 @@ void ConnectionMonitor::startTimer() {
|
|||
|
||||
void ConnectionMonitor::stopTimer() {
|
||||
_timer.stop();
|
||||
//DependencyManager::get<DialogsManager>()->setDomainConnectionFailureVisibility(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue