diff --git a/src/Cache.cpp b/src/Cache.cpp index 79425fa1..0bfc2842 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -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 - diff --git a/src/ChatPage.h b/src/ChatPage.h index a7fb31a8..9e88dcc6 100644 --- a/src/ChatPage.h +++ b/src/ChatPage.h @@ -22,6 +22,7 @@ #include #include +#include #include #include diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index b13f1b80..a24266fa 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -23,6 +23,7 @@ #include +#include "Cache.h" #include "ChatPage.h" #include "Config.h" #include "Logging.h" diff --git a/src/MxcImageProvider.cpp b/src/MxcImageProvider.cpp index 02ca2806..d04eab24 100644 --- a/src/MxcImageProvider.cpp +++ b/src/MxcImageProvider.cpp @@ -1,8 +1,8 @@ #include "MxcImageProvider.h" #include "Cache.h" -#include "MatrixClient.h" #include "Logging.h" +#include "MatrixClient.h" void MxcImageResponse::run() diff --git a/src/QuickSwitcher.cpp b/src/QuickSwitcher.cpp index 29683bb3..53dd21e0 100644 --- a/src/QuickSwitcher.cpp +++ b/src/QuickSwitcher.cpp @@ -22,6 +22,7 @@ #include #include +#include "Cache.h" #include "QuickSwitcher.h" #include "popups/SuggestionsPopup.h" diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index 772a8d13..6809d605 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -29,6 +29,7 @@ #include #include +#include "Cache.h" #include "Config.h" #include "MatrixClient.h" #include "Olm.h" diff --git a/src/Utils.cpp b/src/Utils.cpp index 918e1996..1c94761d 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -15,6 +15,7 @@ #include +#include "Cache.h" #include "Config.h" using TimelineEvent = mtx::events::collections::TimelineEvents; diff --git a/src/Utils.h b/src/Utils.h index aa62b8e7..6b809d63 100644 --- a/src/Utils.h +++ b/src/Utils.h @@ -2,7 +2,6 @@ #include -#include "Cache.h" #include "RoomInfoListItem.h" #include @@ -13,6 +12,12 @@ #include +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 diff --git a/src/dialogs/RoomSettings.cpp b/src/dialogs/RoomSettings.cpp index fcaa4fdc..b214b35d 100644 --- a/src/dialogs/RoomSettings.cpp +++ b/src/dialogs/RoomSettings.cpp @@ -16,6 +16,7 @@ #include "dialogs/RoomSettings.h" +#include "Cache.h" #include "ChatPage.h" #include "Config.h" #include "Logging.h"