From 540870f9fe24b858bfb8fef11ad30c08834573ca Mon Sep 17 00:00:00 2001 From: Leon Richardt Date: Sun, 15 Nov 2020 11:07:20 +0100 Subject: [PATCH] [Fix] Make SearchPopup a BasePopup (#2182) --- CHANGELOG.md | 2 +- src/widgets/helper/SearchPopup.cpp | 3 ++- src/widgets/helper/SearchPopup.hpp | 2 +- src/widgets/splits/Split.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 667f076b..c420b7ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ - Minor: Improve UX of the "Login expired!" message (#2029) - Minor: PageUp and PageDown now scroll in the selected split (#2070, #2081) - Minor: Allow highlights to be excluded from `/mentions`. Excluded highlights will not trigger tab highlights either. (#1793, #2036) -- Minor: Flag all popup dialogs as actual dialogs so they get the relevant window manager hints (#1843) +- Minor: Flag all popup dialogs as actual dialogs so they get the relevant window manager hints (#1843, #2182) - Minor: Don't show update button for nightly builds on macOS and Linux, this was already the case for Windows (#2163, #2164) - Bugfix: Fix crash occurring when pressing Escape in the Color Picker Dialog (#1843) - Bugfix: Fix bug preventing users from setting the highlight color of the second entry in the "User" highlights tab (#1898) diff --git a/src/widgets/helper/SearchPopup.cpp b/src/widgets/helper/SearchPopup.cpp index 10fece45..f79b3f06 100644 --- a/src/widgets/helper/SearchPopup.cpp +++ b/src/widgets/helper/SearchPopup.cpp @@ -52,7 +52,8 @@ ChannelPtr SearchPopup::filter(const QString &text, const QString &channelName, return channel; } -SearchPopup::SearchPopup() +SearchPopup::SearchPopup(QWidget *parent) + : BasePopup({}, parent) { this->initLayout(); this->resize(400, 600); diff --git a/src/widgets/helper/SearchPopup.hpp b/src/widgets/helper/SearchPopup.hpp index 2bc6f50c..1938f0b4 100644 --- a/src/widgets/helper/SearchPopup.hpp +++ b/src/widgets/helper/SearchPopup.hpp @@ -15,7 +15,7 @@ namespace chatterino { class SearchPopup : public BasePopup { public: - SearchPopup(); + SearchPopup(QWidget *parent); virtual void setChannel(const ChannelPtr &channel); virtual void setChannelFilters(FilterSetPtr filters); diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index e40885e0..6c8ce3f8 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -828,7 +828,7 @@ const QList Split::getFilters() const void Split::showSearch() { - SearchPopup *popup = new SearchPopup(); + SearchPopup *popup = new SearchPopup(this); popup->setChannelFilters(this->view_->getFilterSet()); popup->setAttribute(Qt::WA_DeleteOnClose);