[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/kickoff/simpleapplet
From: Sebastian Sauer <mail () dipe ! org>
Date: 2009-01-21 22:22:29
Message-ID: 1232576549.308219.15505.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 914866 by sebsauer:
another crash-workaround. guess I should to the 'MergeModel' soon
M +14 -2 simpleapplet.cpp
M +1 -0 simpleapplet.h
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/simpleapplet/simpleapplet.cpp #914865:914866
@@ -422,8 +422,7 @@
if (!d->menuview) {
d->menuview = new Kickoff::MenuView();
connect(d->menuview, SIGNAL(triggered(QAction*)), this, SLOT(actionTriggered(QAction*)));
- connect(d->menuview, SIGNAL(aboutToHide()), d->icon, SLOT(setUnpressed()));
- connect(d->menuview, SIGNAL(aboutToHide()), d->menuview, SLOT(deleteLater()));
+ connect(d->menuview, SIGNAL(aboutToHide()), this, SLOT(aboutToHideMenu()));
switch (d->viewtype) {
case Combined: {
@@ -547,6 +546,19 @@
d->icon->setPressed();
}
+void MenuLauncherApplet::aboutToHideMenu()
+{
+ d->icon->setUnpressed();
+ if(d->menuview) {
+ //sebsauer, 2009-01-21; another dirty hack; delay destruction else it crashes in the KIconLoader
+ //dtor for whatever reason (rather hard to reproduce). Solution for this and the other hacks
+ //would be to finally get right of the way we build the menu by providing a model that does
+ //handle merging of the other models und updating the menus if content changes.
+ QTimer::singleShot(100, d->menuview, SLOT(delayedDestruct()));
+ d->menuview = 0;
+ }
+}
+
void MenuLauncherApplet::actionTriggered(QAction *action)
{
KUrl url = action->data().value<KUrl>();
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/simpleapplet/simpleapplet.h #914865:914866
@@ -111,6 +111,7 @@
void configAccepted();
void toggleMenu(bool pressed);
void toggleMenu();
+ void aboutToHideMenu();
void actionTriggered(QAction *action);
private:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic