mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-21 22:20:31 +02:00
Fixup PR13870: Make the feature work in Master
This commit is contained in:
parent
67e57a9487
commit
b8cd5dd8b9
3 changed files with 11 additions and 8 deletions
|
@ -1735,11 +1735,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
QTimer* settingsTimer = new QTimer();
|
QTimer* settingsTimer = new QTimer();
|
||||||
moveToNewNamedThread(settingsTimer, "Settings Thread", [this, settingsTimer]{
|
moveToNewNamedThread(settingsTimer, "Settings Thread", [this, settingsTimer]{
|
||||||
connect(qApp, &Application::beforeAboutToQuit, [this, settingsTimer]{
|
connect(qApp, &Application::beforeAboutToQuit, [this, settingsTimer]{
|
||||||
bool autoLogout = Setting::Handle<bool>(AUTO_LOGOUT_SETTING_NAME, false).get();
|
|
||||||
if (autoLogout) {
|
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
|
||||||
accountManager->logout();
|
|
||||||
}
|
|
||||||
// Disconnect the signal from the save settings
|
// Disconnect the signal from the save settings
|
||||||
QObject::disconnect(settingsTimer, &QTimer::timeout, this, &Application::saveSettings);
|
QObject::disconnect(settingsTimer, &QTimer::timeout, this, &Application::saveSettings);
|
||||||
// Stop the settings timer
|
// Stop the settings timer
|
||||||
|
@ -2491,6 +2486,11 @@ void Application::cleanupBeforeQuit() {
|
||||||
}
|
}
|
||||||
DependencyManager::destroy<ScriptEngines>();
|
DependencyManager::destroy<ScriptEngines>();
|
||||||
|
|
||||||
|
bool autoLogout = Setting::Handle<bool>(AUTO_LOGOUT_SETTING_NAME, false).get();
|
||||||
|
if (autoLogout) {
|
||||||
|
DependencyManager::get<AccountManager>()->removeAccountFromFile();
|
||||||
|
}
|
||||||
|
|
||||||
_displayPlugin.reset();
|
_displayPlugin.reset();
|
||||||
PluginManager::getInstance()->shutdown();
|
PluginManager::getInstance()->shutdown();
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,8 @@ public:
|
||||||
|
|
||||||
QUrl getMetaverseServerURL() { return NetworkingConstants::METAVERSE_SERVER_URL(); }
|
QUrl getMetaverseServerURL() { return NetworkingConstants::METAVERSE_SERVER_URL(); }
|
||||||
|
|
||||||
|
void removeAccountFromFile();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void requestAccessToken(const QString& login, const QString& password);
|
void requestAccessToken(const QString& login, const QString& password);
|
||||||
void requestAccessTokenWithSteam(QByteArray authSessionTicket);
|
void requestAccessTokenWithSteam(QByteArray authSessionTicket);
|
||||||
|
@ -133,7 +135,6 @@ private:
|
||||||
void operator=(AccountManager const& other) = delete;
|
void operator=(AccountManager const& other) = delete;
|
||||||
|
|
||||||
void persistAccountToFile();
|
void persistAccountToFile();
|
||||||
void removeAccountFromFile();
|
|
||||||
|
|
||||||
void passSuccessToCallback(QNetworkReply* reply);
|
void passSuccessToCallback(QNetworkReply* reply);
|
||||||
void passErrorToCallback(QNetworkReply* reply);
|
void passErrorToCallback(QNetworkReply* reply);
|
||||||
|
|
|
@ -407,8 +407,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function onUsernameChanged() {
|
function onUsernameChanged() {
|
||||||
Settings.setValue("wallet/autoLogout", false);
|
if (Account.username !== Settings.getValue("wallet/savedUsername")) {
|
||||||
Settings.setValue("wallet/savedUsername", "");
|
Settings.setValue("wallet/autoLogout", false);
|
||||||
|
Settings.setValue("wallet/savedUsername", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function Name: fromQml()
|
// Function Name: fromQml()
|
||||||
|
|
Loading…
Reference in a new issue