Add check for older Qt versions

This commit is contained in:
Salanto 2021-03-20 01:13:08 +01:00
parent 1ed233b26a
commit 173e9b3f7b

View File

@ -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.");
}