Showing the changes to interface/src/Menu.cpp (1 of 11 files). Show all
Unified · Split
| @@ -17,6 +17,7 @@ · 16 unmodified lines | ||
| 17 | 17 | #include <DependencyManager.h> |
| 18 | 18 | #include <GlowEffect.h> |
| 19 | 19 | #include <PathUtils.h> |
| 20 | +#include <Settings.h> | |
| 20 | 21 | #include <UserActivityLogger.h> |
| 21 | 22 | #include <XmppClient.h> |
| 22 | 23 | |
| @@ -544,10 +545,9 @@ Menu::Menu() { · 521 unmodified lines | ||
| 544 | 545 | } |
| 545 | 546 | |
| 546 | 547 | void Menu::loadSettings(QSettings* settings) { |
| 547 | − bool lockedSettings = false; | |
| 548 | + Settings defaultSettings; | |
| 548 | 549 | if (!settings) { |
| 549 | − settings = qApp->lockSettings(); | |
| 550 | − lockedSettings = true; | |
| 550 | + settings = &defaultSettings; | |
| 551 | 551 | } |
| 552 | 552 | |
| 553 | 553 | auto audio = DependencyManager::get<Audio>(); |
| @@ -568,17 +568,12 @@ void Menu::loadSettings(QSettings* settings) { · 14 unmodified lines | ||
| 568 | 568 | myAvatar->updateCollisionGroups(); |
| 569 | 569 | myAvatar->onToggleRagdoll(); |
| 570 | 570 | myAvatar->updateMotionBehavior(); |
| 571 | − | |
| 572 | − if (lockedSettings) { | |
| 573 | − qApp->unlockSettings(); | |
| 574 | − } | |
| 575 | 571 | } |
| 576 | 572 | |
| 577 | 573 | void Menu::saveSettings(QSettings* settings) { |
| 578 | − bool lockedSettings = false; | |
| 574 | + Settings defaultSettings; | |
| 579 | 575 | if (!settings) { |
| 580 | − settings = qApp->lockSettings(); | |
| 581 | − lockedSettings = true; | |
| 576 | + settings = &defaultSettings; | |
| 582 | 577 | } |
| 583 | 578 | |
| 584 | 579 | auto audio = DependencyManager::get<Audio>(); |
| @@ -591,10 +586,6 @@ void Menu::saveSettings(QSettings* settings) { · 6 unmodified lines | ||
| 591 | 586 | qApp->getAvatar()->saveData(settings); |
| 592 | 587 | |
| 593 | 588 | DependencyManager::get<AddressManager>()->storeCurrentAddress(); |
| 594 | − | |
| 595 | − if (lockedSettings) { | |
| 596 | − qApp->unlockSettings(); | |
| 597 | − } | |
| 598 | 589 | } |
| 599 | 590 | |
| 600 | 591 | void Menu::importSettings() { |