Reduce Cache.h includes further via one forward declaration

This commit is contained in:
Nicolas Werner 2019-12-15 03:34:17 +01:00
parent 37fbcaf07b
commit 79f967da8c
9 changed files with 13 additions and 4 deletions

View File

@ -104,7 +104,6 @@ numeric_key_comparison(const MDB_val *a, const MDB_val *b)
return -1;
}
Cache::Cache(const QString &userId, QObject *parent)
: QObject{parent}
, env_{nullptr}
@ -2901,4 +2900,3 @@ restoreSessions()
return instance_->restoreSessions();
}
} // namespace cache

View File

@ -22,6 +22,7 @@
#include <variant>
#include <mtx/common.hpp>
#include <mtx/requests.hpp>
#include <mtx/responses.hpp>
#include <mtxclient/http/errors.hpp>

View File

@ -23,6 +23,7 @@
#include <mtx/requests.hpp>
#include "Cache.h"
#include "ChatPage.h"
#include "Config.h"
#include "Logging.h"

View File

@ -1,8 +1,8 @@
#include "MxcImageProvider.h"
#include "Cache.h"
#include "MatrixClient.h"
#include "Logging.h"
#include "MatrixClient.h"
void
MxcImageResponse::run()

View File

@ -22,6 +22,7 @@
#include <QTimer>
#include <QtConcurrent>
#include "Cache.h"
#include "QuickSwitcher.h"
#include "popups/SuggestionsPopup.h"

View File

@ -29,6 +29,7 @@
#include <QString>
#include <QTextStream>
#include "Cache.h"
#include "Config.h"
#include "MatrixClient.h"
#include "Olm.h"

View File

@ -15,6 +15,7 @@
#include <cmark.h>
#include "Cache.h"
#include "Config.h"
using TimelineEvent = mtx::events::collections::TimelineEvents;

View File

@ -2,7 +2,6 @@
#include <variant>
#include "Cache.h"
#include "RoomInfoListItem.h"
#include <QCoreApplication>
@ -13,6 +12,12 @@
#include <qmath.h>
namespace cache {
// Forward declarations to prevent dependency on Cache.h, since this header is included often!
QString
displayName(const QString &room_id, const QString &user_id);
}
class QComboBox;
// Contains information about related events for

View File

@ -16,6 +16,7 @@
#include "dialogs/RoomSettings.h"
#include "Cache.h"
#include "ChatPage.h"
#include "Config.h"
#include "Logging.h"