mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Reimplement logging category for game_event_handler.cpp, remove linebreaks.
Took 36 seconds
This commit is contained in:
parent
a03a4a7ca0
commit
de1986c1fb
2 changed files with 4 additions and 4 deletions
|
|
@ -167,7 +167,7 @@ void GameEventHandler::processGameEventContainer(const GameEventContainer &cont,
|
||||||
default: {
|
default: {
|
||||||
Player *player = game->getPlayerManager()->getPlayers().value(playerId, 0);
|
Player *player = game->getPlayerManager()->getPlayers().value(playerId, 0);
|
||||||
if (!player) {
|
if (!player) {
|
||||||
// qCWarning(GameEventHandlerLog) << "unhandled game event: invalid player id";
|
qCWarning(GameEventHandlerLog) << "unhandled game event: invalid player id";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
player->getPlayerEventHandler()->processGameEvent(eventType, event, context, options);
|
player->getPlayerEventHandler()->processGameEvent(eventType, event, context, options);
|
||||||
|
|
@ -455,11 +455,8 @@ void GameEventHandler::eventKicked(const Event_Kicked & /*event*/,
|
||||||
const GameEventContext & /*context*/)
|
const GameEventContext & /*context*/)
|
||||||
{
|
{
|
||||||
emit gameClosed();
|
emit gameClosed();
|
||||||
|
|
||||||
emit logKicked();
|
emit logKicked();
|
||||||
|
|
||||||
emit playerKicked();
|
emit playerKicked();
|
||||||
|
|
||||||
emitUserEvent();
|
emitUserEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include "pb/serverinfo_player.pb.h"
|
#include "pb/serverinfo_player.pb.h"
|
||||||
#include "player/event_processing_options.h"
|
#include "player/event_processing_options.h"
|
||||||
|
|
||||||
|
#include <QLoggingCategory>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
class AbstractClient;
|
class AbstractClient;
|
||||||
|
|
@ -33,6 +34,8 @@ class Game;
|
||||||
class PendingCommand;
|
class PendingCommand;
|
||||||
class Player;
|
class Player;
|
||||||
|
|
||||||
|
inline Q_LOGGING_CATEGORY(GameEventHandlerLog, "tab_game");
|
||||||
|
|
||||||
class GameEventHandler : public QObject
|
class GameEventHandler : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue