Clang-format (#3028)

* 1/3 Add .clang-format file and travis compilation check

* 2/3 Run clang-format

* 3/3 Fix compilation problems due to include reordering

* 3bis/3 AfterControlStatement: false
This commit is contained in:
ctrlaltca 2018-01-27 10:41:32 +01:00 committed by GitHub
parent 8dbdd24c8e
commit b29bd9e070
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
272 changed files with 13378 additions and 9535 deletions

View file

@ -1,15 +1,21 @@
#ifndef TAB_ROOM_H
#define TAB_ROOM_H
#include "tab.h"
#include "lineeditcompleter.h"
#include <QGroupBox>
#include <QMap>
#include <QLineEdit>
#include <QKeyEvent>
#include "tab.h"
#include <QFocusEvent>
#include <QGroupBox>
#include <QKeyEvent>
#include <QLineEdit>
#include <QMap>
namespace google { namespace protobuf { class Message; } }
namespace google
{
namespace protobuf
{
class Message;
}
} // namespace google
class AbstractClient;
class UserList;
class QLabel;
@ -31,7 +37,8 @@ class PendingCommand;
class ServerInfo_User;
class LineEditCompleter;
class TabRoom : public Tab {
class TabRoom : public Tab
{
Q_OBJECT
private:
AbstractClient *client;
@ -39,14 +46,14 @@ private:
QString roomName;
ServerInfo_User *ownUser;
QMap<int, QString> gameTypes;
GameSelector *gameSelector;
UserList *userList;
ChatView *chatView;
QLabel *sayLabel;
LineEditCompleter *sayEdit;
QGroupBox *chatGroupBox;
QMenu *roomMenu;
QAction *aLeaveRoom;
QAction *aOpenChatSettings;
@ -76,18 +83,37 @@ private slots:
void processLeaveRoomEvent(const Event_LeaveRoom &event);
void processRoomSayEvent(const Event_RoomSay &event);
void refreshShortcuts();
public:
TabRoom(TabSupervisor *_tabSupervisor, AbstractClient *_client, ServerInfo_User *_ownUser, const ServerInfo_Room &info);
TabRoom(TabSupervisor *_tabSupervisor,
AbstractClient *_client,
ServerInfo_User *_ownUser,
const ServerInfo_Room &info);
~TabRoom();
void retranslateUi();
void closeRequest();
void tabActivated();
void processRoomEvent(const RoomEvent &event);
int getRoomId() const { return roomId; }
const QMap<int, QString> &getGameTypes() const { return gameTypes; }
QString getChannelName() const { return roomName; }
QString getTabText() const { return roomName; }
const ServerInfo_User *getUserInfo() const { return ownUser; }
int getRoomId() const
{
return roomId;
}
const QMap<int, QString> &getGameTypes() const
{
return gameTypes;
}
QString getChannelName() const
{
return roomName;
}
QString getTabText() const
{
return roomName;
}
const ServerInfo_User *getUserInfo() const
{
return ownUser;
}
PendingCommand *prepareRoomCommand(const ::google::protobuf::Message &cmd);
void sendRoomCommand(PendingCommand *pend);