diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-12-16 12:38:16 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-01-03 09:15:41 +0000 |
commit | 423f7ab80f814c5f4e4784e70bd3c36c44497314 (patch) | |
tree | 7c58a8795956c2542fb2d6947146c2575757f725 /src/core/type_conversion.h | |
parent | caf813a167c8a31739e7ae192a4c4921607e3ead (diff) |
Implement drag and drop support
Create a QDrag for drag and drop operations that are started in the web
page. React on drag and drop event of QWidget and QQuickItem.
Task-number: QTBUG-43008
Change-Id: If09f09de6e6d5b5f02835985a17cc6bc3262f411
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/type_conversion.h')
-rw-r--r-- | src/core/type_conversion.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h index da0ee3e5c..5cf7267f2 100644 --- a/src/core/type_conversion.h +++ b/src/core/type_conversion.h @@ -46,6 +46,7 @@ #include <QRect> #include <QString> #include <QUrl> +#include <base/strings/nullable_string16.h> #include "base/files/file_path.h" #include "base/time/time.h" #include "content/public/common/file_chooser_file_info.h" @@ -58,6 +59,10 @@ #include "ui/gfx/geometry/rect_f.h" #include "url/gurl.h" +namespace gfx { +class ImageSkiaRep; +} + namespace QtWebEngineCore { inline QString toQt(const base::string16 &string) @@ -83,6 +88,11 @@ inline base::string16 toString16(const QString &qString) #endif } +inline base::NullableString16 toNullableString16(const QString &qString) +{ + return base::NullableString16(toString16(qString), qString.isNull()); +} + inline QUrl toQt(const GURL &url) { return QUrl(QString::fromStdString(url.spec())); @@ -150,6 +160,7 @@ inline QImage toQImage(const SkBitmap &bitmap, QImage::Format format) } QImage toQImage(const SkBitmap &bitmap); +QImage toQImage(const gfx::ImageSkiaRep &imageSkiaRep); inline QMatrix4x4 toQt(const SkMatrix44 &m) { |