38 switch (event->type()) {
39 case QEvent::DragEnter: {
40 auto* dragEvent =
static_cast<QDragEnterEvent*
>(event);
41 const QStringList files = droppedLocalFiles(dragEvent->mimeData());
43 dragEvent->acceptProposedAction();
46 return {
true, !files.isEmpty(), files};
48 case QEvent::DragMove: {
49 auto* dragEvent =
static_cast<QDragMoveEvent*
>(event);
50 const QStringList files = droppedLocalFiles(dragEvent->mimeData());
52 dragEvent->acceptProposedAction();
55 return {
true, !files.isEmpty(), files};
58 auto* dropEvent =
static_cast<QDropEvent*
>(event);
59 const QStringList files = droppedLocalFiles(dropEvent->mimeData());
61 dropEvent->acceptProposedAction();
64 return {
true, !files.isEmpty(), files};