From 41b7b7f3e53a6921c1a1fc77d7b6c8a5ed277a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 27 May 2014 10:10:07 +0200 Subject: [PATCH] [tabbox] Pass parent to TabBoxHandler Required to get it cleaned up on KWin tear down. Fixes crash on restart. REVIEW: 118344 --- tabbox/tabbox.cpp | 2 +- tabbox/tabboxhandler.cpp | 4 ++-- tabbox/tabboxhandler.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index a56e475237..7b659ffc4b 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -67,7 +67,7 @@ namespace TabBox { TabBoxHandlerImpl::TabBoxHandlerImpl(TabBox* tabBox) - : TabBoxHandler() + : TabBoxHandler(tabBox) , m_tabBox(tabBox) , m_desktopFocusChain(new DesktopChainManager(this)) { diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp index 614c4ad1a2..7c949af451 100644 --- a/tabbox/tabboxhandler.cpp +++ b/tabbox/tabboxhandler.cpp @@ -334,8 +334,8 @@ void TabBoxHandlerPrivate::show() * TabBoxHandler ***********************************************/ -TabBoxHandler::TabBoxHandler() - : QObject() +TabBoxHandler::TabBoxHandler(QObject *parent) + : QObject(parent) { KWin::TabBox::tabBox = this; d = new TabBoxHandlerPrivate(this); diff --git a/tabbox/tabboxhandler.h b/tabbox/tabboxhandler.h index 7358c48119..7cf2eadee1 100644 --- a/tabbox/tabboxhandler.h +++ b/tabbox/tabboxhandler.h @@ -95,7 +95,7 @@ class TabBoxHandler : public QObject { Q_OBJECT public: - TabBoxHandler(); + TabBoxHandler(QObject *parent); virtual ~TabBoxHandler(); /**