mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
WebView: Remove custom drag&drop handling
QtWebEngine drag&drop now works
This commit is contained in:
parent
1a0ec338de
commit
96202a6fe0
@ -588,30 +588,6 @@ void WebView::userDefinedOpenUrlInBgTab(const QUrl &url)
|
|||||||
userDefinedOpenUrlInNewTab(actionUrl, true);
|
userDefinedOpenUrlInNewTab(actionUrl, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebView::dragEnterEvent(QDragEnterEvent *event)
|
|
||||||
{
|
|
||||||
if (event->mimeData()->hasUrls()) {
|
|
||||||
event->accept();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QWebEngineView::dragEnterEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WebView::dropEvent(QDropEvent *event)
|
|
||||||
{
|
|
||||||
if (event->mimeData()->hasUrls()) {
|
|
||||||
const QList<QUrl> &urls = event->mimeData()->urls();
|
|
||||||
load(urls.at(0));
|
|
||||||
for (int i = 1; i < urls.size(); ++i) {
|
|
||||||
openUrlInNewTab(urls.at(i), Qz::NT_CleanSelectedTab);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QWebEngineView::dropEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WebView::createContextMenu(QMenu *menu, const WebHitTestResult &hitTest)
|
void WebView::createContextMenu(QMenu *menu, const WebHitTestResult &hitTest)
|
||||||
{
|
{
|
||||||
// cppcheck-suppress variableScope
|
// cppcheck-suppress variableScope
|
||||||
|
@ -137,8 +137,6 @@ protected slots:
|
|||||||
void userDefinedOpenUrlInBgTab(const QUrl &url = QUrl());
|
void userDefinedOpenUrlInBgTab(const QUrl &url = QUrl());
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
|
||||||
void dropEvent(QDropEvent *event);
|
|
||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
void contextMenuEvent(QContextMenuEvent *event);
|
void contextMenuEvent(QContextMenuEvent *event);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user