forked from qt-creator/qt-creator
ProjectExplorer: Add some BaseStringListAspect
Only for storage now, sufficient for the upcoming use in MakeStep. Change-Id: Ia84595c6cd50f75c70ccef2afb366db3da0e51ff Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -140,6 +140,12 @@ public:
|
||||
bool m_enabled = true;
|
||||
};
|
||||
|
||||
class BaseStringListAspectPrivate
|
||||
{
|
||||
public:
|
||||
QStringList m_value;
|
||||
};
|
||||
|
||||
} // Internal
|
||||
|
||||
/*!
|
||||
@@ -785,4 +791,41 @@ TriState TriState::fromVariant(const QVariant &variant)
|
||||
return TriState(Value(v));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\class ProjectExplorer::BaseStringListAspect
|
||||
*/
|
||||
|
||||
BaseStringListAspect::BaseStringListAspect()
|
||||
: d(new Internal::BaseStringListAspectPrivate)
|
||||
{}
|
||||
|
||||
BaseStringListAspect::~BaseStringListAspect() = default;
|
||||
|
||||
void BaseStringListAspect::addToLayout(LayoutBuilder &builder)
|
||||
{
|
||||
Q_UNUSED(builder)
|
||||
// TODO - when needed.
|
||||
}
|
||||
|
||||
void BaseStringListAspect::fromMap(const QVariantMap &map)
|
||||
{
|
||||
d->m_value = map.value(settingsKey()).toStringList();
|
||||
}
|
||||
|
||||
void BaseStringListAspect::toMap(QVariantMap &data) const
|
||||
{
|
||||
data.insert(settingsKey(), d->m_value);
|
||||
}
|
||||
|
||||
QStringList BaseStringListAspect::value() const
|
||||
{
|
||||
return d->m_value;
|
||||
}
|
||||
|
||||
void BaseStringListAspect::setValue(const QStringList &value)
|
||||
{
|
||||
d->m_value = value;
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Reference in New Issue
Block a user