From kde-commits Tue Nov 30 22:20:34 2010 From: Giulio Camuffo Date: Tue, 30 Nov 2010 22:20:34 +0000 To: kde-commits Subject: KDE/kdelibs/plasma Message-Id: <20101130222034.7A9A4AC8A3 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129115566400787 SVN commit 1202445 by camuffo: use QGraphicsScene::sendEvent instead of simply calling the event handler. this allow the containments to have more control on the moving of the applets installing event filters on them and fixes the moving of the applet Icon in some containments M +3 -1 applet.cpp --- trunk/KDE/kdelibs/plasma/applet.cpp #1202444:1202445 @@ -1738,13 +1738,15 @@ { switch (event->type()) { case QEvent::GraphicsSceneMouseMove: + case QEvent::GraphicsSceneMousePress: + case QEvent::GraphicsSceneMouseRelease: { // don't move when the containment is not mutable, // in the rare case the containment doesn't exists consider it as mutable if ((flags() & ItemIsMovable) && d->registeredAsDragHandle.contains(watched)) { Containment *c = containment(); if (!c || c->immutability() == Mutable) { - mouseMoveEvent(static_cast(event)); + scene()->sendEvent(this, event); return true; } }