MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / dragEnterEvent

Method dragEnterEvent

src/modlistview.cpp:1358–1374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1356}
1357
1358void 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
1376void ModListView::dragMoveEvent(QDragMoveEvent* event)
1377{

Callers

nothing calls this directly

Calls 3

isLocalFileDropMethod · 0.80
mimeDataMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected