#include <QGraphicsView>
#include <QMimeData>
#include <QTimer>
+#include <QAccessible>
KItemListController::KItemListController(KItemModelBase* model, KItemListView* view, QObject* parent) :
QObject(parent),
default:
m_keyboardManager->addKeys(event->text());
+ // Make sure unconsumed events get propagated up the chain. #302329
+ event->ignore();
return false;
}
return;
}
- if (m_model->supportsDropping(index)) {
+ /* m_view->isUnderMouse() fixes a bug in the Folder-View-Panel and in the
+ * Places-Panel.
+ *
+ * Bug: When you drag a file onto a Folder-View-Item or a Places-Item and
+ * then move away before the auto-activation timeout triggers, than the
+ * item still becomes activated/expanded.
+ *
+ * See Bug 293200 and 305783
+ */
+ if (m_model->supportsDropping(index) && m_view->isUnderMouse()) {
if (m_view->supportsItemExpanding() && m_model->isExpandable(index)) {
const bool expanded = m_model->isExpanded(index);
m_model->setExpanded(index, !expanded);
emit itemDropEvent(m_view->itemAt(pos), event);
}
+ QAccessible::updateAccessibility(view(), 0, QAccessible::DragDropEnd);
+
return true;
}
drag->setHotSpot(hotSpot);
drag->exec(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction, Qt::CopyAction);
+ QAccessible::updateAccessibility(view(), 0, QAccessible::DragDropStart);
}
KItemListWidget* KItemListController::hoveredWidget() const