From 373cd3ce44f3bcf0bfed2aa1e992730aebddc5d1 Mon Sep 17 00:00:00 2001 From: hewenfei Date: Tue, 6 Jun 2023 10:26:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4=E6=94=B6?= =?UTF-8?q?=E8=97=8F=E5=BA=94=E7=94=A8=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/settings/settings.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/settings/settings.cpp b/src/settings/settings.cpp index 9d08987..e463651 100644 --- a/src/settings/settings.cpp +++ b/src/settings/settings.cpp @@ -157,8 +157,13 @@ void GlobalSetting::initGlobalSettings() //= settings.beginGroup("Default Favorite Apps"); + QMap apps; for (const auto &key : settings.allKeys()) { - m_defaultFavoriteApps.append(settings.value(key).toString()); + apps.insert(key.toInt(), settings.value(key).toString()); + } + + for (const auto &app : apps) { + m_defaultFavoriteApps.append(app); } settings.endGroup(); }