From 6914c813243a693cc170043abf2b600b2acfc660 Mon Sep 17 00:00:00 2001 From: Ismael Asensio Date: Tue, 12 Jul 2022 20:41:11 +0200 Subject: [PATCH] TabBox: Fix loading a different switcher after one has failed We need to reset the QML Item on failure or trying to load a different switcher afterwards will pick a wrong codepath and also fail. BUG: 445455 FIXED-IN: 5.25.4 --- src/tabbox/tabboxhandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tabbox/tabboxhandler.cpp b/src/tabbox/tabboxhandler.cpp index 19bd4a45c3..f7e02deb32 100644 --- a/src/tabbox/tabboxhandler.cpp +++ b/src/tabbox/tabboxhandler.cpp @@ -88,7 +88,7 @@ private: TabBoxHandlerPrivate::TabBoxHandlerPrivate(TabBoxHandler *q) : m_qmlContext() - , m_qmlComponent() + , m_qmlComponent(nullptr) , m_mainItem(nullptr) { this->q = q; @@ -289,6 +289,7 @@ QObject *TabBoxHandlerPrivate::createSwitcherItem(bool desktopMode) "Contact your distribution about this.") << QStringLiteral("20"); KProcess::startDetached(QStringLiteral("kdialog"), args); + m_qmlComponent.reset(nullptr); } else { QObject *object = m_qmlComponent->create(m_qmlContext.data()); if (desktopMode) {