Allow accessing deviceName from qml

Summary: This allows it to be used outside of comboboxes in qml

Reviewers: broulik

Reviewed By: broulik

Subscribers: broulik, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16829
This commit is contained in:
Billy Laws 2018-11-11 18:52:17 +00:00
parent 73191d8565
commit e47fb17006

View file

@ -70,6 +70,7 @@ DevicesModel::DevicesModel(QObject* parent)
QHash< int, QByteArray > DevicesModel::roleNames() const
{
QHash<int, QByteArray> names = QAbstractItemModel::roleNames();
names.insert(NameModelRole, "deviceName");
names.insert(IdModelRole, "deviceId");
names.insert(IconNameRole, "iconName");
names.insert(DeviceRole, "device");