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
This commit is contained in:
parent
9e61f5039e
commit
6914c81324
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,7 @@ private:
|
||||||
|
|
||||||
TabBoxHandlerPrivate::TabBoxHandlerPrivate(TabBoxHandler *q)
|
TabBoxHandlerPrivate::TabBoxHandlerPrivate(TabBoxHandler *q)
|
||||||
: m_qmlContext()
|
: m_qmlContext()
|
||||||
, m_qmlComponent()
|
, m_qmlComponent(nullptr)
|
||||||
, m_mainItem(nullptr)
|
, m_mainItem(nullptr)
|
||||||
{
|
{
|
||||||
this->q = q;
|
this->q = q;
|
||||||
|
@ -289,6 +289,7 @@ QObject *TabBoxHandlerPrivate::createSwitcherItem(bool desktopMode)
|
||||||
"Contact your distribution about this.")
|
"Contact your distribution about this.")
|
||||||
<< QStringLiteral("20");
|
<< QStringLiteral("20");
|
||||||
KProcess::startDetached(QStringLiteral("kdialog"), args);
|
KProcess::startDetached(QStringLiteral("kdialog"), args);
|
||||||
|
m_qmlComponent.reset(nullptr);
|
||||||
} else {
|
} else {
|
||||||
QObject *object = m_qmlComponent->create(m_qmlContext.data());
|
QObject *object = m_qmlComponent->create(m_qmlContext.data());
|
||||||
if (desktopMode) {
|
if (desktopMode) {
|
||||||
|
|
Loading…
Reference in a new issue