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

Method dropMimeData

src/modlist.cpp:1094–1128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1092}
1093
1094bool ModList::dropMimeData(const QMimeData* mimeData, Qt::DropAction action, int row,
1095 int, const QModelIndex& parent)
1096{
1097 if (action == Qt::IgnoreAction) {
1098 return true;
1099 }
1100
1101 ModListDropInfo dropInfo(mimeData, *m_Organizer);
1102
1103 if (!m_Profile || !dropInfo.isValid()) {
1104 return false;
1105 }
1106
1107 int dropPriority = this->dropPriority(row, parent);
1108 if (dropPriority == -1) {
1109 return false;
1110 }
1111
1112 if (dropInfo.isLocalFileDrop()) {
1113 return dropLocalFiles(dropInfo, row, parent);
1114 } else {
1115 if (dropInfo.isModDrop()) {
1116 changeModPriority(dropInfo.rows(), dropPriority);
1117 } else if (dropInfo.isDownloadDrop()) {
1118 emit downloadArchiveDropped(dropInfo.download(), dropPriority);
1119 } else if (dropInfo.isExternalArchiveDrop()) {
1120 emit externalArchiveDropped(dropInfo.externalUrl(), dropPriority);
1121 } else if (dropInfo.isExternalFolderDrop()) {
1122 emit externalFolderDropped(dropInfo.externalUrl(), dropPriority);
1123 } else {
1124 return false;
1125 }
1126 }
1127 return false;
1128}
1129
1130void ModList::removeRowForce(int row, const QModelIndex& parent)
1131{

Callers

nothing calls this directly

Calls 8

dropPriorityMethod · 0.95
isLocalFileDropMethod · 0.80
isModDropMethod · 0.80
isDownloadDropMethod · 0.80
downloadMethod · 0.80
isExternalArchiveDropMethod · 0.80
isExternalFolderDropMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected