Port some things away from Controller::activeConnection

This commit is contained in:
Tobias Fella
2023-11-04 23:26:41 +01:00
parent ff4cf86ea5
commit 0e55c3b38f
29 changed files with 289 additions and 154 deletions

View File

@@ -17,6 +17,7 @@
#include "models/messagefiltermodel.h"
class NeoChatRoom;
class NeoChatConnection;
namespace Quotient
{
@@ -37,6 +38,8 @@ class RoomManager : public QObject, public UriResolverBase
QML_ELEMENT
QML_SINGLETON
Q_PROPERTY(NeoChatConnection *connection READ connection WRITE setConnection NOTIFY connectionChanged)
/**
* @brief The current open room in NeoChat, if any.
*
@@ -247,6 +250,9 @@ public:
*/
void setUrlArgument(const QString &arg);
NeoChatConnection *connection() const;
void setConnection(NeoChatConnection *connection);
Q_SIGNALS:
void currentRoomChanged();
@@ -365,6 +371,8 @@ Q_SIGNALS:
void chatDocumentHandlerChanged();
void connectionChanged();
private:
void openRoomForActiveConnection();
@@ -378,4 +386,5 @@ private:
MessageEventModel *m_messageEventModel;
MessageFilterModel *m_messageFilterModel;
MediaMessageFilterModel *m_mediaMessageFilterModel;
NeoChatConnection *m_connection;
};