Make it possible for ContainmentInterface to deal with WrappedMimeData
This way it integrates properly with KDeclarative as well. This will need to be extended in order to integrate QtQuick.DropArea.
This commit is contained in:
parent
e2e7cb1cab
commit
b14463f352
@ -311,6 +311,15 @@ QPointF ContainmentInterface::mapToApplet(AppletInterface *applet, int x, int y)
|
||||
return pos - applet->mapToScene(QPointF(0, 0));
|
||||
}
|
||||
|
||||
void ContainmentInterface::processMimeData(QObject *mimeDataProxy, int x, int y)
|
||||
{
|
||||
QMimeData* mime = qobject_cast<QMimeData*>(mimeDataProxy);
|
||||
if (mime)
|
||||
processMimeData(mime, x, y);
|
||||
else
|
||||
processMimeData(mimeDataProxy->property("mimeData").value<QMimeData*>(), x, y);
|
||||
}
|
||||
|
||||
void ContainmentInterface::processMimeData(QMimeData *mimeData, int x, int y)
|
||||
{
|
||||
if (!mimeData) {
|
||||
|
@ -122,6 +122,11 @@ public:
|
||||
*/
|
||||
Q_INVOKABLE void processMimeData(QMimeData *data, int x, int y);
|
||||
|
||||
/**
|
||||
* Process the mime data arrived to a particular coordinate, either with a drag and drop or paste with middle mouse button
|
||||
*/
|
||||
Q_INVOKABLE void processMimeData(QObject *data, int x, int y);
|
||||
|
||||
/**
|
||||
* Search for a containment at those coordinates.
|
||||
* the coordinates are passed as local coordinates of *this* containment
|
||||
|
Loading…
Reference in New Issue
Block a user