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: e5f74d217b
..which amended: 5da1f14903
..which amended: e34762c844

Fixes: QTCREATORBUG-29961
Change-Id: Iccc8a9b7bc24bc3475ed4fa37a7c231a1f575c1c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2023-11-28 13:43:09 +01:00
parent a27aceb558
commit a71b33944b

View File

@@ -52,6 +52,7 @@
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/appinfo.h> #include <utils/appinfo.h>
#include <utils/checkablemessagebox.h> #include <utils/checkablemessagebox.h>
#include <utils/dropsupport.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/fsengine/fileiconprovider.h> #include <utils/fsengine/fileiconprovider.h>
@@ -1264,12 +1265,11 @@ void ICorePrivate::init()
m_modeStack->statusBar()->setProperty("p_styled", true); 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) return event->source() == nullptr; // only accept drops from the "outside" (e.g. file manager)
}); });
connect(dropSupport, &DropSupport::filesDropped, connect(dropSupport, &DropSupport::filesDropped, this, &ICorePrivate::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);