Add check for older Qt versions
This commit is contained in:
parent
1ed233b26a
commit
173e9b3f7b
@ -1057,7 +1057,12 @@ void AOClient::cmdEvidence_Swap(int argc, QStringList argv)
|
||||
return;
|
||||
}
|
||||
if ((ev_id2 <= ev_size) && (ev_id1 <= ev_size)) {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
//swapItemsAt does not exist in Qt older than 5.13
|
||||
area->evidence.swap(ev_id1, ev_id2);
|
||||
#else
|
||||
area->evidence.swapItemsAt(ev_id1, ev_id2);
|
||||
#endif
|
||||
sendEvidenceList(area);
|
||||
sendServerMessage("The evidence " + QString::number(ev_id1) + " and " + QString::number(ev_id2) + " have been swapped.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user