Replace Quotient::Connection with NeoChatConnection where possible

This commit is contained in:
Tobias Fella
2024-04-23 11:31:30 +02:00
parent 66a60f09e3
commit 1e644587b3
38 changed files with 83 additions and 95 deletions

View File

@@ -12,10 +12,11 @@ class NeoChatRoom;
namespace Quotient
{
class Connection;
class Room;
}
class NeoChatConnection;
/**
* @class RoomListModel
*
@@ -29,7 +30,7 @@ class RoomListModel : public QAbstractListModel
/**
* @brief The current connection that the model is getting its rooms from.
*/
Q_PROPERTY(Quotient::Connection *connection READ connection WRITE setConnection NOTIFY connectionChanged)
Q_PROPERTY(NeoChatConnection *connection READ connection WRITE setConnection NOTIFY connectionChanged)
public:
/**
@@ -60,8 +61,8 @@ public:
explicit RoomListModel(QObject *parent = nullptr);
~RoomListModel() override;
[[nodiscard]] Quotient::Connection *connection() const;
void setConnection(Quotient::Connection *connection);
[[nodiscard]] NeoChatConnection *connection() const;
void setConnection(NeoChatConnection *connection);
/**
* @brief Get the given role value at the given index.
@@ -109,7 +110,7 @@ private Q_SLOTS:
void refresh(NeoChatRoom *room, const QList<int> &roles = {});
private:
Quotient::Connection *m_connection = nullptr;
QPointer<NeoChatConnection> m_connection;
QList<NeoChatRoom *> m_rooms;
QString m_activeSpaceId;