qBittorrent
|
#include <settingsstorage.h>
Public Slots | |
bool | save () |
Public Member Functions | |
template<typename T > | |
T | loadValue (const QString &key, const T &defaultValue={}) const |
template<typename T > | |
void | storeValue (const QString &key, const T &value) |
void | removeValue (const QString &key) |
bool | hasKey (const QString &key) const |
Static Public Member Functions | |
static void | initInstance () |
static void | freeInstance () |
static SettingsStorage * | instance () |
Private Member Functions | |
SettingsStorage () | |
~SettingsStorage () | |
QVariant | loadValueImpl (const QString &key, const QVariant &defaultValue={}) const |
void | storeValueImpl (const QString &key, const QVariant &value) |
Private Attributes | |
bool | m_dirty = false |
QVariantHash | m_data |
QTimer | m_timer |
QReadWriteLock | m_lock |
Static Private Attributes | |
static SettingsStorage * | m_instance = nullptr |
Definition at line 47 of file settingsstorage.h.
|
private |
Definition at line 71 of file settingsstorage.cpp.
References m_timer, and save().
Referenced by initInstance().
|
private |
Definition at line 79 of file settingsstorage.cpp.
References save().
|
static |
Definition at line 90 of file settingsstorage.cpp.
References m_instance.
Referenced by Application::cleanup().
bool SettingsStorage::hasKey | ( | const QString & | key | ) | const |
Definition at line 149 of file settingsstorage.cpp.
|
static |
Definition at line 84 of file settingsstorage.cpp.
References m_instance, and SettingsStorage().
Referenced by Application::Application().
|
static |
Definition at line 96 of file settingsstorage.cpp.
References m_instance.
Referenced by Preferences::apply(), anonymous_namespace{upgrade.cpp}::exportWebUIHttpsFiles(), handleChangedDefaults(), RSS::Session::loadLegacy(), TorrentFilesWatcher::loadLegacy(), anonymous_namespace{upgrade.cpp}::migrateSettingKeys(), SettingValue< T >::operator=(), RSS::Session::Session(), setCurrentMigrationVersion(), anonymous_namespace{addnewtorrentdialog.cpp}::settings(), anonymous_namespace{preferences.cpp}::setValue(), anonymous_namespace{upgrade.cpp}::upgradeDNSServiceSettings(), anonymous_namespace{upgrade.cpp}::upgradeListenPortSettings(), anonymous_namespace{upgrade.cpp}::upgradeSchedulerDaysSettings(), anonymous_namespace{upgrade.cpp}::upgradeTorrentContentLayout(), and anonymous_namespace{upgrade.cpp}::upgradeTrayIconStyleSettings().
|
inline |
Definition at line 59 of file settingsstorage.h.
Referenced by anonymous_namespace{upgrade.cpp}::exportWebUIHttpsFiles(), AddNewTorrentDialog::isEnabled(), AddNewTorrentDialog::isTopLevel(), RSS::Session::loadLegacy(), TorrentFilesWatcher::loadLegacy(), AddNewTorrentDialog::populateSavePaths(), AddNewTorrentDialog::savePathHistoryLength(), anonymous_namespace{addnewtorrentdialog.cpp}::updatePathHistory(), and anonymous_namespace{upgrade.cpp}::upgradeTorrentContentLayout().
|
private |
void SettingsStorage::removeValue | ( | const QString & | key | ) |
Definition at line 135 of file settingsstorage.cpp.
References m_data, m_dirty, m_lock, and m_timer.
Referenced by TorrentFilesWatcher::loadLegacy().
|
slot |
Definition at line 101 of file settingsstorage.cpp.
References m_data, m_dirty, m_lock, m_timer, and anonymous_namespace{addnewtorrentdialog.cpp}::settings().
Referenced by SettingsStorage(), and ~SettingsStorage().
|
inline |
Definition at line 85 of file settingsstorage.h.
References Utils::String::fromEnum(), storeValueImpl(), and anonymous_namespace{preferences.cpp}::value().
Referenced by SettingValue< T >::operator=(), setCurrentMigrationVersion(), AddNewTorrentDialog::setEnabled(), AddNewTorrentDialog::setSavePathHistoryLength(), AddNewTorrentDialog::setTopLevel(), anonymous_namespace{preferences.cpp}::setValue(), and anonymous_namespace{addnewtorrentdialog.cpp}::updatePathHistory().
|
private |
Definition at line 123 of file settingsstorage.cpp.
References m_data, m_dirty, m_lock, m_timer, and anonymous_namespace{preferences.cpp}::value().
Referenced by storeValue().
|
private |
Definition at line 108 of file settingsstorage.h.
Referenced by hasKey(), loadValueImpl(), removeValue(), save(), and storeValueImpl().
|
private |
Definition at line 107 of file settingsstorage.h.
Referenced by removeValue(), save(), and storeValueImpl().
|
staticprivate |
Definition at line 105 of file settingsstorage.h.
Referenced by freeInstance(), initInstance(), and instance().
|
mutableprivate |
Definition at line 110 of file settingsstorage.h.
Referenced by hasKey(), loadValueImpl(), removeValue(), save(), and storeValueImpl().
|
private |
Definition at line 109 of file settingsstorage.h.
Referenced by removeValue(), save(), SettingsStorage(), and storeValueImpl().