From 7d28e8700b65af57193ca9e3d3dcd254a6ed2cec Mon Sep 17 00:00:00 2001 From: Jim Broadus Date: Mon, 6 Jul 2020 22:20:16 -0700 Subject: [PATCH] Call SettingsPage::showEvent from child class implementations --- src/globalsearch/globalsearchsettingspage.cpp | 2 +- src/ui/notificationssettingspage.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/globalsearch/globalsearchsettingspage.cpp b/src/globalsearch/globalsearchsettingspage.cpp index e7b2541c1..8b4c9b25e 100644 --- a/src/globalsearch/globalsearchsettingspage.cpp +++ b/src/globalsearch/globalsearchsettingspage.cpp @@ -192,7 +192,7 @@ void GlobalSearchSettingsPage::CurrentProviderChanged(QTreeWidgetItem* item) { } void GlobalSearchSettingsPage::showEvent(QShowEvent* e) { - QWidget::showEvent(e); + SettingsPage::showEvent(e); // Update the logged-in state of each item when we come back to this page in // the dialog. diff --git a/src/ui/notificationssettingspage.cpp b/src/ui/notificationssettingspage.cpp index c04dcb3b5..c2fbde9bc 100644 --- a/src/ui/notificationssettingspage.cpp +++ b/src/ui/notificationssettingspage.cpp @@ -117,9 +117,15 @@ NotificationsSettingsPage::~NotificationsSettingsPage() { delete ui_; } -void NotificationsSettingsPage::showEvent(QShowEvent*) { UpdatePopupVisible(); } +void NotificationsSettingsPage::showEvent(QShowEvent* event) { + SettingsPage::showEvent(event); + UpdatePopupVisible(); +} -void NotificationsSettingsPage::hideEvent(QHideEvent*) { UpdatePopupVisible(); } +void NotificationsSettingsPage::hideEvent(QHideEvent* event) { + SettingsPage::hideEvent(event); + UpdatePopupVisible(); +} void NotificationsSettingsPage::Load() { QSettings s;