diff options
author | Aleix Pol <[email protected]> | 2015-05-23 14:10:36 +0200 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2015-05-23 13:52:36 +0000 |
commit | dad48f0e9cca10528fcaab7ec7d08f678e81b1a9 (patch) | |
tree | b2673ae09e2a5d1399e4bdbe266885fec3f35bcc /src/quick/items/qquickdroparea_p.h | |
parent | 1ebee6e995541554aa9250ccf3326d2579c237c6 (diff) |
Makes it possible to extract all data from a QML DropArea
There's many types that aren't being covered by DropArea API, such as
images. getDataAsString is not acceptable, since fromUtf8 chokes on
reading non-utf8.
This patch introduces getDataAsArrayBuffer method that won't try to convert
the data into a QString and simply pass a QV4::ArrayBuffer, that internally
keeps a QByteArray.
Change-Id: I65411b3d365ee6c5e13effd9167156771ee08a05
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/quick/items/qquickdroparea_p.h')
-rw-r--r-- | src/quick/items/qquickdroparea_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickdroparea_p.h b/src/quick/items/qquickdroparea_p.h index e35ec40757..3223f4203b 100644 --- a/src/quick/items/qquickdroparea_p.h +++ b/src/quick/items/qquickdroparea_p.h @@ -96,6 +96,7 @@ public: QStringList formats() const; Q_INVOKABLE void getDataAsString(QQmlV4Function *); + Q_INVOKABLE void getDataAsArrayBuffer(QQmlV4Function *); Q_INVOKABLE void acceptProposedAction(QQmlV4Function *); Q_INVOKABLE void accept(QQmlV4Function *); |