forked from qt-creator/qt-creator
Core: Revert unintended change
Amends: e34762c844
Change-Id: I024b6ae5b65dffe45bacc1f44bba5e8ce41fe49d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user