![]() |
Audacity 3.2.0
|
Extend SettingScope with Commit() which flushes updates in a batch. More...
#include <Prefs.h>
Public Member Functions | |
| bool | Commit () |
Public Member Functions inherited from SettingScope | |
| SettingScope () | |
| ~SettingScope () noexcept | |
| SettingScope (const SettingScope &)=delete | |
| SettingScope & | operator= (const SettingScope &)=delete |
Additional Inherited Members | |
Public Types inherited from SettingScope | |
| enum | AddResult { NotAdded , Added , PreviouslyAdded } |
Static Public Member Functions inherited from SettingScope | |
| static AddResult | Add (TransactionalSettingBase &setting) |
Protected Attributes inherited from SettingScope | |
| std::set< TransactionalSettingBase * > | mPending |
| bool | mCommitted = false |
Extend SettingScope with Commit() which flushes updates in a batch.
Construct one; then write to some Setting objects; then Commit() before destruction to keep the changes, or else the destructor rolls them back.
Flushes preferences on successful commit.
Nesting of SettingTransaction is not supported. No copy or move.
| bool SettingTransaction::Commit | ( | ) |
It is unlikely to return false, but in that case an unflushed, partial write of changes to the config file may have happened
Definition at line 322 of file Prefs.cpp.
References audacity::BasicSettings::Flush(), gPrefs, and anonymous_namespace{Prefs.cpp}::sScopes.
Referenced by FindFFmpegLibs().