|
QString | deserialize (const QString &name, QVariantHash &data) const |
|
QString | serialize (const QString &name, const QVariantHash &data) const |
|
Definition at line 46 of file settingsstorage.cpp.
◆ TransactionalSettings()
anonymous_namespace{settingsstorage.cpp}::TransactionalSettings::TransactionalSettings |
( |
const QString & |
name | ) |
|
|
inlineexplicit |
◆ deserialize()
QString TransactionalSettings::deserialize |
( |
const QString & |
name, |
|
|
QVariantHash & |
data |
|
) |
| const |
|
private |
◆ read()
QVariantHash TransactionalSettings::read |
( |
| ) |
const |
Definition at line 155 of file settingsstorage.cpp.
160 if (!newPath.isEmpty())
170 QString finalPath = newPath;
171 int index = finalPath.lastIndexOf(
"_new", -1, Qt::CaseInsensitive);
172 finalPath.remove(index, 4);
175 QFile::rename(newPath, finalPath);
void addMessage(const QString &message, const Log::MsgType &type=Log::NORMAL)
static Logger * instance()
QString deserialize(const QString &name, QVariantHash &data) const
bool forceRemove(const QString &filePath)
QString toNativePath(const QString &path)
References Logger::addMessage(), Utils::Fs::forceRemove(), Logger::instance(), Utils::Fs::toNativePath(), and Log::WARNING.
◆ serialize()
QString TransactionalSettings::serialize |
( |
const QString & |
name, |
|
|
const QVariantHash & |
data |
|
) |
| const |
|
private |
◆ write()
bool TransactionalSettings::write |
( |
const QVariantHash & |
data | ) |
const |
Definition at line 185 of file settingsstorage.cpp.
192 const QString newPath =
serialize(
m_name + QLatin1String(
"_new"), data);
193 if (newPath.isEmpty())
199 QString finalPath = newPath;
200 int index = finalPath.lastIndexOf(
"_new", -1, Qt::CaseInsensitive);
201 finalPath.remove(index, 4);
204 return QFile::rename(newPath, finalPath);
QString serialize(const QString &name, const QVariantHash &data) const
References Utils::Fs::forceRemove(), and serialize().
◆ m_name
const QString anonymous_namespace{settingsstorage.cpp}::TransactionalSettings::m_name |
|
private |
The documentation for this class was generated from the following file: