From 6553aa61a1d99bc90f29cec636ed1c68fb2122b9 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Tue, 16 May 2017 21:46:45 +0300 Subject: [PATCH] Replace include guards with #pragma once --- include/ChatPage.h | 5 +---- include/Deserializable.h | 5 +---- include/EmojiCategory.h | 5 +---- include/EmojiItemDelegate.h | 5 +---- include/EmojiPanel.h | 5 +---- include/EmojiPickButton.h | 5 +---- include/EmojiProvider.h | 5 +---- include/ImageItem.h | 5 +---- include/ImageOverlayDialog.h | 5 +---- include/InputValidator.h | 5 +---- include/Login.h | 5 +---- include/LoginPage.h | 5 +---- include/LoginSettings.h | 5 +---- include/MainWindow.h | 5 +---- include/MatrixClient.h | 5 +---- include/Profile.h | 5 +---- include/Register.h | 5 +---- include/RegisterPage.h | 5 +---- include/RoomInfoListItem.h | 5 +---- include/RoomList.h | 5 +---- include/RoomMessages.h | 5 +---- include/RoomState.h | 5 +---- include/SlidingStackWidget.h | 5 +---- include/Sync.h | 5 +---- include/TextInputWidget.h | 5 +---- include/TimelineItem.h | 5 +---- include/TimelineView.h | 5 +---- include/TimelineViewManager.h | 5 +---- include/TopRoomBar.h | 5 +---- include/UserInfoWidget.h | 5 +---- include/WelcomePage.h | 5 +---- include/events/AliasesEventContent.h | 5 +---- include/events/AvatarEventContent.h | 5 +---- include/events/CanonicalAliasEventContent.h | 6 +----- include/events/CreateEventContent.h | 5 +---- include/events/Event.h | 5 +---- include/events/HistoryVisibilityEventContent.h | 5 +---- include/events/JoinRulesEventContent.h | 5 +---- include/events/MemberEventContent.h | 5 +---- include/events/MessageEvent.h | 5 +---- include/events/MessageEventContent.h | 5 +---- include/events/NameEventContent.h | 5 +---- include/events/PowerLevelsEventContent.h | 5 +---- include/events/RoomEvent.h | 5 +---- include/events/StateEvent.h | 5 +---- include/events/TopicEventContent.h | 5 +---- include/events/messages/Audio.h | 5 +---- include/events/messages/Emote.h | 6 +----- include/events/messages/File.h | 5 +---- include/events/messages/Image.h | 5 +---- include/events/messages/Location.h | 5 +---- include/events/messages/Notice.h | 5 +---- include/events/messages/Text.h | 5 +---- include/events/messages/Video.h | 5 +---- include/ui/Avatar.h | 5 +---- include/ui/Badge.h | 5 +---- include/ui/CircularProgress.h | 5 +---- include/ui/FlatButton.h | 5 +---- include/ui/OverlayModal.h | 5 +---- include/ui/OverlayWidget.h | 5 +---- include/ui/RaisedButton.h | 5 +---- include/ui/Ripple.h | 5 +---- include/ui/RippleOverlay.h | 5 +---- include/ui/TextField.h | 5 +---- include/ui/Theme.h | 5 +---- include/ui/ThemeManager.h | 5 +---- 66 files changed, 66 insertions(+), 266 deletions(-) diff --git a/include/ChatPage.h b/include/ChatPage.h index 2107eccf..5ad22584 100644 --- a/include/ChatPage.h +++ b/include/ChatPage.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef CHATPAGE_H -#define CHATPAGE_H +#pragma once #include #include @@ -86,5 +85,3 @@ private: // Matrix Client API provider. QSharedPointer client_; }; - -#endif // CHATPAGE_H diff --git a/include/Deserializable.h b/include/Deserializable.h index e4e07884..76290e1b 100644 --- a/include/Deserializable.h +++ b/include/Deserializable.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef DESERIALIZABLE_H -#define DESERIALIZABLE_H +#pragma once #include @@ -48,5 +47,3 @@ public: { } }; - -#endif diff --git a/include/EmojiCategory.h b/include/EmojiCategory.h index a26711df..9cf0a177 100644 --- a/include/EmojiCategory.h +++ b/include/EmojiCategory.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef EMOJI_CATEGORY_H -#define EMOJI_CATEGORY_H +#pragma once #include #include @@ -58,5 +57,3 @@ inline void EmojiCategory::clickIndex(const QModelIndex &index) { emit emojiSelected(index.data(Qt::UserRole).toString()); } - -#endif // EMOJI_CATEGORY_H diff --git a/include/EmojiItemDelegate.h b/include/EmojiItemDelegate.h index 5eeb4e24..d99fe2b6 100644 --- a/include/EmojiItemDelegate.h +++ b/include/EmojiItemDelegate.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef EMOJI_ITEM_DELEGATE_H -#define EMOJI_ITEM_DELEGATE_H +#pragma once #include #include @@ -37,5 +36,3 @@ public: private: Emoji *data_; }; - -#endif // EMOJI_ITEM_DELEGATE_H diff --git a/include/EmojiPanel.h b/include/EmojiPanel.h index 99c8fa63..e87ab7a4 100644 --- a/include/EmojiPanel.h +++ b/include/EmojiPanel.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef EMOJI_PANEL_H -#define EMOJI_PANEL_H +#pragma once #include #include @@ -66,5 +65,3 @@ private: const int category_icon_size_ = 20; }; - -#endif // EMOJI_PANEL_H diff --git a/include/EmojiPickButton.h b/include/EmojiPickButton.h index 77bc5495..840aa5dd 100644 --- a/include/EmojiPickButton.h +++ b/include/EmojiPickButton.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef EMOJI_PICK_BUTTON_H -#define EMOJI_PICK_BUTTON_H +#pragma once #include #include @@ -46,5 +45,3 @@ private: EmojiPanel *panel_; }; - -#endif // EMOJI_PICK_BUTTON_H diff --git a/include/EmojiProvider.h b/include/EmojiProvider.h index 630ea81a..40360c96 100644 --- a/include/EmojiProvider.h +++ b/include/EmojiProvider.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef EMOJI_PROVIDER_H -#define EMOJI_PROVIDER_H +#pragma once #include #include @@ -41,5 +40,3 @@ public: static const QList symbols; static const QList flags; }; - -#endif // EMOJI_PROVIDER_H diff --git a/include/ImageItem.h b/include/ImageItem.h index 5d065b25..5953c6e5 100644 --- a/include/ImageItem.h +++ b/include/ImageItem.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef TIMELINE_IMAGE_ITEM_H -#define TIMELINE_IMAGE_ITEM_H +#pragma once #include #include @@ -71,5 +70,3 @@ private: QSharedPointer client_; }; - -#endif // TIMELINE_IMAGE_ITEM_H diff --git a/include/ImageOverlayDialog.h b/include/ImageOverlayDialog.h index 5ef4fb65..6763b9d1 100644 --- a/include/ImageOverlayDialog.h +++ b/include/ImageOverlayDialog.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef IMAGE_OVERLAY_DIALOG_H -#define IMAGE_OVERLAY_DIALOG_H +#pragma once #include #include @@ -49,5 +48,3 @@ private: QRect content_; QRect close_button_; }; - -#endif // IMAGE_OVERLAY_DIALOG_H diff --git a/include/InputValidator.h b/include/InputValidator.h index 347ded9b..0d3e52ab 100644 --- a/include/InputValidator.h +++ b/include/InputValidator.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MATRIX_INPUT_VALIDATOR_H -#define MATRIX_INPUT_VALIDATOR_H +#pragma once #include #include @@ -30,5 +29,3 @@ public: static QRegExpValidator Password; static QRegExpValidator Domain; }; - -#endif // MATRIX_INPUT_VALIDATOR_H diff --git a/include/Login.h b/include/Login.h index 98752083..c00eb6d2 100644 --- a/include/Login.h +++ b/include/Login.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef LOGIN_H -#define LOGIN_H +#pragma once #include @@ -77,5 +76,3 @@ inline QString LoginResponse::getUserId() { return user_id_; } - -#endif // LOGIN_H diff --git a/include/LoginPage.h b/include/LoginPage.h index ccd40072..774dd8e9 100644 --- a/include/LoginPage.h +++ b/include/LoginPage.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef LOGINPAGE_H -#define LOGINPAGE_H +#pragma once #include #include @@ -86,5 +85,3 @@ private: // Matrix client API provider. QSharedPointer client_; }; - -#endif // LOGINPAGE_H diff --git a/include/LoginSettings.h b/include/LoginSettings.h index 3fc00488..62e9b2f5 100644 --- a/include/LoginSettings.h +++ b/include/LoginSettings.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef LOGIN_SETTINGS_H -#define LOGIN_SETTINGS_H +#pragma once #include @@ -36,5 +35,3 @@ private: TextField *input_; FlatButton *submit_button_; }; - -#endif // LOGIN_SETTINGS_H diff --git a/include/MainWindow.h b/include/MainWindow.h index 182b959a..ae8d1648 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H +#pragma once #include #include @@ -76,5 +75,3 @@ private: // Matrix Client API provider. QSharedPointer client_; }; - -#endif // MAINWINDOW_H diff --git a/include/MatrixClient.h b/include/MatrixClient.h index 79813c95..2fdb57f0 100644 --- a/include/MatrixClient.h +++ b/include/MatrixClient.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MATRIXCLIENT_H -#define MATRIXCLIENT_H +#pragma once #include @@ -160,5 +159,3 @@ inline void MatrixClient::incrementTransactionId() { txn_id_ += 1; } - -#endif // MATRIXCLIENT_H diff --git a/include/Profile.h b/include/Profile.h index 6dffa007..54016509 100644 --- a/include/Profile.h +++ b/include/Profile.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef PROFILE_H -#define PROFILE_H +#pragma once #include #include @@ -45,5 +44,3 @@ inline QString ProfileResponse::getDisplayName() { return display_name_; } - -#endif // PROFILE_H diff --git a/include/Register.h b/include/Register.h index fb9438cb..71b3a15a 100644 --- a/include/Register.h +++ b/include/Register.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef REGISTER_H -#define REGISTER_H +#pragma once #include @@ -77,5 +76,3 @@ inline QString RegisterResponse::getUserId() { return user_id_; } - -#endif // REGISTER_H diff --git a/include/RegisterPage.h b/include/RegisterPage.h index 9ac550bf..417aa6de 100644 --- a/include/RegisterPage.h +++ b/include/RegisterPage.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef REGISTERPAGE_H -#define REGISTERPAGE_H +#pragma once #include #include @@ -73,5 +72,3 @@ private: // Matrix client API provider. QSharedPointer client_; }; - -#endif // REGISTERPAGE_H diff --git a/include/RoomInfoListItem.h b/include/RoomInfoListItem.h index f45c9324..df7f11e8 100644 --- a/include/RoomInfoListItem.h +++ b/include/RoomInfoListItem.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef ROOMINFOLISTITEM_H -#define ROOMINFOLISTITEM_H +#pragma once #include #include @@ -104,5 +103,3 @@ inline void RoomInfoListItem::setAvatar(const QImage &avatar_image) { roomAvatar_->setImage(avatar_image); } - -#endif // ROOMINFOLISTITEM_H diff --git a/include/RoomList.h b/include/RoomList.h index 348b1e28..34067430 100644 --- a/include/RoomList.h +++ b/include/RoomList.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef ROOMLIST_H -#define ROOMLIST_H +#pragma once #include #include @@ -64,5 +63,3 @@ private: QSharedPointer client_; }; - -#endif // ROOMLIST_H diff --git a/include/RoomMessages.h b/include/RoomMessages.h index 695580b3..0353af9a 100644 --- a/include/RoomMessages.h +++ b/include/RoomMessages.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef ROOM_MESSAGES_H -#define ROOM_MESSAGES_H +#pragma once #include #include @@ -52,5 +51,3 @@ inline QJsonArray RoomMessages::chunk() const { return chunk_; } - -#endif // ROOM_MESSAGES_H diff --git a/include/RoomState.h b/include/RoomState.h index a6cce540..788940e2 100644 --- a/include/RoomState.h +++ b/include/RoomState.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef ROOM_STATE_H -#define ROOM_STATE_H +#pragma once #include @@ -59,5 +58,3 @@ inline QString RoomState::resolveTopic() const { return topic.content().topic().simplified(); } - -#endif // ROOM_STATE_H diff --git a/include/SlidingStackWidget.h b/include/SlidingStackWidget.h index d6733538..1cb01cea 100644 --- a/include/SlidingStackWidget.h +++ b/include/SlidingStackWidget.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef SLIDINGSTACKWIDGET_H -#define SLIDINGSTACKWIDGET_H +#pragma once #include #include @@ -90,5 +89,3 @@ protected: // Next widget's to show index. int next_; }; - -#endif // SLIDINGSTACKWIDGET_H diff --git a/include/Sync.h b/include/Sync.h index bfa03c1b..26cfdb48 100644 --- a/include/Sync.h +++ b/include/Sync.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef SYNC_H -#define SYNC_H +#pragma once #include #include @@ -196,5 +195,3 @@ inline QString SyncResponse::nextBatch() const { return next_batch_; } - -#endif // SYNC_H diff --git a/include/TextInputWidget.h b/include/TextInputWidget.h index c61298bf..225750f2 100644 --- a/include/TextInputWidget.h +++ b/include/TextInputWidget.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef TEXT_INPUT_WIDGET_H -#define TEXT_INPUT_WIDGET_H +#pragma once #include #include @@ -65,5 +64,3 @@ private: FlatButton *send_message_button_; EmojiPickButton *emoji_button_; }; - -#endif // TEXT_INPUT_WIDGET_H diff --git a/include/TimelineItem.h b/include/TimelineItem.h index 5c4ce792..5db823b0 100644 --- a/include/TimelineItem.h +++ b/include/TimelineItem.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef HISTORY_VIEW_ITEM_H -#define HISTORY_VIEW_ITEM_H +#pragma once #include #include @@ -63,5 +62,3 @@ private: QLabel *time_label_; QLabel *content_label_; }; - -#endif // HISTORY_VIEW_ITEM_H diff --git a/include/TimelineView.h b/include/TimelineView.h index ba5642c3..7aeb4d47 100644 --- a/include/TimelineView.h +++ b/include/TimelineView.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef HISTORY_VIEW_H -#define HISTORY_VIEW_H +#pragma once #include #include @@ -119,5 +118,3 @@ private: QList pending_msgs_; QSharedPointer client_; }; - -#endif // HISTORY_VIEW_H diff --git a/include/TimelineViewManager.h b/include/TimelineViewManager.h index d18e7320..dc2445e2 100644 --- a/include/TimelineViewManager.h +++ b/include/TimelineViewManager.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef HISTORY_VIEW_MANAGER_H -#define HISTORY_VIEW_MANAGER_H +#pragma once #include #include @@ -61,5 +60,3 @@ private: QMap> views_; QSharedPointer client_; }; - -#endif diff --git a/include/TopRoomBar.h b/include/TopRoomBar.h index 1544ad46..304ec320 100644 --- a/include/TopRoomBar.h +++ b/include/TopRoomBar.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef TOP_ROOM_BAR_H -#define TOP_ROOM_BAR_H +#pragma once #include #include @@ -78,5 +77,3 @@ inline void TopRoomBar::updateRoomTopic(const QString &topic) { topic_label_->setText(topic); } - -#endif // TOP_ROOM_BAR_H diff --git a/include/UserInfoWidget.h b/include/UserInfoWidget.h index e58cab60..e7dfbe25 100644 --- a/include/UserInfoWidget.h +++ b/include/UserInfoWidget.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef USER_INFO_WIDGET_H -#define USER_INFO_WIDGET_H +#pragma once #include #include @@ -61,5 +60,3 @@ private: QImage avatar_image_; }; - -#endif diff --git a/include/WelcomePage.h b/include/WelcomePage.h index 3cd6e664..13d9d141 100644 --- a/include/WelcomePage.h +++ b/include/WelcomePage.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef WELCOMEPAGE_H -#define WELCOMEPAGE_H +#pragma once #include #include @@ -57,5 +56,3 @@ private: RaisedButton *register_button_; RaisedButton *login_button_; }; - -#endif // WELCOMEPAGE_H diff --git a/include/events/AliasesEventContent.h b/include/events/AliasesEventContent.h index 44224fd9..a21aefd4 100644 --- a/include/events/AliasesEventContent.h +++ b/include/events/AliasesEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef ALIASES_EVENT_CONTENT_H -#define ALIASES_EVENT_CONTENT_H +#pragma once #include #include @@ -44,5 +43,3 @@ inline QList AliasesEventContent::aliases() const } } // namespace events } // namespace matrix - -#endif // ALIASES_EVENT_CONTENT_H diff --git a/include/events/AvatarEventContent.h b/include/events/AvatarEventContent.h index adf85b1f..fa6997e0 100644 --- a/include/events/AvatarEventContent.h +++ b/include/events/AvatarEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef AVATAR_EVENT_CONTENT_H -#define AVATAR_EVENT_CONTENT_H +#pragma once #include #include @@ -48,5 +47,3 @@ inline QUrl AvatarEventContent::url() const } } // namespace events } // namespace matrix - -#endif // AVATAR_EVENT_CONTENT_H diff --git a/include/events/CanonicalAliasEventContent.h b/include/events/CanonicalAliasEventContent.h index bcaf514b..00df6207 100644 --- a/include/events/CanonicalAliasEventContent.h +++ b/include/events/CanonicalAliasEventContent.h @@ -1,4 +1,3 @@ - /* * nheko Copyright (C) 2017 Konstantinos Sideris * @@ -16,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef CANONICAL_ALIAS_EVENT_CONTENT_H -#define CANONICAL_ALIAS_EVENT_CONTENT_H +#pragma once #include @@ -51,5 +49,3 @@ inline QString CanonicalAliasEventContent::alias() const } } // namespace events } // namespace matrix - -#endif // CANONICAL_ALIAS_EVENT_CONTENT_H diff --git a/include/events/CreateEventContent.h b/include/events/CreateEventContent.h index d48b8769..a0e40fb8 100644 --- a/include/events/CreateEventContent.h +++ b/include/events/CreateEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef CREATE_EVENT_CONTENT_H -#define CREATE_EVENT_CONTENT_H +#pragma once #include @@ -48,5 +47,3 @@ inline QString CreateEventContent::creator() const } } // namespace events } // namespace matrix - -#endif // CREATE_EVENT_CONTENT_H diff --git a/include/events/Event.h b/include/events/Event.h index e5a71c39..ea3eecea 100644 --- a/include/events/Event.h +++ b/include/events/Event.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MATRIX_EVENT_H -#define MATRIX_EVENT_H +#pragma once #include @@ -96,5 +95,3 @@ void Event::deserialize(const QJsonValue &data) } } // namespace events } // namespace matrix - -#endif // MATRIX_EVENT_H diff --git a/include/events/HistoryVisibilityEventContent.h b/include/events/HistoryVisibilityEventContent.h index 7b00d85e..1df83d09 100644 --- a/include/events/HistoryVisibilityEventContent.h +++ b/include/events/HistoryVisibilityEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef HISTORY_VISIBILITY_EVENT_CONTENT_H -#define HISTORY_VISIBILITY_EVENT_CONTENT_H +#pragma once #include @@ -50,5 +49,3 @@ inline HistoryVisibility HistoryVisibilityEventContent::historyVisibility() cons } } // namespace events } // namespace matrix - -#endif // HISTORY_VISIBILITY_EVENT_CONTENT_H diff --git a/include/events/JoinRulesEventContent.h b/include/events/JoinRulesEventContent.h index 9b3d27c3..746188e4 100644 --- a/include/events/JoinRulesEventContent.h +++ b/include/events/JoinRulesEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef JOIN_RULES_EVENT_CONTENT_H -#define JOIN_RULES_EVENT_CONTENT_H +#pragma once #include @@ -62,5 +61,3 @@ inline JoinRule JoinRulesEventContent::joinRule() const } } // namespace events } // namespace matrix - -#endif // JOIN_RULES_EVENT_CONTENT_H diff --git a/include/events/MemberEventContent.h b/include/events/MemberEventContent.h index 9fd1d7d9..f3714462 100644 --- a/include/events/MemberEventContent.h +++ b/include/events/MemberEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MEMBER_EVENT_CONTENT_H -#define MEMBER_EVENT_CONTENT_H +#pragma once #include #include @@ -79,5 +78,3 @@ inline Membership MemberEventContent::membershipState() const } } // namespace events } // namespace matrix - -#endif // MEMBER_EVENT_CONTENT_H diff --git a/include/events/MessageEvent.h b/include/events/MessageEvent.h index 617514b0..d1fb1b4a 100644 --- a/include/events/MessageEvent.h +++ b/include/events/MessageEvent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MATRIX_MESSAGE_EVENT_H -#define MATRIX_MESSAGE_EVENT_H +#pragma once #include "MessageEventContent.h" #include "RoomEvent.h" @@ -63,5 +62,3 @@ struct ThumbnailInfo { } // namespace messages } // namespace events } // namespace matrix - -#endif // MATRIX_MESSAGE_EVENT_H diff --git a/include/events/MessageEventContent.h b/include/events/MessageEventContent.h index 1ef730ed..a9d7e470 100644 --- a/include/events/MessageEventContent.h +++ b/include/events/MessageEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MESSAGE_EVENT_CONTENT_H -#define MESSAGE_EVENT_CONTENT_H +#pragma once #include @@ -74,5 +73,3 @@ inline QString MessageEventContent::body() const } } // namespace events } // namespace matrix - -#endif // MESSAGE_EVENT_CONTENT_H diff --git a/include/events/NameEventContent.h b/include/events/NameEventContent.h index 970edab8..bf5a9209 100644 --- a/include/events/NameEventContent.h +++ b/include/events/NameEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef NAME_EVENT_CONTENT_H -#define NAME_EVENT_CONTENT_H +#pragma once #include @@ -47,5 +46,3 @@ inline QString NameEventContent::name() const } } // namespace events } // namespace matrix - -#endif // NAME_EVENT_CONTENT_H diff --git a/include/events/PowerLevelsEventContent.h b/include/events/PowerLevelsEventContent.h index bac4a42b..e5762812 100644 --- a/include/events/PowerLevelsEventContent.h +++ b/include/events/PowerLevelsEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef POWER_LEVELS_EVENT_CONTENT_H -#define POWER_LEVELS_EVENT_CONTENT_H +#pragma once #include #include @@ -104,5 +103,3 @@ inline int PowerLevelsEventContent::usersDefaultLevel() const } } // namespace events } // namespace matrix - -#endif // POWER_LEVELS_EVENT_CONTENT_H diff --git a/include/events/RoomEvent.h b/include/events/RoomEvent.h index 9c2e9945..b73d5ce9 100644 --- a/include/events/RoomEvent.h +++ b/include/events/RoomEvent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MATRIX_ROOM_EVENT_H -#define MATRIX_ROOM_EVENT_H +#pragma once #include #include @@ -97,5 +96,3 @@ void RoomEvent::deserialize(const QJsonValue &data) } } // namespace events } // namespace matrix - -#endif // MATRIX_ROOM_EVENT_H diff --git a/include/events/StateEvent.h b/include/events/StateEvent.h index 35d5fa31..2075a996 100644 --- a/include/events/StateEvent.h +++ b/include/events/StateEvent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MATRIX_STATE_EVENT_H -#define MATRIX_STATE_EVENT_H +#pragma once #include @@ -69,5 +68,3 @@ void StateEvent::deserialize(const QJsonValue &data) } } // namespace events } // namespace matrix - -#endif // MATRIX_STATE_EVENT_H diff --git a/include/events/TopicEventContent.h b/include/events/TopicEventContent.h index e3062d0c..460d019e 100644 --- a/include/events/TopicEventContent.h +++ b/include/events/TopicEventContent.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef TOPIC_EVENT_CONTENT_H -#define TOPIC_EVENT_CONTENT_H +#pragma once #include @@ -47,5 +46,3 @@ inline QString TopicEventContent::topic() const } } // namespace events } // namespace matrix - -#endif // TOPIC_EVENT_CONTENT_H diff --git a/include/events/messages/Audio.h b/include/events/messages/Audio.h index c3b5a4ef..3eeb5fc4 100644 --- a/include/events/messages/Audio.h +++ b/include/events/messages/Audio.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MESSAGE_EVENT_AUDIO_H -#define MESSAGE_EVENT_AUDIO_H +#pragma once #include @@ -61,5 +60,3 @@ inline AudioInfo Audio::info() const } // namespace messages } // namespace events } // namespace matrix - -#endif // MESSAGE_EVENT_AUDIO_H diff --git a/include/events/messages/Emote.h b/include/events/messages/Emote.h index 63b2b96b..28118b1a 100644 --- a/include/events/messages/Emote.h +++ b/include/events/messages/Emote.h @@ -1,4 +1,3 @@ - /* * nheko Copyright (C) 2017 Konstantinos Sideris * @@ -16,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MESSAGE_EVENT_EMOTE_H -#define MESSAGE_EVENT_EMOTE_H +#pragma once #include @@ -37,5 +35,3 @@ public: } // namespace messages } // namespace events } // namespace matrix - -#endif // MESSAGE_EVENT_EMOTE_H diff --git a/include/events/messages/File.h b/include/events/messages/File.h index 8fe61615..59e0ec15 100644 --- a/include/events/messages/File.h +++ b/include/events/messages/File.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MESSAGE_EVENT_FILE_H -#define MESSAGE_EVENT_FILE_H +#pragma once #include @@ -72,5 +71,3 @@ inline FileInfo File::info() const } // namespace messages } // namespace events } // namespace matrix - -#endif // MESSAGE_EVENT_FILE_H diff --git a/include/events/messages/Image.h b/include/events/messages/Image.h index 5a329e4d..d73aa5c8 100644 --- a/include/events/messages/Image.h +++ b/include/events/messages/Image.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MESSAGE_EVENT_IMAGE_H -#define MESSAGE_EVENT_IMAGE_H +#pragma once #include @@ -65,5 +64,3 @@ inline ImageInfo Image::info() const } // namespace messages } // namespace events } // namespace matrix - -#endif // MESSAGE_EVENT_IMAGE_H diff --git a/include/events/messages/Location.h b/include/events/messages/Location.h index 7c64cede..c245112b 100644 --- a/include/events/messages/Location.h +++ b/include/events/messages/Location.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MESSAGE_EVENT_LOCATION_H -#define MESSAGE_EVENT_LOCATION_H +#pragma once #include @@ -61,5 +60,3 @@ inline LocationInfo Location::info() const } // namespace messages } // namespace events } // namespace matrix - -#endif // MESSAGE_EVENT_LOCATION_H diff --git a/include/events/messages/Notice.h b/include/events/messages/Notice.h index db94b273..4ea9b11f 100644 --- a/include/events/messages/Notice.h +++ b/include/events/messages/Notice.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MESSAGE_EVENT_NOTICE_H -#define MESSAGE_EVENT_NOTICE_H +#pragma once #include @@ -36,5 +35,3 @@ public: } // namespace messages } // namespace events } // namespace matrix - -#endif // MESSAGE_EVENT_NOTICE_H diff --git a/include/events/messages/Text.h b/include/events/messages/Text.h index f116e78d..e98a4c1b 100644 --- a/include/events/messages/Text.h +++ b/include/events/messages/Text.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MESSAGE_EVENT_TEXT_H -#define MESSAGE_EVENT_TEXT_H +#pragma once #include @@ -36,5 +35,3 @@ public: } // namespace messages } // namespace events } // namespace matrix - -#endif // MESSAGE_EVENT_TEXT_H diff --git a/include/events/messages/Video.h b/include/events/messages/Video.h index bd307cf7..3a373928 100644 --- a/include/events/messages/Video.h +++ b/include/events/messages/Video.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef MESSAGE_EVENT_VIDEO_H -#define MESSAGE_EVENT_VIDEO_H +#pragma once #include @@ -66,5 +65,3 @@ inline VideoInfo Video::info() const } // namespace messages } // namespace events } // namespace matrix - -#endif // MESSAGE_EVENT_VIDEO_H diff --git a/include/ui/Avatar.h b/include/ui/Avatar.h index afbf6aad..b99ee683 100644 --- a/include/ui/Avatar.h +++ b/include/ui/Avatar.h @@ -1,5 +1,4 @@ -#ifndef UI_AVATAR_H -#define UI_AVATAR_H +#pragma once #include #include @@ -47,5 +46,3 @@ private: QPixmap pixmap_; int size_; }; - -#endif // UI_AVATAR_H diff --git a/include/ui/Badge.h b/include/ui/Badge.h index d84dd7ef..b994cfdf 100644 --- a/include/ui/Badge.h +++ b/include/ui/Badge.h @@ -1,5 +1,4 @@ -#ifndef UI_BADGE_H -#define UI_BADGE_H +#pragma once #include #include @@ -62,5 +61,3 @@ private: qreal x_; qreal y_; }; - -#endif // UI_BADGE_H diff --git a/include/ui/CircularProgress.h b/include/ui/CircularProgress.h index bb8156ae..78a32dd8 100644 --- a/include/ui/CircularProgress.h +++ b/include/ui/CircularProgress.h @@ -1,5 +1,4 @@ -#ifndef UI_CIRCULAR_PROGRESS_H -#define UI_CIRCULAR_PROGRESS_H +#pragma once #include #include @@ -110,5 +109,3 @@ inline int CircularProgressDelegate::angle() const { return angle_; } - -#endif // UI_CIRCULAR_PROGRESS_H diff --git a/include/ui/FlatButton.h b/include/ui/FlatButton.h index 6e2eb149..5efdb838 100644 --- a/include/ui/FlatButton.h +++ b/include/ui/FlatButton.h @@ -1,5 +1,4 @@ -#ifndef UI_FLAT_BUTTON_H -#define UI_FLAT_BUTTON_H +#pragma once #include #include @@ -170,5 +169,3 @@ private: bool use_fixed_ripple_radius_; }; - -#endif // UI_FLAT_BUTTON_H diff --git a/include/ui/OverlayModal.h b/include/ui/OverlayModal.h index d90eccea..d6efd29e 100644 --- a/include/ui/OverlayModal.h +++ b/include/ui/OverlayModal.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef UI_OVERLAY_MODAL_H -#define UI_OVERLAY_MODAL_H +#pragma once #include #include @@ -57,5 +56,3 @@ inline void OverlayModal::setColor(QColor color) { color_ = color; } - -#endif // UI_OVERLAY_MODAL_H diff --git a/include/ui/OverlayWidget.h b/include/ui/OverlayWidget.h index 36b42dc9..b9655cf6 100644 --- a/include/ui/OverlayWidget.h +++ b/include/ui/OverlayWidget.h @@ -1,5 +1,4 @@ -#ifndef UI_OVERLAY_WIDGET_H -#define UI_OVERLAY_WIDGET_H +#pragma once #include #include @@ -17,5 +16,3 @@ protected: QRect overlayGeometry() const; }; - -#endif // UI_OVERLAY_WIDGET_H diff --git a/include/ui/RaisedButton.h b/include/ui/RaisedButton.h index 7a46173f..558d15eb 100644 --- a/include/ui/RaisedButton.h +++ b/include/ui/RaisedButton.h @@ -1,5 +1,4 @@ -#ifndef UI_RAISED_BUTTON_H -#define UI_RAISED_BUTTON_H +#pragma once #include #include @@ -27,5 +26,3 @@ private: QState *pressed_state_; QGraphicsDropShadowEffect *effect_; }; - -#endif // UI_RAISED_BUTTON_H diff --git a/include/ui/Ripple.h b/include/ui/Ripple.h index a66a583e..e04e7173 100644 --- a/include/ui/Ripple.h +++ b/include/ui/Ripple.h @@ -1,5 +1,4 @@ -#ifndef UI_RIPPLE_H -#define UI_RIPPLE_H +#pragma once #include #include @@ -132,5 +131,3 @@ inline void Ripple::setDuration(int msecs) radius_anim_->setDuration(msecs); opacity_anim_->setDuration(msecs); } - -#endif // UI_RIPPLE_H diff --git a/include/ui/RippleOverlay.h b/include/ui/RippleOverlay.h index 54398efa..b3fb9a4c 100644 --- a/include/ui/RippleOverlay.h +++ b/include/ui/RippleOverlay.h @@ -1,5 +1,4 @@ -#ifndef UI_RIPPLE_OVERLAY_H -#define UI_RIPPLE_OVERLAY_H +#pragma once #include @@ -54,5 +53,3 @@ inline void RippleOverlay::setClipPath(const QPainterPath &path) clip_path_ = path; update(); } - -#endif // UI_RIPPLE_OVERLAY_H diff --git a/include/ui/TextField.h b/include/ui/TextField.h index 953c8f29..11319f24 100644 --- a/include/ui/TextField.h +++ b/include/ui/TextField.h @@ -1,5 +1,4 @@ -#ifndef UI_TEXT_FIELD_H -#define UI_TEXT_FIELD_H +#pragma once #include #include @@ -166,5 +165,3 @@ inline qreal TextFieldStateMachine::progress() const { return progress_; } - -#endif // UI_TEXT_FIELD_H diff --git a/include/ui/Theme.h b/include/ui/Theme.h index 795425e4..95eb5277 100644 --- a/include/ui/Theme.h +++ b/include/ui/Theme.h @@ -1,5 +1,4 @@ -#ifndef UI_THEME_H -#define UI_THEME_H +#pragma once #include #include @@ -85,5 +84,3 @@ private: QHash colors_; }; - -#endif // UI_THEME_H diff --git a/include/ui/ThemeManager.h b/include/ui/ThemeManager.h index 426d71ec..98ed8193 100644 --- a/include/ui/ThemeManager.h +++ b/include/ui/ThemeManager.h @@ -1,5 +1,4 @@ -#ifndef UI_THEME_MANAGER_H -#define UI_THEME_MANAGER_H +#pragma once #include @@ -29,5 +28,3 @@ inline ThemeManager &ThemeManager::instance() static ThemeManager instance; return instance; } - -#endif // UI_THEME_MANAGER_H