| 1356 | } |
| 1357 | |
| 1358 | void ModListView::dragEnterEvent(QDragEnterEvent* event) |
| 1359 | { |
| 1360 | // this event is used by the modlist to check if we are draggin |
| 1361 | // to a mod (local files) or to a priority (mods, downloads, external |
| 1362 | // files) |
| 1363 | emit dragEntered(event->mimeData()); |
| 1364 | QTreeView::dragEnterEvent(event); |
| 1365 | |
| 1366 | // there is no drop event for invalid data since canDropMimeData |
| 1367 | // returns false, so we notify user on drag enter |
| 1368 | ModListDropInfo dropInfo(event->mimeData(), *m_core); |
| 1369 | |
| 1370 | if (dropInfo.isValid() && !dropInfo.isLocalFileDrop() && |
| 1371 | sortColumn() != ModList::COL_PRIORITY) { |
| 1372 | log::warn("Drag&Drop is only supported when sorting by priority."); |
| 1373 | } |
| 1374 | } |
| 1375 | |
| 1376 | void ModListView::dragMoveEvent(QDragMoveEvent* event) |
| 1377 | { |
nothing calls this directly
no test coverage detected