Add parent to ChannelFilterEditorDialog (#2232)

This commit is contained in:
pajlada 2020-11-28 18:04:33 +01:00 committed by GitHub
parent 49fa9bfd72
commit 5258ddd84f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -33,7 +33,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, #2182, #2185)
- Minor: Flag all popup dialogs as actual dialogs so they get the relevant window manager hints (#1843, #2182, #2185, #2232)
- 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)

View file

@ -4,7 +4,7 @@ namespace chatterino {
class ChannelFilterEditorDialog : public QDialog
{
public:
ChannelFilterEditorDialog(QWidget *parent = nullptr);
ChannelFilterEditorDialog(QWidget *parent);
const QString getFilter() const;
const QString getTitle() const;

View file

@ -2,7 +2,9 @@
#include "controllers/filters/FilterModel.hpp"
#include "singletons/Settings.hpp"
#include "singletons/WindowManager.hpp"
#include "util/LayoutCreator.hpp"
#include "widgets/Window.hpp"
#include "widgets/dialogs/ChannelFilterEditorDialog.hpp"
#include "widgets/helper/EditableModelView.hpp"
@ -40,7 +42,8 @@ FiltersPage::FiltersPage()
});
view->addButtonPressed.connect([] {
ChannelFilterEditorDialog d;
ChannelFilterEditorDialog d(
static_cast<QWidget *>(&(getApp()->windows->getMainWindow())));
if (d.exec() == QDialog::Accepted)
{
getSettings()->filterRecords.append(