From 2ad515bbef89994b98ff8c5f85066ddc9b35ea0f Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sat, 18 Feb 2017 22:11:45 +0200 Subject: [PATCH] Revert "block dock hiding when alternatives are shown" This reverts commit ddd1a57875da4257a2b72b966f1876927884e1ad. --- app/dockcorona.cpp | 27 +-------------------------- app/dockcorona.h | 2 -- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/app/dockcorona.cpp b/app/dockcorona.cpp index 60f1e9d39..faeb7b634 100644 --- a/app/dockcorona.cpp +++ b/app/dockcorona.cpp @@ -372,20 +372,10 @@ void DockCorona::dockContainmentDestroyed(QObject *cont) void DockCorona::showAlternativesForApplet(Plasma::Applet *applet) { const QString alternativesQML = kPackage().filePath("appletalternativesui"); - if (alternativesQML.isEmpty()) { return; } - if (applet->containment()) { - DockView *view = m_dockViews[applet->containment()]; - - if (view) { - view->visibility()->setBlockHiding(true); - m_alternativesContaiment = applet->containment(); - } - } - KDeclarative::QmlObject *qmlObj = new KDeclarative::QmlObject(this); qmlObj->setInitializationDelayed(true); qmlObj->setSource(QUrl::fromLocalFile(alternativesQML)); @@ -398,16 +388,13 @@ void DockCorona::showAlternativesForApplet(Plasma::Applet *applet) connect(qmlObj->rootObject(), SIGNAL(visibleChanged(bool)), this, SLOT(alternativesVisibilityChanged(bool))); - connect(applet, &Plasma::Applet::destroyedChanged, this, [this, qmlObj](bool destroyed) { + connect(applet, &Plasma::Applet::destroyedChanged, this, [this, qmlObj] (bool destroyed) { if (!destroyed) { return; } - QMutableListIterator it(m_alternativesObjects); - while (it.hasNext()) { KDeclarative::QmlObject *obj = it.next(); - if (obj == qmlObj) { it.remove(); obj->deleteLater(); @@ -422,23 +409,11 @@ void DockCorona::alternativesVisibilityChanged(bool visible) return; } - if (m_alternativesContaiment) { - DockView *view = m_dockViews[m_alternativesContaiment]; - - if (view) { - view->visibility()->setBlockHiding(false); - } - - m_alternativesContaiment = nullptr; - } - QObject *root = sender(); QMutableListIterator it(m_alternativesObjects); - while (it.hasNext()) { KDeclarative::QmlObject *obj = it.next(); - if (obj->rootObject() == root) { it.remove(); obj->deleteLater(); diff --git a/app/dockcorona.h b/app/dockcorona.h index 3de3b8b35..9f0e800ec 100644 --- a/app/dockcorona.h +++ b/app/dockcorona.h @@ -96,8 +96,6 @@ private: KActivities::Consumer *m_activityConsumer; QPointer aboutDialog; - - QPointer m_alternativesContaiment; }; }