| 3 | #include "platform/PlatformHelper.h" |
| 4 | |
| 5 | UserListModel::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 | |
| 12 | Q_INVOKABLE UserListItem UserListModel::get(int index) { |
| 13 | if(index >= m_ListData.size()) |
nothing calls this directly
no outgoing calls
no test coverage detected