diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-10-01 15:24:25 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-10-05 09:00:22 +0200 |
commit | 336165122406e457206f72466b3e5d4e4fbce508 (patch) | |
tree | 160175339c9ca64cb7632b96d2154a80fb562592 /src/quick/items/qquickdroparea_p.h | |
parent | 5fe9401342cd821ea3c43babf1ae8c4befb1201d (diff) |
QQuickDragEvent: Use proper types instead of QQmlV4Function
With QQmlV4Function we have no information at compile time about what
a arguments a function expects, and what it returns. Considering that
getDataAsString does not actually have an overload set, but simply
expects and returns a string, we can change to QString types. For
non-QString parameters, the engine will then transparently take care of
converting them.
The same applies to getDataAsArrayBuffer and QByteArray/ArrayBuffer.
Change-Id: I007796c3c01a6f021babd0dff2832506c7c63c30
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/quick/items/qquickdroparea_p.h')
-rw-r--r-- | src/quick/items/qquickdroparea_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickdroparea_p.h b/src/quick/items/qquickdroparea_p.h index a3fd8a81fd..4cce2e3db8 100644 --- a/src/quick/items/qquickdroparea_p.h +++ b/src/quick/items/qquickdroparea_p.h @@ -114,8 +114,8 @@ public: QList<QUrl> urls() const; QStringList formats() const; - Q_INVOKABLE void getDataAsString(QQmlV4Function *); - Q_INVOKABLE void getDataAsArrayBuffer(QQmlV4Function *); + Q_INVOKABLE QString getDataAsString(const QString &format) const; + Q_INVOKABLE QByteArray getDataAsArrayBuffer(const QString &format) const; Q_INVOKABLE void acceptProposedAction(QQmlV4Function *); Q_INVOKABLE void accept(QQmlV4Function *); |