mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
refactor!!!: migrate from shared pointers
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
c64d871a28
commit
549405ab2f
199 changed files with 742 additions and 709 deletions
|
|
@ -30,9 +30,6 @@
|
|||
class Setting;
|
||||
class SettingsObject;
|
||||
|
||||
using SettingsObjectPtr = std::shared_ptr<SettingsObject>;
|
||||
using SettingsObjectWeakPtr = std::weak_ptr<SettingsObject>;
|
||||
|
||||
/*!
|
||||
* \brief The SettingsObject handles communicating settings between the application and a
|
||||
*settings file.
|
||||
|
|
@ -50,11 +47,11 @@ class SettingsObject : public QObject {
|
|||
public:
|
||||
class Lock {
|
||||
public:
|
||||
Lock(SettingsObjectPtr locked) : m_locked(locked) { m_locked->suspendSave(); }
|
||||
Lock(SettingsObject* locked) : m_locked(locked) { m_locked->suspendSave(); }
|
||||
~Lock() { m_locked->resumeSave(); }
|
||||
|
||||
private:
|
||||
SettingsObjectPtr m_locked;
|
||||
SettingsObject* m_locked;
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue