forked from qt-creator/qt-creator
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:e34762c844Fixes: 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:
@@ -52,6 +52,7 @@
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/appinfo.h>
|
||||
#include <utils/checkablemessagebox.h>
|
||||
#include <utils/dropsupport.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/fsengine/fileiconprovider.h>
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user