mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 03:23:56 -07:00
Bump minimum Qt version from 5.8 to 5.15 (#6442)
* Bump minimum Qt version from 5.8 to 5.15 * remove version check * remove version checks
This commit is contained in:
parent
521046fb09
commit
70f9982c29
31 changed files with 5 additions and 156 deletions
|
|
@ -42,11 +42,7 @@ RemoteClient::RemoteClient(QObject *parent, INetworkSettingsProvider *_networkSe
|
|||
connect(socket, &QTcpSocket::connected, this, &RemoteClient::slotConnected);
|
||||
connect(socket, &QTcpSocket::readyRead, this, &RemoteClient::readData);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
connect(socket, &QTcpSocket::errorOccurred, this, &RemoteClient::slotSocketError);
|
||||
#else
|
||||
connect(socket, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::error), this, &RemoteClient::slotSocketError);
|
||||
#endif
|
||||
|
||||
websocket = new QWebSocket(QString(), QWebSocketProtocol::VersionLatest, this);
|
||||
connect(websocket, &QWebSocket::binaryMessageReceived, this, &RemoteClient::websocketMessageReceived);
|
||||
|
|
|
|||
|
|
@ -63,11 +63,7 @@ void Server_CardZone::shuffle(int start, int end)
|
|||
|
||||
for (int i = end; i > start; i--) {
|
||||
int j = rng->rand(start, i);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
|
||||
cards.swapItemsAt(j, i);
|
||||
#else
|
||||
cards.swap(j, i);
|
||||
#endif
|
||||
}
|
||||
playersWithWritePermission.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,11 +73,7 @@ Server_Game::Server_Game(const ServerInfo_User &_creatorInfo,
|
|||
spectatorsSeeEverything(_spectatorsSeeEverything), startingLifeTotal(_startingLifeTotal),
|
||||
shareDecklistsOnLoad(_shareDecklistsOnLoad), inactivityCounter(0), startTimeOfThisGame(0), secondsElapsed(0),
|
||||
firstGameStarted(false), turnOrderReversed(false), startTime(QDateTime::currentDateTime()), pingClock(nullptr),
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
gameMutex()
|
||||
#else
|
||||
gameMutex(QMutex::Recursive)
|
||||
#endif
|
||||
{
|
||||
currentReplay = new GameReplay;
|
||||
currentReplay->set_replay_id(room->getServer()->getDatabaseInterface()->getNextReplayId());
|
||||
|
|
|
|||
|
|
@ -90,11 +90,7 @@ private slots:
|
|||
void doStartGameIfReady(bool forceStartGame = false);
|
||||
|
||||
public:
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
mutable QRecursiveMutex gameMutex;
|
||||
#else
|
||||
mutable QMutex gameMutex;
|
||||
#endif
|
||||
Server_Game(const ServerInfo_User &_creatorInfo,
|
||||
int _gameId,
|
||||
const QString &_description,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue