autotester param fully functional

This commit is contained in:
Wayne Chen 2018-12-05 08:51:13 -08:00
parent 3d99ffc459
commit 328e1ebc27
2 changed files with 14 additions and 10 deletions

View file

@ -1789,6 +1789,14 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
connect(offscreenUi.data(), &OffscreenUi::keyboardFocusActive, [this]() {
#if !defined(Q_OS_ANDROID)
// Do not show login dialog if requested not to on the command line
QString hifiNoLoginCommandLineKey = QString("--").append(HIFI_NO_LOGIN_COMMAND_LINE_KEY);
int index = arguments().indexOf(hifiNoLoginCommandLineKey);
if (index != -1) {
resumeAfterLoginDialogActionTaken();
return;
}
// only for non-android. QML is ready to be shown at this time.
showLoginScreen();
#endif
@ -2324,17 +2332,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
connect(&AndroidHelper::instance(), &AndroidHelper::enterBackground, this, &Application::enterBackground);
connect(&AndroidHelper::instance(), &AndroidHelper::enterForeground, this, &Application::enterForeground);
AndroidHelper::instance().notifyLoadComplete();
#else
#if !defined(DISABLE_QML)
// Do not show login dialog if requested not to on the command line
const QString HIFI_NO_LOGIN_COMMAND_LINE_KEY = "--no-login-suggestion";
int index = arguments().indexOf(HIFI_NO_LOGIN_COMMAND_LINE_KEY);
if (index == -1) {
// request not found
pauseUntilLoginDetermined();
}
#endif
#endif
pauseUntilLoginDetermined();
}
void Application::updateVerboseLogging() {
@ -2890,6 +2889,7 @@ static void addDisplayPluginToMenu(const DisplayPluginPointer& displayPlugin, in
#endif
void Application::showLoginScreen() {
#if !defined(DISABLE_QML)
auto accountManager = DependencyManager::get<AccountManager>();
auto dialogsManager = DependencyManager::get<DialogsManager>();
if (!accountManager->isLoggedIn()) {
@ -2908,6 +2908,9 @@ void Application::showLoginScreen() {
}
_loginDialogPoppedUp = !accountManager->isLoggedIn();
loginDialogPoppedUp.set(_loginDialogPoppedUp);
#else
resumeAfterLoginDialogActionTaken();
#endif
}
void Application::initializeUi() {

View file

@ -99,6 +99,7 @@ static const UINT UWM_SHOW_APPLICATION =
static const QString RUNNING_MARKER_FILENAME = "Interface.running";
static const QString SCRIPTS_SWITCH = "scripts";
static const QString HIFI_NO_LOGIN_COMMAND_LINE_KEY = "no-login-suggestion";
class Application;
#if defined(qApp)