mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 05:26:32 +02:00
Merge pull request #14615 from wayne-chen/landInDomainSecondRun-78
MS20366: Restarting interface and skipping login causes user to appear in serverless
This commit is contained in:
commit
428212d572
1 changed files with 12 additions and 22 deletions
|
@ -2460,6 +2460,10 @@ void Application::updateHeartbeat() const {
|
|||
void Application::onAboutToQuit() {
|
||||
emit beforeAboutToQuit();
|
||||
|
||||
if (getLoginDialogPoppedUp() && _firstRun.get()) {
|
||||
_firstRun.set(false);
|
||||
}
|
||||
|
||||
foreach(auto inputPlugin, PluginManager::getInstance()->getInputPlugins()) {
|
||||
if (inputPlugin->isActive()) {
|
||||
inputPlugin->deactivate();
|
||||
|
@ -5261,39 +5265,25 @@ void Application::resumeAfterLoginDialogActionTaken() {
|
|||
}
|
||||
}
|
||||
|
||||
if (_firstRun.get()) {
|
||||
// not first run anymore since action was taken.
|
||||
_firstRun.set(false);
|
||||
}
|
||||
|
||||
auto accountManager = DependencyManager::get<AccountManager>();
|
||||
auto addressManager = DependencyManager::get<AddressManager>();
|
||||
|
||||
// restart domain handler.
|
||||
nodeList->getDomainHandler().resetting();
|
||||
|
||||
if (!accountManager->isLoggedIn()) {
|
||||
QVariant testProperty = property(hifi::properties::TEST);
|
||||
if (testProperty.isValid()) {
|
||||
const auto testScript = property(hifi::properties::TEST).toUrl();
|
||||
// Set last parameter to exit interface when the test script finishes, if so requested
|
||||
DependencyManager::get<ScriptEngines>()->loadScript(testScript, false, false, false, false, quitWhenFinished);
|
||||
// This is done so we don't get a "connection time-out" message when we haven't passed in a URL.
|
||||
if (arguments().contains("--url")) {
|
||||
auto reply = SandboxUtils::getStatus();
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply] { handleSandboxStatus(reply); });
|
||||
} else {
|
||||
addressManager->goToEntry();
|
||||
}
|
||||
} else {
|
||||
QVariant testProperty = property(hifi::properties::TEST);
|
||||
if (testProperty.isValid()) {
|
||||
const auto testScript = property(hifi::properties::TEST).toUrl();
|
||||
// Set last parameter to exit interface when the test script finishes, if so requested
|
||||
DependencyManager::get<ScriptEngines>()->loadScript(testScript, false, false, false, false, quitWhenFinished);
|
||||
// This is done so we don't get a "connection time-out" message when we haven't passed in a URL.
|
||||
if (arguments().contains("--url")) {
|
||||
auto reply = SandboxUtils::getStatus();
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply] { handleSandboxStatus(reply); });
|
||||
}
|
||||
} else {
|
||||
auto reply = SandboxUtils::getStatus();
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply] { handleSandboxStatus(reply); });
|
||||
}
|
||||
auto reply = SandboxUtils::getStatus();
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply] { handleSandboxStatus(reply); });
|
||||
}
|
||||
|
||||
auto menu = Menu::getInstance();
|
||||
|
|
Loading…
Reference in a new issue