SettingsAccessor Class | Extending Qt Creator Manual

Extending Qt Creator Manual | SettingsAccessor

Extending Qt Creator Manual 4.6.0

# SettingsAccessor Class

(Utils::SettingsAccessor)

Inherits: | Utils::BasicSettingsAccessor

- List of all members, including inherited members

## Public Functions

| SettingsAccessor(const Utils::FileName &baseFile, const QString &docType, const QString &displayName, const QString &appDisplayName)
| ~SettingsAccessor() override
bool | addVersionUpgrader(std::unique_ptr<VersionUpgrader> upgrader)
int | currentVersion() const
int | firstSupportedVersion() const

- 6 public functions inherited from Utils::BasicSettingsAccessor

## Static Public Members

int | originalVersionFromMap(const QVariantMap &data)
QVariantMap | setOriginalVersionInMap(const QVariantMap &data, int version)
QVariantMap | setVersionInMap(const QVariantMap &data, int version)
int | versionFromMap(const QVariantMap &data)

## Protected Functions

virtual Utils::FileName | backupName(const QVariantMap &data) const
Utils::optional<Issue> | findIssues(const QVariantMap &data, const Utils::FileName &path) const
virtual bool | isBetterMatch(const QVariantMap &origData, const QVariantMap &newData) const
virtual bool | isValidVersionAndId(const int version, const QByteArray &id) const
QVariantMap | mergeSettings(const QVariantMap &userMap, const QVariantMap &sharedMap) const
virtual QVariant | retrieveSharedSettings() const
void | setSettingsId(const QByteArray &id)
virtual void | storeSharedSettings(const QVariantMap &data) const
QVariantMap | upgradeSettings(const QVariantMap &data) const
QVariantMap | upgradeSettings(const QVariantMap &data, const int targetVersion) const

## Reimplemented Protected Functions

virtual QVariantMap | prepareToWriteSettings(const QVariantMap &data) const override
virtual RestoreData | readData(const Utils::FileName &path, QWidget *parent) const final
virtual Utils::optional<Issue> | writeData(const Utils::FileName &path, const QVariantMap &data) const final

- 5 protected functions inherited from Utils::BasicSettingsAccessor

## Member Function Documentation

### SettingsAccessor::SettingsAccessor(const Utils::FileName &baseFile, const QString &docType, const QString &displayName, const QString &appDisplayName)

Default constructs an instance of SettingsAccessor.

### SettingsAccessor::~SettingsAccessor()

Destroys the instance of SettingsAccessor.

### bool SettingsAccessor::addVersionUpgrader(std::unique_ptr<VersionUpgrader> upgrader)

### `[virtual protected]` Utils::FileName SettingsAccessor::backupName(const QVariantMap &data) const

### int SettingsAccessor::currentVersion() const

### `[protected]` Utils::optional<Issue> SettingsAccessor::findIssues(const QVariantMap &data, const Utils::FileName &path) const

### int SettingsAccessor::firstSupportedVersion() const

### `[virtual protected]` bool SettingsAccessor::isBetterMatch(const QVariantMap &origData, const QVariantMap &newData) const

### `[virtual protected]` bool SettingsAccessor::isValidVersionAndId(const int version, const QByteArray &id) const

### `[protected]` QVariantMap SettingsAccessor::mergeSettings(const QVariantMap &userMap, const QVariantMap &sharedMap) const

### `[static]` int SettingsAccessor::originalVersionFromMap(const QVariantMap &data)

### `[override virtual protected]` QVariantMap SettingsAccessor::prepareToWriteSettings(const QVariantMap &data) const

### `[final virtual protected]` RestoreData SettingsAccessor::readData(const Utils::FileName &path, QWidget *parent) const

### `[virtual protected]` QVariant SettingsAccessor::retrieveSharedSettings() const

### `[static]` QVariantMap SettingsAccessor::setOriginalVersionInMap(const QVariantMap &data, int version)

### `[protected]` void SettingsAccessor::setSettingsId(const QByteArray &id)

### `[static]` QVariantMap SettingsAccessor::setVersionInMap(const QVariantMap &data, int version)

### `[virtual protected]` void SettingsAccessor::storeSharedSettings(const QVariantMap &data) const

### `[protected]` QVariantMap SettingsAccessor::upgradeSettings(const QVariantMap &data) const

### `[protected]` QVariantMap SettingsAccessor::upgradeSettings(const QVariantMap &data, const int targetVersion) const

### `[static]` int SettingsAccessor::versionFromMap(const QVariantMap &data)

### `[final virtual protected]` Utils::optional<Issue> SettingsAccessor::writeData(const Utils::FileName &path, const QVariantMap &data) const