From 1f6736bb421b7342512df508b826c616c8fea6a1 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 13 Jun 2008 16:16:53 +0000 Subject: [PATCH] gut the drag/drop handlers in Corona; i don't want to remove them since that is apparently BIC (at least on my system it was =/), but it's certainly not the right place for this. if we wish to handle drops on the Corona itself (versus containments or applets, of course) we have the ability to do so in the future. right now it's wasted cycles. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=820229 --- corona.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/corona.cpp b/corona.cpp index d5e3fcafc..c340b8d8d 100644 --- a/corona.cpp +++ b/corona.cpp @@ -354,38 +354,19 @@ void Corona::loadDefaultLayout() { } -void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event) +void Corona::dragEnterEvent(QGraphicsSceneDragDropEvent *event) { -// kDebug() << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)"; - if (event->mimeData()->hasFormat(d->mimetype) || - KUrl::List::canDecode(event->mimeData())) { - event->acceptProposedAction(); - //TODO Create the applet, move to mouse position then send the - // following event to lock it to the mouse - //QMouseEvent event(QEvent::MouseButtonPress, event->pos(), Qt::LeftButton, event->mouseButtons(), 0); - //QApplication::sendEvent(this, &event); - } - - event->accept(); - //TODO Allow dragging an applet from another Corona into this one while - // keeping its settings etc. + QGraphicsScene::dragEnterEvent(event); } void Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent *event) { - // kDebug() << "Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent* event)"; - //TODO If an established Applet is dragged out of the Corona, remove it and - // create a QDrag type thing to keep the Applet's settings - QGraphicsScene::dragLeaveEvent(event); } void Corona::dragMoveEvent(QGraphicsSceneDragDropEvent *event) { QGraphicsScene::dragMoveEvent(event); - - event->accept(); - //kDebug() << "Corona::dragMoveEvent(QDragMoveEvent* event)"; } ImmutabilityType Corona::immutability() const