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:
hjk
2023-08-30 09:18:19 +02:00
parent 9dc9a43f40
commit 41184bc9fc
18 changed files with 53 additions and 53 deletions

View File

@@ -638,7 +638,7 @@ void ProjectTreeWidgetFactory::saveSettings(QtcSettings *settings, int position,
{
auto ptw = qobject_cast<ProjectTreeWidget *>(widget);
Q_ASSERT(ptw);
const Key baseKey = kBaseKey + Key::number(position);
const Key baseKey = numberedKey(kBaseKey, position);
settings->setValueWithDefault(baseKey + kProjectFilterKey,
ptw->projectFilter(),
kProjectFilterDefault);
@@ -661,7 +661,7 @@ void ProjectTreeWidgetFactory::restoreSettings(QtcSettings *settings, int positi
{
auto ptw = qobject_cast<ProjectTreeWidget *>(widget);
Q_ASSERT(ptw);
const Key baseKey = kBaseKey + Key::number(position);
const Key baseKey = numberedKey(kBaseKey, position);
ptw->setProjectFilter(
settings->value(baseKey + kProjectFilterKey, kProjectFilterDefault).toBool());
ptw->setGeneratedFilesFilter(