mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-10 04:07:25 -08:00
Deal with recent Qt methods deprecation (#3801)
* Deal with recent Qt methods deprecation * Use std::sort, std::less instead of qSort/qLess * Use QFontMetrics::horizontalAdvance instead of ::width * Use qApp->primaryScreen() instead of QDesktopWidget * use lambas instead of QSignalMapper * Use QTreeWidgetItem::setForeground instead of ::setTextColor * Use QDir::setPath instead of operator=(QString) * Use QList::swapItemsAt instead of ::swap * fix error
This commit is contained in:
@@ -84,6 +84,7 @@
|
||||
#include "pb/context_undo_draw.pb.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <algorithm>
|
||||
|
||||
Server_Player::Server_Player(Server_Game *_game,
|
||||
int _playerId,
|
||||
@@ -409,7 +410,7 @@ Response::ResponseCode Server_Player::moveCard(GameEventStorage &ges,
|
||||
// 0 performs no sorting
|
||||
// 1 reverses the sorting
|
||||
MoveCardCompareFunctor cmp(0);
|
||||
qSort(cardsToMove.begin(), cardsToMove.end(), cmp);
|
||||
std::sort(cardsToMove.begin(), cardsToMove.end(), cmp);
|
||||
|
||||
bool secondHalf = false;
|
||||
int xIndex = -1;
|
||||
|
||||
Reference in New Issue
Block a user