From: Manuel Nickschas Date: Fri, 30 Aug 2019 18:28:10 +0000 (+0200) Subject: qa: Replace Qt module includes by class ones X-Git-Tag: test-travis-01~28 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=8961f348947fc55cc4bc769563684af3f2ea7ccc qa: Replace Qt module includes by class ones Including whole Qt modules is less efficient than including only the classes that are needed. Remove module includes and add class ones as needed. --- diff --git a/src/common/ignorelistmanager.cpp b/src/common/ignorelistmanager.cpp index 077189d1..24a26eca 100644 --- a/src/common/ignorelistmanager.cpp +++ b/src/common/ignorelistmanager.cpp @@ -22,7 +22,6 @@ #include #include -#include IgnoreListManager& IgnoreListManager::operator=(const IgnoreListManager& other) { diff --git a/src/core/abstractsqlstorage.cpp b/src/core/abstractsqlstorage.cpp index cf9cff5d..bc56ef27 100644 --- a/src/core/abstractsqlstorage.cpp +++ b/src/core/abstractsqlstorage.cpp @@ -20,11 +20,14 @@ #include "abstractsqlstorage.h" +#include +#include #include #include #include #include #include +#include #include "quassel.h" diff --git a/src/core/abstractsqlstorage.h b/src/core/abstractsqlstorage.h index d3fb7929..a0bdd23c 100644 --- a/src/core/abstractsqlstorage.h +++ b/src/core/abstractsqlstorage.h @@ -22,13 +22,16 @@ #include -#include +#include +#include #include #include #include #include "storage.h" +class QThread; + class AbstractSqlMigrationReader; class AbstractSqlMigrationWriter; diff --git a/src/core/coreauthhandler.cpp b/src/core/coreauthhandler.cpp index ad46352b..ef24592f 100644 --- a/src/core/coreauthhandler.cpp +++ b/src/core/coreauthhandler.cpp @@ -20,6 +20,8 @@ #include "coreauthhandler.h" +#include + #ifdef HAVE_SSL # include #endif diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 45443975..8506dea2 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -22,6 +22,7 @@ #include #include +#include #include "core.h" #include "coreidentity.h" diff --git a/src/core/postgresqlstorage.cpp b/src/core/postgresqlstorage.cpp index 40ff80cb..ee0bf71e 100644 --- a/src/core/postgresqlstorage.cpp +++ b/src/core/postgresqlstorage.cpp @@ -20,7 +20,10 @@ #include "postgresqlstorage.h" -#include +#include +#include +#include +#include #include "network.h" #include "quassel.h" diff --git a/src/core/sqlitestorage.cpp b/src/core/sqlitestorage.cpp index f56f914e..a456d813 100644 --- a/src/core/sqlitestorage.cpp +++ b/src/core/sqlitestorage.cpp @@ -20,9 +20,10 @@ #include "sqlitestorage.h" -#include - +#include +#include #include +#include #include "network.h" #include "quassel.h" diff --git a/src/core/sqlitestorage.h b/src/core/sqlitestorage.h index 31f18d3e..618d5dd0 100644 --- a/src/core/sqlitestorage.h +++ b/src/core/sqlitestorage.h @@ -20,6 +20,9 @@ #pragma once +#include + +#include #include #include "abstractsqlstorage.h" diff --git a/src/core/storage.h b/src/core/storage.h index b28a99ff..c14ba20b 100644 --- a/src/core/storage.h +++ b/src/core/storage.h @@ -18,10 +18,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef STORAGE_H -#define STORAGE_H +#pragma once -#include +#include +#include +#include +#include +#include +#include +#include #include "coreidentity.h" #include "message.h" @@ -572,5 +577,3 @@ private: bool checkHashedPasswordSha2_512(const QString& password, const QString& hashedPassword); QString sha2_512(const QString& input); }; - -#endif diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp index 22dd9a70..80b0d565 100644 --- a/src/qtui/chatline.cpp +++ b/src/qtui/chatline.cpp @@ -20,10 +20,20 @@ #include "chatline.h" +#include #include #include +#include +#include #include -#include +#include +#include + +class QAbstractItemModel; +class QGraphicsSceneMouseEvent; +class QGraphicsSceneHoverEvent; +class QPainter; +class QStyleOptionGraphicsItem; #include "bufferinfo.h" #include "buffersyncer.h" @@ -47,9 +57,8 @@ ChatLine::ChatLine(int row, const QPointF& contentsPos, QGraphicsItem* parent) : QGraphicsItem(parent) - , _row(row) - , // needs to be set before the items - _model(model) + , _row(row) // needs to be set before the items + , _model(model) , _contentsItem(contentsPos, contentsWidth, this) , _senderItem(QRectF(senderPos, QSizeF(senderWidth, _contentsItem.height())), this) , _timestampItem(QRectF(0, 0, timestampWidth, _contentsItem.height()), this) diff --git a/src/qtui/chatline.h b/src/qtui/chatline.h index 4ca4ba15..2f22edc4 100644 --- a/src/qtui/chatline.h +++ b/src/qtui/chatline.h @@ -18,15 +18,23 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef CHATLINE_H_ -#define CHATLINE_H_ +#pragma once #include +#include +#include #include "chatitem.h" #include "chatlinemodel.h" #include "chatscene.h" +class QAbstractItemModel; +class QEvent; +class QGraphicsSceneMouseEvent; +class QGraphicsSceneHoverEvent; +class QPainter; +class QStyleOptionGraphicsItem; + class ChatLine : public QGraphicsItem { public: @@ -122,5 +130,3 @@ private: ChatItem* _mouseGrabberItem; ChatItem* _hoverItem; }; - -#endif