mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Fix crash on Wayland when closing the mainwindow while another dialog is open
For some reason on Wayland `QClipboad::dataChanged` can be emitted after the main window gets deleted. In particular this happens when closing the main window while another dialog is open. Since we are closing the window, we can just disconnect this signal and prevent this crash from ever happening.
This commit is contained in:
parent
ec3c196e5a
commit
2f3d8c5c96
|
@ -204,6 +204,8 @@ DolphinMainWindow::DolphinMainWindow() :
|
||||||
|
|
||||||
DolphinMainWindow::~DolphinMainWindow()
|
DolphinMainWindow::~DolphinMainWindow()
|
||||||
{
|
{
|
||||||
|
// This fixes a crash on Wayland when closing the mainwindow while another dialog is open.
|
||||||
|
disconnect(QGuiApplication::clipboard(), &QClipboard::dataChanged, this, &DolphinMainWindow::updatePasteAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<DolphinViewContainer*> DolphinMainWindow::viewContainers() const
|
QVector<DolphinViewContainer*> DolphinMainWindow::viewContainers() const
|
||||||
|
|
Loading…
Reference in a new issue