aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/baremetal
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-08-30 09:18:19 +0200
committerhjk <hjk@qt.io>2023-08-30 09:57:23 +0000
commit41184bc9fc7361a30e5f6a73542eaa84ec54870e (patch)
treeaa9a883dab8d668c09ad1a0d80007dddcd7d406d /src/plugins/baremetal
parent9dc9a43f40ad41a6b6f819aac3104f43a0665c8d (diff)
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>
Diffstat (limited to 'src/plugins/baremetal')
-rw-r--r--src/plugins/baremetal/debugserverprovidermanager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/baremetal/debugserverprovidermanager.cpp b/src/plugins/baremetal/debugserverprovidermanager.cpp
index 5ef3147e47..536b279700 100644
--- a/src/plugins/baremetal/debugserverprovidermanager.cpp
+++ b/src/plugins/baremetal/debugserverprovidermanager.cpp
@@ -90,7 +90,7 @@ void DebugServerProviderManager::restoreProviders()
const int count = data.value(countKeyC, 0).toInt();
for (int i = 0; i < count; ++i) {
- const Key key = dataKeyC + Key::number(i);
+ const Key key = numberedKey(dataKeyC, i);
if (!data.contains(key))
break;
@@ -132,8 +132,8 @@ void DebugServerProviderManager::saveProviders()
p->toMap(tmp);
if (tmp.isEmpty())
continue;
- const Key key = dataKeyC + Key::number(count);
- data.insert(key, QVariant::fromValue(tmp));
+ const Key key = numberedKey(dataKeyC, count);
+ data.insert(key, variantFromStore(tmp));
++count;
}
}