forked from qt-creator/qt-creator
Aspects: Do not store values with empty keys
Change-Id: I9e8b62915a2278fc3ab35e8b09a330bc0a52e4ae Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
743877730b
commit
51131848ba
@@ -830,7 +830,8 @@ void BoolAspect::fromMap(const QVariantMap &map)
|
||||
*/
|
||||
void BoolAspect::toMap(QVariantMap &data) const
|
||||
{
|
||||
data.insert(settingsKey(), d->m_value);
|
||||
if (!settingsKey().isEmpty())
|
||||
data.insert(settingsKey(), d->m_value);
|
||||
}
|
||||
|
||||
bool BoolAspect::defaultValue() const
|
||||
@@ -956,7 +957,8 @@ void SelectionAspect::fromMap(const QVariantMap &map)
|
||||
*/
|
||||
void SelectionAspect::toMap(QVariantMap &data) const
|
||||
{
|
||||
data.insert(settingsKey(), d->m_value);
|
||||
if (!settingsKey().isEmpty())
|
||||
data.insert(settingsKey(), d->m_value);
|
||||
}
|
||||
|
||||
void SelectionAspect::setVisibleDynamic(bool visible)
|
||||
@@ -1232,7 +1234,8 @@ void StringListAspect::fromMap(const QVariantMap &map)
|
||||
*/
|
||||
void StringListAspect::toMap(QVariantMap &data) const
|
||||
{
|
||||
data.insert(settingsKey(), d->m_value);
|
||||
if (!settingsKey().isEmpty())
|
||||
data.insert(settingsKey(), d->m_value);
|
||||
}
|
||||
|
||||
QStringList StringListAspect::value() const
|
||||
|
||||
Reference in New Issue
Block a user