Core: Revert unintended change

Amends: e34762c844

Change-Id: I024b6ae5b65dffe45bacc1f44bba5e8ce41fe49d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-09-19 12:52:53 +02:00
parent d00d056b32
commit 5da1f14903
3 changed files with 7 additions and 8 deletions

View File

@@ -86,11 +86,10 @@ bool DropSupport::eventFilter(QObject *obj, QEvent *event)
auto dee = static_cast<QDragEnterEvent *>(event); auto dee = static_cast<QDragEnterEvent *>(event);
if ((isFileDrop(dee) || isValueDrop(dee)) && (!m_filterFunction || m_filterFunction(dee, this))) { if ((isFileDrop(dee) || isValueDrop(dee)) && (!m_filterFunction || m_filterFunction(dee, this))) {
event->accept(); event->accept();
return true; } else {
event->ignore();
} }
// event->ignore(); return true;
return false;
} else if (event->type() == QEvent::DragMove) { } else if (event->type() == QEvent::DragMove) {
event->accept(); event->accept();
return true; return true;

View File

@@ -113,7 +113,7 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) :
m_container->addWidget(empty); m_container->addWidget(empty);
m_widgetEditorMap.insert(empty, nullptr); 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) // 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 // 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 // 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, connect(dropSupport, &DropSupport::filesDropped,
this, &EditorView::openDroppedFiles); this, &EditorView::openDroppedFiles);
*/
updateNavigatorActions(); updateNavigatorActions();
} }

View File

@@ -194,12 +194,12 @@ MainWindow::MainWindow()
statusBar()->setProperty("p_styled", true); 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) return event->source() == nullptr; // only accept drops from the "outside" (e.g. file manager)
}); });
connect(dropSupport, &DropSupport::filesDropped, connect(dropSupport, &DropSupport::filesDropped,
this, &MainWindow::openDroppedFiles); this, &MainWindow::openDroppedFiles);
*/
if (HostOsInfo::isLinuxHost()) { if (HostOsInfo::isLinuxHost()) {
m_trimTimer.setSingleShot(true); m_trimTimer.setSingleShot(true);
m_trimTimer.setInterval(60000); m_trimTimer.setInterval(60000);