Port RoomList to TreeView
Use a tree model for the room list closes network/neochat#156 BUG: 456643
This commit is contained in:
committed by
James Graham
parent
dae23ccd4b
commit
fc6ea0b779
@@ -5,7 +5,9 @@
|
||||
|
||||
#include <QDBusMetaType>
|
||||
|
||||
#include "controller.h"
|
||||
#include "neochatroom.h"
|
||||
#include "roomlistmodel.h"
|
||||
#include "roommanager.h"
|
||||
#include "windowcontroller.h"
|
||||
|
||||
@@ -27,6 +29,12 @@ RemoteImage Runner::serializeImage(const QImage &image)
|
||||
Runner::Runner()
|
||||
: QObject()
|
||||
{
|
||||
m_sourceModel = new RoomListModel(this);
|
||||
m_model.setSourceModel(m_sourceModel);
|
||||
connect(&Controller::instance(), &Controller::activeConnectionChanged, this, [this]() {
|
||||
m_sourceModel->setConnection(Controller::instance().activeConnection());
|
||||
});
|
||||
|
||||
qDBusRegisterMetaType<RemoteMatch>();
|
||||
qDBusRegisterMetaType<RemoteMatches>();
|
||||
qDBusRegisterMetaType<RemoteAction>();
|
||||
|
||||
Reference in New Issue
Block a user