diff --git a/src/libs/utils/dropsupport.cpp b/src/libs/utils/dropsupport.cpp index 95d3678719f..7416edf9c37 100644 --- a/src/libs/utils/dropsupport.cpp +++ b/src/libs/utils/dropsupport.cpp @@ -86,11 +86,10 @@ bool DropSupport::eventFilter(QObject *obj, QEvent *event) auto dee = static_cast(event); if ((isFileDrop(dee) || isValueDrop(dee)) && (!m_filterFunction || m_filterFunction(dee, this))) { event->accept(); - return true; + } else { + event->ignore(); } - // event->ignore(); - return false; - + return true; } else if (event->type() == QEvent::DragMove) { event->accept(); return true; diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index 0229116ff85..9edef863c9a 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -113,7 +113,7 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) : m_container->addWidget(empty); m_widgetEditorMap.insert(empty, nullptr); - /*const auto dropSupport = new DropSupport(this, [this](QDropEvent *event, DropSupport *) { + const auto dropSupport = new DropSupport(this, [this](QDropEvent *event, DropSupport *) { // do not accept move events except from other editor views (i.e. their tool bars) // otherwise e.g. item views that support moving items within themselves would // also "move" the item into the editor view, i.e. the item would be removed from the @@ -126,7 +126,7 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) : }); connect(dropSupport, &DropSupport::filesDropped, this, &EditorView::openDroppedFiles); -*/ + updateNavigatorActions(); } diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index f31fcbf99be..47d66c32b46 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -194,12 +194,12 @@ MainWindow::MainWindow() statusBar()->setProperty("p_styled", true); - /*auto dropSupport = new DropSupport(this, [](QDropEvent *event, DropSupport *) { + auto dropSupport = new DropSupport(this, [](QDropEvent *event, DropSupport *) { return event->source() == nullptr; // only accept drops from the "outside" (e.g. file manager) }); connect(dropSupport, &DropSupport::filesDropped, this, &MainWindow::openDroppedFiles); -*/ + if (HostOsInfo::isLinuxHost()) { m_trimTimer.setSingleShot(true); m_trimTimer.setInterval(60000);