MCPcopy Create free account
hub / github.com/MeisApps/pcbu-desktop / UserListModel

Method UserListModel

desktop/src/ui/models/UserListModel.cpp:5–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "platform/PlatformHelper.h"
4
5UserListModel::UserListModel(QObject *parent) : QAbstractListModel(parent) {
6 auto users = PlatformHelper::GetAllUsers();
7 auto currUser = PlatformHelper::GetCurrentUser();
8 for(const auto &user : users)
9 m_ListData.append({QString::fromUtf8(user), user == currUser, user.starts_with("MicrosoftAccount")});
10}
11
12Q_INVOKABLE UserListItem UserListModel::get(int index) {
13 if(index >= m_ListData.size())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected