From a71b33944b46ef147b301c07de9ec39e0e398bb7 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 28 Nov 2023 13:43:09 +0100 Subject: [PATCH] Core: Restore opening of files that are dropped on the MainWindow The code to handle dropping unintentionally got commented out, then fixed, then commented out again. This change restores it. Amends: e5f74d217b8c8c469ba16afd38c723be5e156555 ..which amended: 5da1f149034590626171308b5d74c9df15739b2d ..which amended: e34762c84436c9b8b3d35f119a893dcd6cb4f4db Fixes: QTCREATORBUG-29961 Change-Id: Iccc8a9b7bc24bc3475ed4fa37a7c231a1f575c1c Reviewed-by: Marcus Tillmanns Reviewed-by: Eike Ziller --- src/plugins/coreplugin/icore.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 1c04ebd2b6d..f3962d8e12b 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -1264,12 +1265,11 @@ void ICorePrivate::init() m_modeStack->statusBar()->setProperty("p_styled", true); - /*auto dropSupport = new DropSupport(this, [](QDropEvent *event, DropSupport *) { + auto dropSupport = new DropSupport(m_mainwindow, [](QDropEvent *event, DropSupport *) { return event->source() == nullptr; // only accept drops from the "outside" (e.g. file manager) }); - connect(dropSupport, &DropSupport::filesDropped, - this, &MainWindow::openDroppedFiles); -*/ + connect(dropSupport, &DropSupport::filesDropped, this, &ICorePrivate::openDroppedFiles); + if (HostOsInfo::isLinuxHost()) { m_trimTimer.setSingleShot(true); m_trimTimer.setInterval(60000);