diff --git a/internal/frontend/qt/qml_users.go b/internal/frontend/qt/qml_users.go index 8d94fbb9..9e3e0b3c 100644 --- a/internal/frontend/qt/qml_users.go +++ b/internal/frontend/qt/qml_users.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . +//go:build build_qt // +build build_qt package qt @@ -51,6 +52,7 @@ func (um *QMLUserModel) init() { defer um.access.Unlock() um.SetCount(0) um.ConnectRowCount(um.rowCount) + um.ConnectRoleNames(um.roleNames) um.ConnectData(um.data) um.ConnectGet(um.get) um.ConnectCount(func() int { @@ -62,6 +64,12 @@ func (um *QMLUserModel) init() { um.userByID = map[string]*QMLUser{} } +func (um *QMLUserModel) roleNames() map[int]*core.QByteArray { + return map[int]*core.QByteArray{ + int(core.Qt__DisplayRole): core.NewQByteArray2("user", -1), + } +} + func (um *QMLUserModel) data(index *core.QModelIndex, property int) *core.QVariant { if !index.IsValid() { um.f.log.WithField("size", len(um.userIDs)).Info("Trying to get user by invalid index")