From 389ba43b16fcd47e96978632a3ed6cb9c4d358d2 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Sat, 10 Dec 2022 21:20:22 -0500 Subject: [PATCH] quicksettings: Fix count property not being updated Causes the ActionDrawer to have incorrect information when layouting. --- components/mobileshell/quicksettings/quicksettingsmodel.cpp | 3 +++ components/mobileshell/quicksettings/quicksettingsmodel.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/mobileshell/quicksettings/quicksettingsmodel.cpp b/components/mobileshell/quicksettings/quicksettingsmodel.cpp index 12f59104..49077025 100644 --- a/components/mobileshell/quicksettings/quicksettingsmodel.cpp +++ b/components/mobileshell/quicksettings/quicksettingsmodel.cpp @@ -101,6 +101,7 @@ void QuickSettingsModel::loadQuickSettings() delete c; endResetModel(); + Q_EMIT countChanged(); } void QuickSettingsModel::availabilityChanged() @@ -122,4 +123,6 @@ void QuickSettingsModel::availabilityChanged() endRemoveRows(); } } + + Q_EMIT countChanged(); } diff --git a/components/mobileshell/quicksettings/quicksettingsmodel.h b/components/mobileshell/quicksettings/quicksettingsmodel.h index 260f953c..a98ee150 100644 --- a/components/mobileshell/quicksettings/quicksettingsmodel.h +++ b/components/mobileshell/quicksettings/quicksettingsmodel.h @@ -33,7 +33,8 @@ public: void classBegin() override; void componentComplete() override; - Q_SIGNAL void countChanged(); +Q_SIGNALS: + void countChanged(); private: void loadQuickSettings();