diff --git a/cockatrice/src/abstractclient.cpp b/cockatrice/src/abstractclient.cpp index 8e95e52e..5f578c35 100644 --- a/cockatrice/src/abstractclient.cpp +++ b/cockatrice/src/abstractclient.cpp @@ -1,6 +1,5 @@ #include "abstractclient.h" -#include "client_metatypes.h" #include "featureset.h" #include "get_pb_extension.h" #include "pb/commands.pb.h" diff --git a/cockatrice/src/client_metatypes.h b/cockatrice/src/client_metatypes.h deleted file mode 100644 index d0ece007..00000000 --- a/cockatrice/src/client_metatypes.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef CLIENT_METATYPES_H -#define CLIENT_METATYPES_H - -#include - -Q_DECLARE_METATYPE(QVariant) -Q_DECLARE_METATYPE(CommandContainer) -Q_DECLARE_METATYPE(Response) -Q_DECLARE_METATYPE(Response::ResponseCode) -Q_DECLARE_METATYPE(ClientStatus) -Q_DECLARE_METATYPE(RoomEvent) -Q_DECLARE_METATYPE(GameEventContainer) -Q_DECLARE_METATYPE(Event_ServerIdentification) -Q_DECLARE_METATYPE(Event_ConnectionClosed) -Q_DECLARE_METATYPE(Event_ServerShutdown) -Q_DECLARE_METATYPE(Event_AddToList) -Q_DECLARE_METATYPE(Event_RemoveFromList) -Q_DECLARE_METATYPE(Event_UserJoined) -Q_DECLARE_METATYPE(Event_UserLeft) -Q_DECLARE_METATYPE(Event_ServerMessage) -Q_DECLARE_METATYPE(Event_ListRooms) -Q_DECLARE_METATYPE(Event_GameJoined) -Q_DECLARE_METATYPE(Event_UserMessage) -Q_DECLARE_METATYPE(ServerInfo_User) -Q_DECLARE_METATYPE(QList) -Q_DECLARE_METATYPE(Event_ReplayAdded) -Q_DECLARE_METATYPE(QList) - -#endif diff --git a/cockatrice/src/tab_message.cpp b/cockatrice/src/tab_message.cpp index d8beed54..5c09adbb 100644 --- a/cockatrice/src/tab_message.cpp +++ b/cockatrice/src/tab_message.cpp @@ -159,7 +159,7 @@ void TabMessage::showSystemPopup(const Event_UserMessage &event) void TabMessage::messageClicked() { tabSupervisor->setCurrentIndex(tabSupervisor->indexOf(this)); - QApplication::setActiveWindow(this); + activateWindow(); emit maximizeClient(); } diff --git a/cockatrice/src/tab_room.cpp b/cockatrice/src/tab_room.cpp index 51bfc3e5..4efbcc10 100644 --- a/cockatrice/src/tab_room.cpp +++ b/cockatrice/src/tab_room.cpp @@ -155,7 +155,7 @@ void TabRoom::retranslateUi() void TabRoom::focusTab() { - QApplication::setActiveWindow(this); + activateWindow(); tabSupervisor->setCurrentIndex(tabSupervisor->indexOf(this)); emit maximizeClient(); } diff --git a/cockatrice/src/window_main.cpp b/cockatrice/src/window_main.cpp index b101aeb3..3f087987 100644 --- a/cockatrice/src/window_main.cpp +++ b/cockatrice/src/window_main.cpp @@ -936,7 +936,7 @@ void MainWindow::iconActivated(QSystemTrayIcon::ActivationReason reason) showMinimized(); } else { showNormal(); - QApplication::setActiveWindow(this); + activateWindow(); } } } diff --git a/common/server.cpp b/common/server.cpp index 5f0fe11e..1a9bf6bf 100644 --- a/common/server.cpp +++ b/common/server.cpp @@ -30,7 +30,6 @@ #include "server_counter.h" #include "server_database_interface.h" #include "server_game.h" -#include "server_metatypes.h" #include "server_player.h" #include "server_protocolhandler.h" #include "server_remoteuserinterface.h" diff --git a/common/server_metatypes.h b/common/server_metatypes.h deleted file mode 100644 index a95a11a1..00000000 --- a/common/server_metatypes.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef SERVER_METATYPES_H -#define SERVER_METATYPES_H - -#include "pb/commands.pb.h" -#include "pb/game_event_container.pb.h" -#include "pb/isl_message.pb.h" -#include "pb/response.pb.h" -#include "pb/room_commands.pb.h" -#include "pb/serverinfo_ban.pb.h" -#include "pb/serverinfo_game.pb.h" -#include "pb/serverinfo_room.pb.h" -#include "pb/serverinfo_user.pb.h" - -#include - -Q_DECLARE_METATYPE(ServerInfo_Ban) -Q_DECLARE_METATYPE(ServerInfo_User) -Q_DECLARE_METATYPE(ServerInfo_Room) -Q_DECLARE_METATYPE(ServerInfo_Game) -Q_DECLARE_METATYPE(CommandContainer) -Q_DECLARE_METATYPE(Response) -Q_DECLARE_METATYPE(GameEventContainer) -Q_DECLARE_METATYPE(IslMessage) -Q_DECLARE_METATYPE(Command_JoinGame) - -#endif