From 173e9b3f7b92f806bcd7cbb426edcc7d9ecc1f2a Mon Sep 17 00:00:00 2001 From: Salanto Date: Sat, 20 Mar 2021 01:13:08 +0100 Subject: [PATCH] Add check for older Qt versions --- src/commands.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands.cpp b/src/commands.cpp index bf571b1..6b92dca 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -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."); }