adding prototype functions

This commit is contained in:
Wayne Chen 2018-10-29 08:47:09 -07:00
parent 955b0a580e
commit c4aabfda44
4 changed files with 25 additions and 8 deletions

View file

@ -5181,6 +5181,12 @@ void Application::init() {
_entitySimulation->setWorkloadSpace(getEntities()->getWorkloadSpace()); _entitySimulation->setWorkloadSpace(getEntities()->getWorkloadSpace());
} }
void Application::pauseUntilLoginDetermined() {
}
void Application::resumeAfterLoginDialogActionTaken() {
}
void Application::loadAvatarScripts(const QVector<QString>& urls) { void Application::loadAvatarScripts(const QVector<QString>& urls) {
auto scriptEngines = DependencyManager::get<ScriptEngines>(); auto scriptEngines = DependencyManager::get<ScriptEngines>();
auto runningScripts = scriptEngines->getRunningScripts(); auto runningScripts = scriptEngines->getRunningScripts();
@ -8398,6 +8404,7 @@ void Application::onDismissedLoginDialog() {
qDebug() << "dismissed login dialog"; qDebug() << "dismissed login dialog";
_loginDialogPoppedUp = false; _loginDialogPoppedUp = false;
loginDialogPoppedUp.set(false); loginDialogPoppedUp.set(false);
resumeAfterLoginDialogActionTaken();
} }
void Application::startHMDStandBySession() { void Application::startHMDStandBySession() {

View file

@ -320,8 +320,6 @@ public:
void setOtherAvatarsReplicaCount(int count) { DependencyManager::get<AvatarHashMap>()->setReplicaCount(count); } void setOtherAvatarsReplicaCount(int count) { DependencyManager::get<AvatarHashMap>()->setReplicaCount(count); }
bool getLoginDialogPoppedUp() const { return _loginDialogPoppedUp; } bool getLoginDialogPoppedUp() const { return _loginDialogPoppedUp; }
void pauseUntilLoginDetermined();
void resumeAfterLoginDialogActionTaken();
#if defined(Q_OS_ANDROID) #if defined(Q_OS_ANDROID)
void beforeEnterBackground(); void beforeEnterBackground();
@ -514,6 +512,8 @@ private slots:
private: private:
void init(); void init();
void pauseUntilLoginDetermined();
void resumeAfterLoginDialogActionTaken();
bool handleKeyEventForFocusedEntityOrOverlay(QEvent* event); bool handleKeyEventForFocusedEntityOrOverlay(QEvent* event);
bool handleFileOpenEvent(QFileOpenEvent* event); bool handleFileOpenEvent(QFileOpenEvent* event);
void cleanupBeforeQuit(); void cleanupBeforeQuit();

View file

@ -26,6 +26,8 @@
#include "Menu.h" #include "Menu.h"
#include "Application.h" #include "Application.h"
#include "overlays/Overlays.h"
#include "overlays/Web3DOverlay.h"
#include "scripting/HMDScriptingInterface.h" #include "scripting/HMDScriptingInterface.h"
#include "Constants.h" #include "Constants.h"
@ -63,12 +65,13 @@ void LoginDialog::showWithSelection() {
} }
} }
} else { } else {
//if (qApp->getLoginDialogPoppedUp()) { if (qApp->getLoginDialogPoppedUp()) {
// // pop up those overlay things. // pop up those overlay things.
// return; createLoginScreenDialog();
//} else { return;
// tablet->initialScreen(url); } else {
//} tablet->initialScreen(url);
}
} }
if (!hmd->getShouldShowTablet()) { if (!hmd->getShouldShowTablet()) {
@ -252,6 +255,10 @@ bool LoginDialog::getLoginDialogPoppedUp() const {
return qApp->getLoginDialogPoppedUp(); return qApp->getLoginDialogPoppedUp();
} }
void LoginDialog::createLoginScreenDialog() {
}
QString errorStringFromAPIObject(const QJsonValue& apiObject) { QString errorStringFromAPIObject(const QJsonValue& apiObject) {
if (apiObject.isArray()) { if (apiObject.isArray()) {
return apiObject.toArray()[0].toString(); return apiObject.toArray()[0].toString();

View file

@ -76,8 +76,11 @@ protected slots:
Q_INVOKABLE bool getLoginDialogPoppedUp() const; Q_INVOKABLE bool getLoginDialogPoppedUp() const;
private: private:
static void createLoginScreenDialog();
bool getIsLogIn() const { return _isLogIn; } bool getIsLogIn() const { return _isLogIn; }
void setIsLogIn(const bool isLogIn) { _isLogIn = isLogIn; } void setIsLogIn(const bool isLogIn) { _isLogIn = isLogIn; }
bool _isLogIn { false }; bool _isLogIn { false };
}; };