summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-05-08 14:44:17 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2017-05-10 04:16:52 +0000
commit637beda0062ff65918823147830b52e29ae550a6 (patch)
treeb7d2ef4aa1c05dc4ba7ba4c0032544090ace638b /src/core/web_contents_adapter.cpp
parent757d5b1cea0d3d70b97b31f331df9ada82f45d2d (diff)
Fix backwards compatibility
QtWebEngine supports building with last stable and last LTS Qt releases. Guard some 5.7-5.9 API from being used when not available, and reinstate the default features for 5.6 LTS builds. Change-Id: Ia288a49109d011a2bee883d4a2d38d994b497d59 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index d67d972c8..444429c75 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -1184,7 +1184,9 @@ void WebContentsAdapter::startDragging(QObject *dragSource, const content::DropD
bool dValid = true;
QMetaObject::Connection onDestroyed = QObject::connect(dragSource, &QObject::destroyed, [&dValid](){
dValid = false;
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0))
QDrag::cancel();
+#endif
});
drag->setMimeData(mimeDataFromDropData(*d->currentDropData));