mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 00:57:30 +02:00
Fix domain login dialog disappearing when teleport to domain
This commit is contained in:
parent
361ab97d83
commit
ed44438387
3 changed files with 7 additions and 10 deletions
|
@ -117,8 +117,6 @@ void DialogsManager::toggleLoginDialog() {
|
||||||
|
|
||||||
void DialogsManager::showLoginDialog() {
|
void DialogsManager::showLoginDialog() {
|
||||||
|
|
||||||
qDebug() << "#######: showLoginDialog()";
|
|
||||||
|
|
||||||
// ####### TODO: May be called from script via DialogsManagerScriptingInterface. Need to handle the case that it's already
|
// ####### TODO: May be called from script via DialogsManagerScriptingInterface. Need to handle the case that it's already
|
||||||
// displayed and may be the domain login version.
|
// displayed and may be the domain login version.
|
||||||
|
|
||||||
|
@ -132,9 +130,6 @@ void DialogsManager::hideLoginDialog() {
|
||||||
|
|
||||||
|
|
||||||
void DialogsManager::showDomainLoginDialog() {
|
void DialogsManager::showDomainLoginDialog() {
|
||||||
|
|
||||||
qDebug() << "#######: showDomainLoginDialog()";
|
|
||||||
|
|
||||||
_isDomainLogin = true;
|
_isDomainLogin = true;
|
||||||
LoginDialog::showWithSelection();
|
LoginDialog::showWithSelection();
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,14 +133,12 @@ void LoginDialog::dismissLoginDialog() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoginDialog::login(const QString& username, const QString& password) const {
|
void LoginDialog::login(const QString& username, const QString& password) const {
|
||||||
qDebug() << "Attempting to login " << username;
|
qDebug() << "Attempting to login" << username;
|
||||||
DependencyManager::get<AccountManager>()->requestAccessToken(username, password);
|
DependencyManager::get<AccountManager>()->requestAccessToken(username, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoginDialog::loginDomain(const QString& username, const QString& password, const QString& domainAuthProvider) const {
|
void LoginDialog::loginDomain(const QString& username, const QString& password, const QString& domainAuthProvider) const {
|
||||||
qDebug() << "####### LoginDialog::loginDomain()";
|
qDebug() << "Attempting to login" << username << "into a domain through" << domainAuthProvider;
|
||||||
|
|
||||||
qDebug() << "Attempting to login " << username << "into a domain through" << domainAuthProvider;
|
|
||||||
// ####### TODO
|
// ####### TODO
|
||||||
// DependencyManager::get<DomainAccountManager>()->requestAccessToken(username, password, domainAuthProvider);
|
// DependencyManager::get<DomainAccountManager>()->requestAccessToken(username, password, domainAuthProvider);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
#include "DomainAccountManager.h"
|
#include "DomainAccountManager.h"
|
||||||
|
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
|
|
||||||
DomainAccountManager::DomainAccountManager() {
|
DomainAccountManager::DomainAccountManager() {
|
||||||
|
|
||||||
|
@ -28,7 +30,9 @@ bool DomainAccountManager::checkAndSignalForAccessToken() {
|
||||||
|
|
||||||
if (!hasToken) {
|
if (!hasToken) {
|
||||||
// Emit a signal so somebody can call back to us and request an access token given a user name and password.
|
// Emit a signal so somebody can call back to us and request an access token given a user name and password.
|
||||||
emit authRequired();
|
|
||||||
|
// Dialog can be hidden immediately after showing if we've just teleported to the domain, unless the signal is delayed.
|
||||||
|
QTimer::singleShot(500, this, [this] { emit this->authRequired(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
return hasToken;
|
return hasToken;
|
||||||
|
|
Loading…
Reference in a new issue