feat: track instance copies that use links
confirm deleations when other instances link to it Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
@ -183,3 +183,21 @@ void INIFile::set(QString key, QVariant val)
|
||||
{
|
||||
this->operator[](key) = val;
|
||||
}
|
||||
|
||||
void INIFile::setList(QString key, QVariantList val)
|
||||
{
|
||||
QString stringList = QJsonDocument(QVariant(val).toJsonArray()).toJson(QJsonDocument::Compact);
|
||||
|
||||
this->operator[](key) = stringList;
|
||||
}
|
||||
|
||||
QVariantList INIFile::getList(QString key, QVariantList def) const
|
||||
{
|
||||
if (this->contains(key)) {
|
||||
auto src = this->operator[](key);
|
||||
|
||||
return QJsonDocument::fromJson(src.toByteArray()).toVariant().toList();
|
||||
}
|
||||
|
||||
return def;
|
||||
}
|
||||
|
Reference in New Issue
Block a user