fix for rare condition when the game screen would remain white when the game starts

This commit is contained in:
Max-Wilhelm Bruker 2012-04-01 21:15:13 +02:00
parent 40fbbc5982
commit a319ce3afb
6 changed files with 24 additions and 21 deletions

View file

@ -60,23 +60,25 @@ signals:
void ignoreListReceived(const QList<ServerInfo_User> &ignoreList);
void replayAddedEventReceived(const Event_ReplayAdded &event);
void sigSendCommandContainer(const CommandContainer &commandContainer);
void sigQueuePendingCommand(PendingCommand *pend);
private:
int nextCmdId;
QMutex clientMutex;
mutable QMutex clientMutex;
ClientStatus status;
private slots:
void queuePendingCommand(PendingCommand *pend);
protected slots:
void processProtocolItem(const ServerMessage &item);
virtual void sendCommandContainer(const CommandContainer &cont) = 0;
protected:
QMap<int, PendingCommand *> pendingCommands;
ClientStatus status;
QString userName, password;
void setStatus(ClientStatus _status);
virtual void sendCommandContainer(const CommandContainer &cont) = 0;
public:
AbstractClient(QObject *parent = 0);
~AbstractClient();
ClientStatus getStatus() const { return status; }
ClientStatus getStatus() const { QMutexLocker locker(&clientMutex); return status; }
void sendCommand(const CommandContainer &cont);
void sendCommand(PendingCommand *pend);