Utils: Use a bit more Key and Store

Also, separate the Key into a separate header to minimiz impact
on #include load.

Change-Id: I4f719cad4d23a71a9c228d0b7f5c2409fd6e24d5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2023-08-23 17:51:05 +02:00
parent 6e307be365
commit 2bf886ed73
42 changed files with 152 additions and 130 deletions

View File

@@ -35,13 +35,13 @@ bool DisplayName::usesDefaultValue() const
return m_value.isEmpty();
}
void DisplayName::toMap(Store &map, const QString &key) const
void DisplayName::toMap(Store &map, const Key &key) const
{
if (m_forceSerialization || !usesDefaultValue())
map.insert(key, m_value);
}
void DisplayName::fromMap(const Store &map, const QString &key)
void DisplayName::fromMap(const Store &map, const Key &key)
{
m_value = map.value(key).toString();
}