diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-10-28 15:46:39 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-10-28 15:46:39 +0300 |
commit | a17b6dffafb450c48c1c1f5034e85763aa7a6a5e (patch) | |
tree | feb2510c63dfbab6a57ebb96ed2c8a24fc82083e | |
parent | Add scroll-down button (diff) | |
download | nheko-a17b6dffafb450c48c1c1f5034e85763aa7a6a5e.tar.xz |
Clean up headers
Diffstat (limited to '')
71 files changed, 196 insertions, 195 deletions
diff --git a/include/AvatarProvider.h b/include/AvatarProvider.h index 0a37ffb9..a58ef0b7 100644 --- a/include/AvatarProvider.h +++ b/include/AvatarProvider.h @@ -18,12 +18,11 @@ #pragma once #include <QImage> -#include <QObject> #include <QSharedPointer> #include <QUrl> -#include "MatrixClient.h" -#include "TimelineItem.h" +class MatrixClient; +class TimelineItem; class AvatarProvider : public QObject { diff --git a/include/Cache.h b/include/Cache.h index 69d880f5..c16654d0 100644 --- a/include/Cache.h +++ b/include/Cache.h @@ -20,7 +20,7 @@ #include <QDir> #include <lmdb++.h> -#include "RoomState.h" +class RoomState; class Cache { diff --git a/include/ChatPage.h b/include/ChatPage.h index bac83ece..d3790f78 100644 --- a/include/ChatPage.h +++ b/include/ChatPage.h @@ -17,23 +17,27 @@ #pragma once +#include <QHBoxLayout> +#include <QMap> #include <QPixmap> #include <QTimer> #include <QWidget> -#include "Cache.h" -#include "MatrixClient.h" -#include "QuickSwitcher.h" -#include "RoomList.h" -#include "RoomSettings.h" -#include "RoomState.h" -#include "SideBarActions.h" -#include "Splitter.h" -#include "TextInputWidget.h" -#include "TimelineViewManager.h" -#include "TopRoomBar.h" -#include "TypingDisplay.h" -#include "UserInfoWidget.h" +class Cache; +class MatrixClient; +class OverlayModal; +class QuickSwitcher; +class RoomList; +class RoomSettings; +class RoomState; +class SideBarActions; +class Splitter; +class SyncResponse; +class TextInputWidget; +class TimelineViewManager; +class TopRoomBar; +class TypingDisplay; +class UserInfoWidget; constexpr int CONSENSUS_TIMEOUT = 1000; constexpr int SHOW_CONTENT_TIMEOUT = 3000; diff --git a/include/Deserializable.h b/include/Deserializable.h index 0d0b2882..0b97ce29 100644 --- a/include/Deserializable.h +++ b/include/Deserializable.h @@ -21,7 +21,6 @@ #include <QJsonDocument> #include <QJsonObject> -#include <QJsonValue> class DeserializationException : public std::exception { diff --git a/include/EmojiCategory.h b/include/EmojiCategory.h index 154ad8f4..06099f3d 100644 --- a/include/EmojiCategory.h +++ b/include/EmojiCategory.h @@ -17,15 +17,14 @@ #pragma once -#include <QHBoxLayout> #include <QLabel> +#include <QLayout> #include <QListView> #include <QStandardItemModel> -#include <QVBoxLayout> -#include <QWidget> #include "EmojiItemDelegate.h" -#include "EmojiProvider.h" + +class EmojiProvider; class EmojiCategory : public QWidget { diff --git a/include/EmojiPanel.h b/include/EmojiPanel.h index 360e7006..211d916b 100644 --- a/include/EmojiPanel.h +++ b/include/EmojiPanel.h @@ -20,11 +20,11 @@ #include <QGraphicsOpacityEffect> #include <QPropertyAnimation> #include <QScrollArea> -#include <QWidget> -#include "EmojiCategory.h" #include "EmojiProvider.h" +class EmojiCategory; + class EmojiPanel : public QWidget { Q_OBJECT diff --git a/include/EmojiPickButton.h b/include/EmojiPickButton.h index d4226165..8ef9be9e 100644 --- a/include/EmojiPickButton.h +++ b/include/EmojiPickButton.h @@ -20,9 +20,10 @@ #include <QEvent> #include <QWidget> -#include "EmojiPanel.h" #include "FlatButton.h" +class EmojiPanel; + class EmojiPickButton : public FlatButton { Q_OBJECT diff --git a/include/EmojiProvider.h b/include/EmojiProvider.h index 3f91f2b3..847157fd 100644 --- a/include/EmojiProvider.h +++ b/include/EmojiProvider.h @@ -17,9 +17,7 @@ #pragma once -#include <QFile> #include <QList> -#include <QMap> struct Emoji { diff --git a/include/ImageItem.h b/include/ImageItem.h index 20e0772d..c4f6998a 100644 --- a/include/ImageItem.h +++ b/include/ImageItem.h @@ -24,6 +24,7 @@ #include "Image.h" #include "MatrixClient.h" +#include "MessageEvent.h" namespace events = matrix::events; namespace msgs = matrix::events::messages; diff --git a/include/InputValidator.h b/include/InputValidator.h index 4f77033e..da1c121e 100644 --- a/include/InputValidator.h +++ b/include/InputValidator.h @@ -17,7 +17,6 @@ #pragma once -#include <QRegExp> #include <QRegExpValidator> class InputValidator diff --git a/include/JoinRoomDialog.h b/include/JoinRoomDialog.h index 6c3fbdcf..84184733 100644 --- a/include/JoinRoomDialog.h +++ b/include/JoinRoomDialog.h @@ -3,7 +3,7 @@ #include <QFrame> #include <QLineEdit> -#include "FlatButton.h" +class FlatButton; class JoinRoomDialog : public QFrame { diff --git a/include/LeaveRoomDialog.h b/include/LeaveRoomDialog.h index 1639a578..231556dc 100644 --- a/include/LeaveRoomDialog.h +++ b/include/LeaveRoomDialog.h @@ -2,7 +2,7 @@ #include <QFrame> -#include "FlatButton.h" +class FlatButton; class LeaveRoomDialog : public QFrame { diff --git a/include/LoginPage.h b/include/LoginPage.h index 88cffaf3..d5f46f76 100644 --- a/include/LoginPage.h +++ b/include/LoginPage.h @@ -17,18 +17,17 @@ #pragma once -#include <QHBoxLayout> #include <QLabel> +#include <QLayout> #include <QSharedPointer> -#include <QVBoxLayout> #include <QWidget> -#include "FlatButton.h" -#include "LoadingIndicator.h" -#include "MatrixClient.h" -#include "OverlayModal.h" -#include "RaisedButton.h" -#include "TextField.h" +class FlatButton; +class LoadingIndicator; +class MatrixClient; +class OverlayModal; +class RaisedButton; +class TextField; class LoginPage : public QWidget { diff --git a/include/LogoutDialog.h b/include/LogoutDialog.h index 44dab17a..e081986e 100644 --- a/include/LogoutDialog.h +++ b/include/LogoutDialog.h @@ -19,7 +19,7 @@ #include <QFrame> -#include "FlatButton.h" +class FlatButton; class LogoutDialog : public QFrame { diff --git a/include/MainWindow.h b/include/MainWindow.h index 95935c46..f56592c2 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -19,16 +19,18 @@ #include <QMainWindow> #include <QSharedPointer> - -#include "ChatPage.h" -#include "LoadingIndicator.h" -#include "LoginPage.h" -#include "MatrixClient.h" -#include "OverlayModal.h" -#include "RegisterPage.h" -#include "SnackBar.h" -#include "TrayIcon.h" -#include "WelcomePage.h" +#include <QStackedWidget> +#include <QSystemTrayIcon> + +class ChatPage; +class LoadingIndicator; +class LoginPage; +class MatrixClient; +class OverlayModal; +class RegisterPage; +class SnackBar; +class TrayIcon; +class WelcomePage; class MainWindow : public QMainWindow { diff --git a/include/MatrixClient.h b/include/MatrixClient.h index 7a415e82..2e45e397 100644 --- a/include/MatrixClient.h +++ b/include/MatrixClient.h @@ -17,12 +17,13 @@ #pragma once -#include <QtNetwork/QNetworkAccessManager> +#include <QNetworkAccessManager> #include "MessageEvent.h" -#include "Profile.h" -#include "RoomMessages.h" -#include "Sync.h" + +class SyncResponse; +class Profile; +class RoomMessages; /* * MatrixClient provides the high level API to communicate with diff --git a/include/Profile.h b/include/Profile.h index e2868e62..d640db02 100644 --- a/include/Profile.h +++ b/include/Profile.h @@ -20,7 +20,7 @@ #include <QJsonDocument> #include <QUrl> -#include "Deserializable.h" +class Deserializable; class ProfileResponse : public Deserializable { diff --git a/include/Register.h b/include/Register.h index 83f538b9..fc4a49e6 100644 --- a/include/Register.h +++ b/include/Register.h @@ -19,7 +19,7 @@ #include <QJsonDocument> -#include "Deserializable.h" +class Deserializable; class RegisterRequest { diff --git a/include/RegisterPage.h b/include/RegisterPage.h index a42cbedd..e0a3b6d8 100644 --- a/include/RegisterPage.h +++ b/include/RegisterPage.h @@ -17,17 +17,15 @@ #pragma once -#include <QHBoxLayout> #include <QLabel> +#include <QLayout> #include <QSharedPointer> -#include <QVBoxLayout> -#include <QWidget> -#include "Avatar.h" -#include "FlatButton.h" -#include "MatrixClient.h" -#include "RaisedButton.h" -#include "TextField.h" +class Avatar; +class FlatButton; +class MatrixClient; +class RaisedButton; +class TextField; class RegisterPage : public QWidget { diff --git a/include/RoomInfoListItem.h b/include/RoomInfoListItem.h index 8975af79..a137b37f 100644 --- a/include/RoomInfoListItem.h +++ b/include/RoomInfoListItem.h @@ -21,11 +21,12 @@ #include <QSharedPointer> #include <QWidget> -#include "Menu.h" -#include "RippleOverlay.h" -#include "RoomSettings.h" #include "RoomState.h" +class Menu; +class RippleOverlay; +class RoomSettings; + struct DescInfo { QString username; diff --git a/include/RoomList.h b/include/RoomList.h index d7b201f1..df668ac6 100644 --- a/include/RoomList.h +++ b/include/RoomList.h @@ -17,19 +17,22 @@ #pragma once +#include <QMap> #include <QPushButton> #include <QScrollArea> #include <QSharedPointer> #include <QVBoxLayout> #include <QWidget> -#include "JoinRoomDialog.h" -#include "LeaveRoomDialog.h" -#include "MatrixClient.h" -#include "OverlayModal.h" -#include "RoomInfoListItem.h" -#include "RoomState.h" -#include "Sync.h" +class JoinRoomDialog; +class LeaveRoomDialog; +class MatrixClient; +class OverlayModal; +class RoomInfoListItem; +class RoomSettings; +class RoomState; +class Sync; +struct DescInfo; class RoomList : public QWidget { diff --git a/include/SideBarActions.h b/include/SideBarActions.h index 60975a03..7b550578 100644 --- a/include/SideBarActions.h +++ b/include/SideBarActions.h @@ -1,7 +1,10 @@ +#pragma once + #include <QHBoxLayout> #include <QResizeEvent> +#include <QWidget> -#include <FlatButton.h> +#include "FlatButton.h" class SideBarActions : public QWidget { diff --git a/include/Sync.h b/include/Sync.h index ae61015e..d59a57dc 100644 --- a/include/Sync.h +++ b/include/Sync.h @@ -18,9 +18,7 @@ #pragma once #include <QJsonArray> -#include <QJsonDocument> #include <QMap> -#include <QString> #include "Deserializable.h" diff --git a/include/TimelineItem.h b/include/TimelineItem.h index ef021cfe..1adf574c 100644 --- a/include/TimelineItem.h +++ b/include/TimelineItem.h @@ -19,12 +19,7 @@ #include <QHBoxLayout> #include <QLabel> -#include <QWidget> -#include "ImageItem.h" -#include "Sync.h" - -#include "Avatar.h" #include "Emote.h" #include "Image.h" #include "MessageEvent.h" @@ -32,6 +27,9 @@ #include "RoomInfoListItem.h" #include "Text.h" +class ImageItem; +class Avatar; + namespace events = matrix::events; namespace msgs = matrix::events::messages; diff --git a/include/TimelineView.h b/include/TimelineView.h index 83247948..7e44db46 100644 --- a/include/TimelineView.h +++ b/include/TimelineView.h @@ -17,24 +17,23 @@ #pragma once -#include <QHBoxLayout> +#include <QLayout> #include <QList> #include <QScrollArea> -#include <QVBoxLayout> -#include <QWidget> - -#include "ScrollBar.h" -#include "Sync.h" -#include "TimelineItem.h" #include "Emote.h" #include "Image.h" #include "MessageEvent.h" #include "Notice.h" -#include "RoomInfoListItem.h" #include "Text.h" class FloatingButton; +class MatrixClient; +class RoomMessages; +class ScrollBar; +class Timeline; +class TimelineItem; +struct DescInfo; namespace msgs = matrix::events::messages; namespace events = matrix::events; diff --git a/include/TimelineViewManager.h b/include/TimelineViewManager.h index 91fda996..8ff49f20 100644 --- a/include/TimelineViewManager.h +++ b/include/TimelineViewManager.h @@ -17,16 +17,16 @@ #pragma once -#include <QDebug> +#include <QMap> #include <QSharedPointer> #include <QStackedWidget> -#include <QWidget> -#include "MatrixClient.h" -#include "MessageEvent.h" -#include "RoomInfoListItem.h" -#include "Sync.h" -#include "TimelineView.h" +class JoinedRoom; +class MatrixClient; +class RoomInfoListItem; +class Rooms; +class TimelineView; +struct DescInfo; class TimelineViewManager : public QStackedWidget { diff --git a/include/TopRoomBar.h b/include/TopRoomBar.h index eb941b3b..f1e93d9d 100644 --- a/include/TopRoomBar.h +++ b/include/TopRoomBar.h @@ -18,22 +18,21 @@ #pragma once #include <QAction> -#include <QDebug> #include <QIcon> #include <QImage> #include <QLabel> +#include <QMenu> #include <QPaintEvent> #include <QSharedPointer> #include <QVBoxLayout> -#include <QWidget> - -#include "Avatar.h" -#include "FlatButton.h" -#include "Label.h" -#include "LeaveRoomDialog.h" -#include "Menu.h" -#include "OverlayModal.h" -#include "RoomSettings.h" + +class Avatar; +class FlatButton; +class Label; +class LeaveRoomDialog; +class Menu; +class OverlayModal; +class RoomSettings; static const QString URL_HTML = "<a href=\"\\1\" style=\"color: #333333\">\\1</a>"; static const QRegExp URL_REGEX("((?:https?|ftp)://\\S+)"); diff --git a/include/TrayIcon.h b/include/TrayIcon.h index 6073ea69..a3536cc3 100644 --- a/include/TrayIcon.h +++ b/include/TrayIcon.h @@ -20,7 +20,6 @@ #include <QAction> #include <QIcon> #include <QIconEngine> -#include <QMenu> #include <QPainter> #include <QRect> #include <QSystemTrayIcon> diff --git a/include/UserInfoWidget.h b/include/UserInfoWidget.h index b2c7b876..111f5808 100644 --- a/include/UserInfoWidget.h +++ b/include/UserInfoWidget.h @@ -17,15 +17,13 @@ #pragma once -#include <QtWidgets/QHBoxLayout> -#include <QtWidgets/QLabel> -#include <QtWidgets/QVBoxLayout> -#include <QtWidgets/QWidget> - -#include "Avatar.h" -#include "FlatButton.h" -#include "LogoutDialog.h" -#include "OverlayModal.h" +#include <QLabel> +#include <QLayout> + +class Avatar; +class FlatButton; +class LogoutDialog; +class OverlayModal; class UserInfoWidget : public QWidget { diff --git a/include/Versions.h b/include/Versions.h index 31d8af82..a603e391 100644 --- a/include/Versions.h +++ b/include/Versions.h @@ -20,7 +20,7 @@ #include <QJsonDocument> #include <QVector> -#include "Deserializable.h" +class Deserializable; class VersionsResponse : public Deserializable { diff --git a/include/WelcomePage.h b/include/WelcomePage.h index 7cd83fd1..73b612a8 100644 --- a/include/WelcomePage.h +++ b/include/WelcomePage.h @@ -17,7 +17,9 @@ #pragma once -#include "RaisedButton.h" +#include <QWidget> + +class RaisedButton; class WelcomePage : public QWidget { diff --git a/include/ui/FlatButton.h b/include/ui/FlatButton.h index 816563e3..9c2bf425 100644 --- a/include/ui/FlatButton.h +++ b/include/ui/FlatButton.h @@ -5,9 +5,9 @@ #include <QPushButton> #include <QStateMachine> -#include "RippleOverlay.h" #include "Theme.h" +class RippleOverlay; class FlatButton; class FlatButtonStateMachine : public QStateMachine diff --git a/src/AvatarProvider.cc b/src/AvatarProvider.cc index c4e5d19e..ab938cb1 100644 --- a/src/AvatarProvider.cc +++ b/src/AvatarProvider.cc @@ -16,6 +16,8 @@ */ #include "AvatarProvider.h" +#include "MatrixClient.h" +#include "TimelineItem.h" QSharedPointer<MatrixClient> AvatarProvider::client_; diff --git a/src/Cache.cc b/src/Cache.cc index befb3a0a..de2c7944 100644 --- a/src/Cache.cc +++ b/src/Cache.cc @@ -18,12 +18,12 @@ #include <stdexcept> #include <QDebug> -#include <QDir> #include <QFile> #include <QStandardPaths> #include "Cache.h" #include "MemberEventContent.h" +#include "RoomState.h" namespace events = matrix::events; diff --git a/src/ChatPage.cc b/src/ChatPage.cc index d087c3f3..150f6007 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc @@ -21,16 +21,26 @@ #include <QtConcurrent> #include "AvatarProvider.h" +#include "Cache.h" #include "ChatPage.h" #include "MainWindow.h" +#include "MatrixClient.h" +#include "OverlayModal.h" +#include "QuickSwitcher.h" +#include "RoomList.h" +#include "RoomSettings.h" +#include "RoomState.h" +#include "SideBarActions.h" #include "Splitter.h" +#include "StateEvent.h" #include "Sync.h" +#include "TextInputWidget.h" #include "Theme.h" #include "TimelineViewManager.h" +#include "TopRoomBar.h" +#include "TypingDisplay.h" #include "UserInfoWidget.h" -#include "StateEvent.h" - constexpr int MAX_INITIAL_SYNC_FAILURES = 5; constexpr int SYNC_RETRY_TIMEOUT = 10000; diff --git a/src/Deserializable.cc b/src/Deserializable.cc index 6033f898..8bdbfc2c 100644 --- a/src/Deserializable.cc +++ b/src/Deserializable.cc @@ -15,10 +15,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QJsonDocument> -#include <QJsonObject> -#include <QJsonValue> - #include "Deserializable.h" DeserializationException::DeserializationException(const std::string &msg) diff --git a/src/EmojiCategory.cc b/src/EmojiCategory.cc index ea32ea9c..8546b807 100644 --- a/src/EmojiCategory.cc +++ b/src/EmojiCategory.cc @@ -15,7 +15,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QDebug> #include <QScrollBar> #include "Config.h" diff --git a/src/EmojiPanel.cc b/src/EmojiPanel.cc index 16299ace..71e2526c 100644 --- a/src/EmojiPanel.cc +++ b/src/EmojiPanel.cc @@ -16,11 +16,9 @@ */ #include <QPushButton> -#include <QScrollArea> #include <QScrollBar> #include <QVBoxLayout> -#include "Avatar.h" #include "DropShadow.h" #include "EmojiCategory.h" #include "EmojiPanel.h" diff --git a/src/EmojiPickButton.cc b/src/EmojiPickButton.cc index 06d97d4c..17716f6f 100644 --- a/src/EmojiPickButton.cc +++ b/src/EmojiPickButton.cc @@ -15,8 +15,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QDebug> - +#include "EmojiPanel.h" #include "EmojiPickButton.h" EmojiPickButton::EmojiPickButton(QWidget *parent) diff --git a/src/EmojiProvider.cc b/src/EmojiProvider.cc index 11cdffcb..ed380ae0 100644 --- a/src/EmojiProvider.cc +++ b/src/EmojiProvider.cc @@ -16,11 +16,6 @@ */ #include <QByteArray> -#include <QDebug> -#include <QFile> -#include <QJsonArray> -#include <QJsonDocument> -#include <QJsonObject> #include "EmojiProvider.h" diff --git a/src/ImageItem.cc b/src/ImageItem.cc index 5e95f8b2..39fa630f 100644 --- a/src/ImageItem.cc +++ b/src/ImageItem.cc @@ -19,7 +19,6 @@ #include <QDebug> #include <QDesktopServices> #include <QFileInfo> -#include <QImage> #include <QPainter> #include <QPixmap> diff --git a/src/ImageOverlayDialog.cc b/src/ImageOverlayDialog.cc index 56b5707c..8d6db45e 100644 --- a/src/ImageOverlayDialog.cc +++ b/src/ImageOverlayDialog.cc @@ -16,11 +16,8 @@ */ #include <QApplication> -#include <QDebug> #include <QDesktopWidget> #include <QPainter> -#include <QScreen> -#include <QTimer> #include "ImageOverlayDialog.h" diff --git a/src/JoinRoomDialog.cc b/src/JoinRoomDialog.cc index c3ee289e..d071876a 100644 --- a/src/JoinRoomDialog.cc +++ b/src/JoinRoomDialog.cc @@ -2,6 +2,7 @@ #include <QVBoxLayout> #include "Config.h" +#include "FlatButton.h" #include "JoinRoomDialog.h" #include "Theme.h" diff --git a/src/LeaveRoomDialog.cc b/src/LeaveRoomDialog.cc index f7669f0d..cd4a3260 100644 --- a/src/LeaveRoomDialog.cc +++ b/src/LeaveRoomDialog.cc @@ -2,6 +2,7 @@ #include <QVBoxLayout> #include "Config.h" +#include "FlatButton.h" #include "LeaveRoomDialog.h" #include "Theme.h" diff --git a/src/Login.cc b/src/Login.cc index 16c6f172..69338f2c 100644 --- a/src/Login.cc +++ b/src/Login.cc @@ -15,10 +15,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QJsonDocument> -#include <QJsonObject> -#include <QJsonValue> - #include "Deserializable.h" #include "Login.h" diff --git a/src/LoginPage.cc b/src/LoginPage.cc index bbe2a134..c1ba352c 100644 --- a/src/LoginPage.cc +++ b/src/LoginPage.cc @@ -15,11 +15,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QDebug> - #include "Config.h" +#include "FlatButton.h" #include "InputValidator.h" +#include "LoadingIndicator.h" #include "LoginPage.h" +#include "MatrixClient.h" +#include "OverlayModal.h" +#include "RaisedButton.h" +#include "TextField.h" LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent) : QWidget(parent) diff --git a/src/LogoutDialog.cc b/src/LogoutDialog.cc index 768efcd3..7f2cdbd3 100644 --- a/src/LogoutDialog.cc +++ b/src/LogoutDialog.cc @@ -19,6 +19,7 @@ #include <QVBoxLayout> #include "Config.h" +#include "FlatButton.h" #include "LogoutDialog.h" #include "Theme.h" diff --git a/src/MainWindow.cc b/src/MainWindow.cc index b6033eaf..92388ae4 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc @@ -15,15 +15,23 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "MainWindow.h" -#include "Config.h" - #include <QApplication> #include <QLayout> #include <QNetworkReply> #include <QSettings> #include <QShortcut> -#include <QSystemTrayIcon> + +#include "ChatPage.h" +#include "Config.h" +#include "LoadingIndicator.h" +#include "LoginPage.h" +#include "MainWindow.h" +#include "MatrixClient.h" +#include "OverlayModal.h" +#include "RegisterPage.h" +#include "SnackBar.h" +#include "TrayIcon.h" +#include "WelcomePage.h" MainWindow *MainWindow::instance_ = nullptr; diff --git a/src/MatrixClient.cc b/src/MatrixClient.cc index afd99995..b1854dd8 100644 --- a/src/MatrixClient.cc +++ b/src/MatrixClient.cc @@ -30,8 +30,11 @@ #include "Login.h" #include "MatrixClient.h" +#include "MessageEvent.h" #include "Profile.h" #include "Register.h" +#include "RoomMessages.h" +#include "Sync.h" #include "Versions.h" MatrixClient::MatrixClient(QString server, QObject *parent) diff --git a/src/Profile.cc b/src/Profile.cc index dcd9c7a1..38795e49 100644 --- a/src/Profile.cc +++ b/src/Profile.cc @@ -15,10 +15,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QJsonObject> -#include <QJsonValue> -#include <QUrl> - #include "Deserializable.h" #include "Profile.h" diff --git a/src/QuickSwitcher.cc b/src/QuickSwitcher.cc index 5b459eaf..542eebd9 100644 --- a/src/QuickSwitcher.cc +++ b/src/QuickSwitcher.cc @@ -16,7 +16,6 @@ */ #include <QCompleter> -#include <QDebug> #include <QStringListModel> #include <QTimer> diff --git a/src/Register.cc b/src/Register.cc index db3ce4f9..0fe2ddce 100644 --- a/src/Register.cc +++ b/src/Register.cc @@ -15,10 +15,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QJsonDocument> -#include <QJsonObject> -#include <QJsonValue> - #include "Deserializable.h" #include "Register.h" diff --git a/src/RegisterPage.cc b/src/RegisterPage.cc index bcd02be0..d8186f65 100644 --- a/src/RegisterPage.cc +++ b/src/RegisterPage.cc @@ -15,12 +15,14 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QDebug> -#include <QToolTip> - +#include "Avatar.h" #include "Config.h" +#include "FlatButton.h" #include "InputValidator.h" +#include "MatrixClient.h" +#include "RaisedButton.h" #include "RegisterPage.h" +#include "TextField.h" RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent) : QWidget(parent) diff --git a/src/RoomInfoListItem.cc b/src/RoomInfoListItem.cc index 588ee5c8..857189b5 100644 --- a/src/RoomInfoListItem.cc +++ b/src/RoomInfoListItem.cc @@ -15,14 +15,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QDebug> #include <QMouseEvent> #include <QPainter> #include "Config.h" +#include "Menu.h" #include "Ripple.h" +#include "RippleOverlay.h" #include "RoomInfoListItem.h" -#include "RoomState.h" +#include "RoomSettings.h" #include "Theme.h" RoomInfoListItem::RoomInfoListItem(QSharedPointer<RoomSettings> settings, diff --git a/src/RoomList.cc b/src/RoomList.cc index 90d8b83c..73e85ea8 100644 --- a/src/RoomList.cc +++ b/src/RoomList.cc @@ -16,12 +16,16 @@ */ #include <QDebug> -#include <QJsonArray> -#include <QRegularExpression> +#include "JoinRoomDialog.h" +#include "LeaveRoomDialog.h" #include "MainWindow.h" +#include "MatrixClient.h" +#include "OverlayModal.h" #include "RoomInfoListItem.h" #include "RoomList.h" +#include "RoomSettings.h" +#include "RoomState.h" #include "Sync.h" RoomList::RoomList(QSharedPointer<MatrixClient> client, QWidget *parent) diff --git a/src/RoomState.cc b/src/RoomState.cc index de0ed6ea..8db9b2bc 100644 --- a/src/RoomState.cc +++ b/src/RoomState.cc @@ -15,7 +15,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QDebug> #include <QJsonArray> #include <QSettings> diff --git a/src/SideBarActions.cc b/src/SideBarActions.cc index d4874c6a..1484bd00 100644 --- a/src/SideBarActions.cc +++ b/src/SideBarActions.cc @@ -1,9 +1,8 @@ -#include <QDebug> #include <QIcon> #include "Config.h" +#include "SideBarActions.h" #include "Theme.h" -#include <SideBarActions.h> SideBarActions::SideBarActions(QWidget *parent) : QWidget{ parent } diff --git a/src/Sync.cc b/src/Sync.cc index 39d84acb..965f7c3d 100644 --- a/src/Sync.cc +++ b/src/Sync.cc @@ -16,12 +16,7 @@ */ #include <QDebug> -#include <QJsonArray> -#include <QJsonDocument> -#include <QJsonObject> -#include <QJsonValue> -#include "Deserializable.h" #include "Sync.h" void diff --git a/src/TimelineItem.cc b/src/TimelineItem.cc index 28cabc12..ba9e54bd 100644 --- a/src/TimelineItem.cc +++ b/src/TimelineItem.cc @@ -16,14 +16,16 @@ */ #include <QDateTime> -#include <QDebug> #include <QFontDatabase> #include <QRegExp> +#include <QSettings> #include <QTextEdit> +#include "Avatar.h" #include "AvatarProvider.h" #include "Config.h" #include "ImageItem.h" +#include "Sync.h" #include "TimelineItem.h" #include "TimelineViewManager.h" diff --git a/src/TimelineView.cc b/src/TimelineView.cc index 13209062..ee98fe72 100644 --- a/src/TimelineView.cc +++ b/src/TimelineView.cc @@ -17,21 +17,16 @@ #include <QApplication> #include <QDebug> -#include <QJsonArray> -#include <QScrollBar> #include <QSettings> -#include <QtWidgets/QLabel> -#include <QtWidgets/QSpacerItem> - -#include "Event.h" -#include "MessageEvent.h" -#include "MessageEventContent.h" +#include <QTimer> #include "FloatingButton.h" #include "ImageItem.h" +#include "RoomMessages.h" +#include "ScrollBar.h" +#include "Sync.h" #include "TimelineItem.h" #include "TimelineView.h" -#include "TimelineViewManager.h" namespace events = matrix::events; namespace msgs = matrix::events::messages; diff --git a/src/TimelineViewManager.cc b/src/TimelineViewManager.cc index 9f8137fc..44b626ed 100644 --- a/src/TimelineViewManager.cc +++ b/src/TimelineViewManager.cc @@ -21,9 +21,9 @@ #include <QDebug> #include <QFileInfo> #include <QSettings> -#include <QStackedWidget> -#include <QWidget> +#include "MatrixClient.h" +#include "Sync.h" #include "TimelineView.h" #include "TimelineViewManager.h" diff --git a/src/TopRoomBar.cc b/src/TopRoomBar.cc index 72aef92a..0361bd47 100644 --- a/src/TopRoomBar.cc +++ b/src/TopRoomBar.cc @@ -17,8 +17,15 @@ #include <QStyleOption> +#include "Avatar.h" #include "Config.h" +#include "FlatButton.h" +#include "Label.h" +#include "LeaveRoomDialog.h" #include "MainWindow.h" +#include "Menu.h" +#include "OverlayModal.h" +#include "RoomSettings.h" #include "TopRoomBar.h" TopRoomBar::TopRoomBar(QWidget *parent) diff --git a/src/TrayIcon.cc b/src/TrayIcon.cc index 1360cc4e..ad644ed9 100644 --- a/src/TrayIcon.cc +++ b/src/TrayIcon.cc @@ -17,6 +17,7 @@ #include <QApplication> #include <QList> +#include <QMenu> #include <QTimer> #include "TrayIcon.h" diff --git a/src/TypingDisplay.cc b/src/TypingDisplay.cc index 7792d3e4..e3eb9db9 100644 --- a/src/TypingDisplay.cc +++ b/src/TypingDisplay.cc @@ -1,4 +1,3 @@ -#include <QDebug> #include <QPainter> #include <QPoint> diff --git a/src/UserInfoWidget.cc b/src/UserInfoWidget.cc index 04cfec74..1fadc8e7 100644 --- a/src/UserInfoWidget.cc +++ b/src/UserInfoWidget.cc @@ -15,12 +15,14 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QDebug> #include <QTimer> +#include "Avatar.h" #include "Config.h" #include "FlatButton.h" +#include "LogoutDialog.h" #include "MainWindow.h" +#include "OverlayModal.h" #include "UserInfoWidget.h" UserInfoWidget::UserInfoWidget(QWidget *parent) diff --git a/src/Versions.cc b/src/Versions.cc index 8d0e2e9c..9de1aafe 100644 --- a/src/Versions.cc +++ b/src/Versions.cc @@ -16,9 +16,6 @@ */ #include <QJsonArray> -#include <QJsonDocument> -#include <QJsonObject> -#include <QJsonValue> #include <QRegExp> #include "Deserializable.h" diff --git a/src/WelcomePage.cc b/src/WelcomePage.cc index 1fc0c19b..f361ca05 100644 --- a/src/WelcomePage.cc +++ b/src/WelcomePage.cc @@ -19,6 +19,7 @@ #include <QLayout> #include "Config.h" +#include "RaisedButton.h" #include "WelcomePage.h" WelcomePage::WelcomePage(QWidget *parent) diff --git a/src/main.cc b/src/main.cc index fa89cc60..2d059788 100644 --- a/src/main.cc +++ b/src/main.cc @@ -19,6 +19,7 @@ #include <QDesktopWidget> #include <QFontDatabase> #include <QLibraryInfo> +#include <QSettings> #include <QTranslator> #include "MainWindow.h" diff --git a/src/ui/Avatar.cc b/src/ui/Avatar.cc index c2ee629b..e3987e7a 100644 --- a/src/ui/Avatar.cc +++ b/src/ui/Avatar.cc @@ -1,6 +1,4 @@ -#include <QIcon> #include <QPainter> -#include <QWidget> #include "Avatar.h" diff --git a/src/ui/LoadingIndicator.cc b/src/ui/LoadingIndicator.cc index 0fafaf23..71312d32 100644 --- a/src/ui/LoadingIndicator.cc +++ b/src/ui/LoadingIndicator.cc @@ -1,6 +1,5 @@ #include "LoadingIndicator.h" -#include <QDebug> #include <QPoint> #include <QtGlobal> diff --git a/src/ui/OverlayModal.cc b/src/ui/OverlayModal.cc index 1da009d4..05bd7d03 100644 --- a/src/ui/OverlayModal.cc +++ b/src/ui/OverlayModal.cc @@ -15,7 +15,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QDebug> #include <QPainter> #include <QVBoxLayout> |