desktop/kdeplasma-addons/4.11.1-icontasks-fix-for-non-running.patch
2013-09-16 17:35:27 +00:00

36 lines
1.3 KiB
Diff

commit b56d1552e9a8f8efe8fb8fd641126e78627c61a9
Author: Eike Hein <hein@kde.org>
Date: Mon Sep 9 23:33:30 2013 +0200
Fix it for non-running items too.
BUG:324661
diff --git a/applets/icontasks/applauncheritem.cpp b/applets/icontasks/applauncheritem.cpp
index b5f646c..f721b5a 100644
--- a/applets/icontasks/applauncheritem.cpp
+++ b/applets/icontasks/applauncheritem.cpp
@@ -100,17 +100,18 @@ void AppLauncherItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *e)
actionList.append(configAction);
}
- TaskManager::BasicMenu menu(0, m_launcher, &m_applet->groupManager(), actionList, getAppMenu());
- menu.adjustSize();
+ TaskManager::BasicMenu *menu = new TaskManager::BasicMenu(0, m_launcher, &m_applet->groupManager(), actionList, getAppMenu());
+ menu->adjustSize();
if (m_applet->formFactor() != Plasma::Vertical) {
- menu.setMinimumWidth(size().width());
+ menu->setMinimumWidth(size().width());
}
Q_ASSERT(m_applet->containment());
Q_ASSERT(m_applet->containment()->corona());
stopWindowHoverEffect();
- menu.exec(m_applet->containment()->corona()->popupPosition(this, menu.size()));
+ menu->exec(m_applet->containment()->corona()->popupPosition(this, menu->size()));
+ menu->deleteLater();
}