Change SwipeView to StackView and clean code.
This commit is contained in:
@@ -39,17 +39,15 @@ class RoomListModel : public QAbstractListModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit RoomListModel(QObject *parent = nullptr);
|
||||
explicit RoomListModel(QMatrixClient::Connection* m_connection = 0);
|
||||
~RoomListModel();
|
||||
|
||||
enum RoomModelRoles {
|
||||
NameRole, ValueRole
|
||||
NameRole, ValueRole, IconRole
|
||||
};
|
||||
|
||||
QHash<int, QByteArray> roleNames() const;
|
||||
|
||||
void init(QMatrixClient::Connection*);
|
||||
|
||||
Q_INVOKABLE QMatrixClient::Room* roomAt(int row);
|
||||
|
||||
QVariant data(const QModelIndex& index, int role) const override;
|
||||
@@ -65,7 +63,7 @@ private slots:
|
||||
void addRoom(QMatrixClient::Room* room);
|
||||
|
||||
private:
|
||||
QMatrixClient::Connection *m_connection;
|
||||
QMatrixClient::Connection* m_connection;
|
||||
QList<QMatrixClient::Room*> m_rooms;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user