Commit 0afe611e authored by El Mehdi Fekari's avatar El Mehdi Fekari Committed by Mehdi Fekari
Browse files

Kit: Save sticky kit information



Task-number: QTCREATORBUG-10485

Change-Id: I02081a45ce789992f22f79dc0fc3a60fe7ce439f
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent ae24a88e
...@@ -54,6 +54,7 @@ const char SDK_PROVIDED_KEY[] = "PE.Profile.SDK"; ...@@ -54,6 +54,7 @@ const char SDK_PROVIDED_KEY[] = "PE.Profile.SDK";
const char DATA_KEY[] = "PE.Profile.Data"; const char DATA_KEY[] = "PE.Profile.Data";
const char ICON_KEY[] = "PE.Profile.Icon"; const char ICON_KEY[] = "PE.Profile.Icon";
const char MUTABLE_INFO_KEY[] = "PE.Profile.MutableInfo"; const char MUTABLE_INFO_KEY[] = "PE.Profile.MutableInfo";
const char STICKY_INFO_KEY[] = "PE.Profile.StickyInfo";
} // namespace } // namespace
...@@ -151,6 +152,10 @@ Kit::Kit(const QVariantMap &data) : ...@@ -151,6 +152,10 @@ Kit::Kit(const QVariantMap &data) :
QStringList mutableInfoList = data.value(QLatin1String(MUTABLE_INFO_KEY)).toStringList(); QStringList mutableInfoList = data.value(QLatin1String(MUTABLE_INFO_KEY)).toStringList();
foreach (const QString &mutableInfo, mutableInfoList) foreach (const QString &mutableInfo, mutableInfoList)
d->m_mutable.insert(Core::Id::fromString(mutableInfo)); d->m_mutable.insert(Core::Id::fromString(mutableInfo));
QStringList stickyInfoList = data.value(QLatin1String(STICKY_INFO_KEY)).toStringList();
foreach (const QString &stickyInfo, stickyInfoList)
d->m_sticky.insert(Core::Id::fromString(stickyInfo));
} }
Kit::~Kit() Kit::~Kit()
...@@ -437,6 +442,11 @@ QVariantMap Kit::toMap() const ...@@ -437,6 +442,11 @@ QVariantMap Kit::toMap() const
mutableInfo << id.toString(); mutableInfo << id.toString();
data.insert(QLatin1String(MUTABLE_INFO_KEY), mutableInfo); data.insert(QLatin1String(MUTABLE_INFO_KEY), mutableInfo);
QStringList stickyInfo;
foreach (const Core::Id &id, d->m_sticky)
stickyInfo << id.toString();
data.insert(QLatin1String(STICKY_INFO_KEY), stickyInfo);
QVariantMap extra; QVariantMap extra;
const IdVariantConstIt cend = d->m_data.constEnd(); const IdVariantConstIt cend = d->m_data.constEnd();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment