use krun instead of qprocess and make sure that we don't block our own process. you can see this happen in the second screencast, actually, and it's really lame ;)

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=671108
This commit is contained in:
Aaron J. Seigo 2007-06-03 19:59:24 +00:00
parent 452816cec8
commit 80fae8f7a3

View File

@ -23,10 +23,10 @@
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QGraphicsSceneDragDropEvent> #include <QGraphicsSceneDragDropEvent>
#include <QMimeData> #include <QMimeData>
#include <QProcess>
#include <KLocale> #include <KLocale>
#include <KMenu> #include <KMenu>
#include <KRun>
#include <KWindowSystem> #include <KWindowSystem>
#include "applet.h" #include "applet.h"
@ -255,6 +255,7 @@ void Corona::contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent)
} }
*/ */
contextMenuEvent->accept();
Applet* applet = qgraphicsitem_cast<Applet*>(itemAt(point)); Applet* applet = qgraphicsitem_cast<Applet*>(itemAt(point));
KMenu desktopMenu; KMenu desktopMenu;
if(!applet) { if(!applet) {
@ -280,12 +281,11 @@ void Corona::contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent)
desktopMenu.addAction(closeApplet); desktopMenu.addAction(closeApplet);
} }
desktopMenu.exec(point.toPoint()); desktopMenu.exec(point.toPoint());
contextMenuEvent->accept();
} }
void Corona::launchExplorer() void Corona::launchExplorer()
{ {
QProcess::execute("plasmaengineexplorer"); KRun::run("plasmaengineexplorer", KUrl::List(), 0);
} }
void Corona::appletDestroyed(QObject* object) void Corona::appletDestroyed(QObject* object)