aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qtsupport/exampleslistmodel.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-08-30 07:39:54 +0200
committerhjk <hjk@qt.io>2023-08-30 07:38:02 +0000
commitc7710acadd781e082f66ba389facaef3f5dce41b (patch)
tree4df503f115d7899d8883453c7090a6bff0e09722 /src/plugins/qtsupport/exampleslistmodel.cpp
parent922da1fbb3d0480e78080c53a87550a694b9664e (diff)
Utils: Use Key more widely in QtcSettings
And adapt user code. Change-Id: I6efe4ebe6823de4cc862f304a57e041b02c40eac Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Diffstat (limited to 'src/plugins/qtsupport/exampleslistmodel.cpp')
-rw-r--r--src/plugins/qtsupport/exampleslistmodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp
index 0def03b90b..bb2f9e0fa0 100644
--- a/src/plugins/qtsupport/exampleslistmodel.cpp
+++ b/src/plugins/qtsupport/exampleslistmodel.cpp
@@ -49,13 +49,13 @@ Q_GLOBAL_STATIC_WITH_ARGS(QVersionNumber, minQtVersionForCategories, (6, 5, 1));
void ExampleSetModel::writeCurrentIdToSettings(int currentIndex) const
{
- QSettings *settings = Core::ICore::settings();
- settings->setValue(QLatin1String(kSelectedExampleSetKey), getId(currentIndex));
+ QtcSettings *settings = Core::ICore::settings();
+ settings->setValue(kSelectedExampleSetKey, getId(currentIndex));
}
int ExampleSetModel::readCurrentIndexFromSettings() const
{
- QVariant id = Core::ICore::settings()->value(QLatin1String(kSelectedExampleSetKey));
+ QVariant id = Core::ICore::settings()->value(kSelectedExampleSetKey);
for (int i=0; i < rowCount(); i++) {
if (id == getId(i))
return i;