┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2020-12-19 18:43:44 +0100
committerElvis Angelaccio <[email protected]>2021-05-31 00:43:46 +0200
commit2f3d8c5c9664f66ff7922ad7fd612f65182c75d0 (patch)
treef8cf82ab7cb47a5244bd5bd20a7056e46808fbe6 /src/dolphinmainwindow.cpp
parentec3c196e5a091d7beefd2d3dd7b8e9b1804e7370 (diff)
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.
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index e7c402b88..4297321fc 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -204,6 +204,8 @@ 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