don't accept drops that we don't understand or when we are immutable
CCBUG:163908 svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=820230
This commit is contained in:
parent
1f6736bb42
commit
bdb635e3a8
@ -691,6 +691,14 @@ KPluginInfo::List Containment::listContainmentsForMimetype(const QString &mimety
|
||||
return KPluginInfo::fromServices(offers);
|
||||
}
|
||||
|
||||
void Containment::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
|
||||
{
|
||||
kDebug() << immutability() << Mutable << (immutability() == Mutable);
|
||||
event->setAccepted(immutability() == Mutable &&
|
||||
(event->mimeData()->hasFormat(static_cast<Corona*>(scene())->appletMimeType()) ||
|
||||
KUrl::List::canDecode(event->mimeData())));
|
||||
}
|
||||
|
||||
void Containment::dropEvent(QGraphicsSceneDragDropEvent *event)
|
||||
{
|
||||
//kDebug() << event->mimeData()->text();
|
||||
|
@ -387,9 +387,13 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
|
||||
protected Q_SLOTS:
|
||||
/**
|
||||
* @internal
|
||||
* @reimplemented from QGraphicsItem
|
||||
*/
|
||||
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
|
||||
|
||||
/**
|
||||
* @reimplemented from QGraphicsItem
|
||||
*/
|
||||
void dropEvent(QGraphicsSceneDragDropEvent *event);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user