forked from qt-creator/qt-creator
Utils: Use numberedKey(Key, int) more wildly
Will ease transition to a key class that doen's have ::number() Change-Id: Ib2f2957c916f41b0731a2033422bfbf7e429bcc8 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -62,7 +62,7 @@ Store BuildStepList::toMap() const
|
||||
for (int i = 0; i < m_steps.count(); ++i) {
|
||||
Store data;
|
||||
m_steps.at(i)->toMap(data);
|
||||
map.insert(STEPS_PREFIX + Key::number(i), variantFromStore(data));
|
||||
map.insert(numberedKey(STEPS_PREFIX, i), variantFromStore(data));
|
||||
}
|
||||
|
||||
return map;
|
||||
@@ -111,7 +111,7 @@ bool BuildStepList::fromMap(const Store &map)
|
||||
|
||||
int maxSteps = map.value(STEPS_COUNT_KEY, 0).toInt();
|
||||
for (int i = 0; i < maxSteps; ++i) {
|
||||
Store bsData = storeFromVariant(map.value(STEPS_PREFIX + Key::number(i)));
|
||||
Store bsData = storeFromVariant(map.value(numberedKey(STEPS_PREFIX, i)));
|
||||
if (bsData.isEmpty()) {
|
||||
qWarning() << "No step data found for" << i << "(continuing).";
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user