1
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:
David Rosca 2016-12-24 12:24:12 +01:00
parent 1a0ec338de
commit 96202a6fe0
2 changed files with 0 additions and 26 deletions

View File

@ -588,30 +588,6 @@ void WebView::userDefinedOpenUrlInBgTab(const QUrl &url)
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)
{
// cppcheck-suppress variableScope

View File

@ -137,8 +137,6 @@ protected slots:
void userDefinedOpenUrlInBgTab(const QUrl &url = QUrl());
protected:
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
void resizeEvent(QResizeEvent *event);
void contextMenuEvent(QContextMenuEvent *event);