Added the no-login option.

This commit is contained in:
NissimHadar 2018-11-07 15:10:01 -08:00
parent e00c9333c6
commit f0dd07294e

View file

@ -2337,6 +2337,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
connect(&AndroidHelper::instance(), &AndroidHelper::enterForeground, this, &Application::enterForeground);
AndroidHelper::instance().notifyLoadComplete();
#else
// 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
static int CHECK_LOGIN_TIMER = 3000;
QTimer* checkLoginTimer = new QTimer(this);
checkLoginTimer->setInterval(CHECK_LOGIN_TIMER);
@ -2354,6 +2359,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
});
Setting::Handle<bool>{"loginDialogPoppedUp", false}.set(false);
checkLoginTimer->start();
}
#endif
}