fix: prevent edit hotkey dialog opening as normal window (#6540)

This commit is contained in:
James Upjohn
2025-10-25 23:14:45 +13:00
committed by GitHub
parent 1178caf1b0
commit 4b1266dba3
4 changed files with 6 additions and 5 deletions
+1
View File
@@ -7,6 +7,7 @@
- Minor: Added setting for character limit of deleted messages. (#6491)
- Minor: Added link support to plugin message API. (#6386)
- Minor: Added a description for the logging option under moderation tab. (#6514)
- Minor: Fixed "edit hotkey" dialog opening like a normal window. (#6540)
- Bugfix: Expose the "Extra extension IDs" setting on non-Windows systems too. (#6509)
- Bugfix: Fixed scrollbar rect computation potentially resulting in overflows. (#6547)
- Dev: Update release documentation. (#6498)
+1 -1
View File
@@ -11,7 +11,7 @@
namespace chatterino {
EditHotkeyDialog::EditHotkeyDialog(const std::shared_ptr<Hotkey> hotkey,
bool isAdd, QWidget *parent)
QWidget *parent)
: QDialog(parent, Qt::WindowStaysOnTopHint)
, ui_(new Ui::EditHotkeyDialog)
, data_(hotkey)
+1 -1
View File
@@ -20,7 +20,7 @@ class EditHotkeyDialog final : public QDialog
public:
explicit EditHotkeyDialog(const std::shared_ptr<Hotkey> data,
bool isAdd = false, QWidget *parent = nullptr);
QWidget *parent = nullptr);
~EditHotkeyDialog() final;
std::shared_ptr<Hotkey> data();
@@ -31,7 +31,7 @@ void tableCellClicked(const QModelIndex &clicked, EditableModelView *view,
{
return; // clicked on header or invalid hotkey
}
EditHotkeyDialog dialog(hotkey);
EditHotkeyDialog dialog(hotkey, view);
bool wasAccepted = dialog.exec() == 1;
if (wasAccepted)
@@ -65,8 +65,8 @@ KeyboardSettingsPage::KeyboardSettingsPage()
1, QHeaderView::Stretch);
// We can safely ignore this signal connection since we own the view
std::ignore = view->addButtonPressed.connect([] {
EditHotkeyDialog dialog(nullptr);
std::ignore = view->addButtonPressed.connect([view] {
EditHotkeyDialog dialog(nullptr, view);
bool wasAccepted = dialog.exec() == 1;
if (wasAccepted)