| 3 | #include "storage/PairedDevicesStorage.h" |
| 4 | |
| 5 | DevicesTableModel::DevicesTableModel(QObject *parent) : QAbstractTableModel(parent) { |
| 6 | for(const auto &device : PairedDevicesStorage::GetDevices()) { |
| 7 | auto pairingId = QString::fromUtf8(device.id); |
| 8 | auto deviceName = QString::fromUtf8(device.deviceName); |
| 9 | auto userName = QString::fromUtf8(device.userName); |
| 10 | auto method = QString::fromUtf8(PairingMethodUtils::ToString(device.pairingMethod)); |
| 11 | m_TableData.append({pairingId, deviceName, userName, method}); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | Q_INVOKABLE QVector<QString> DevicesTableModel::get(int rowIdx) { |
| 16 | if(rowIdx >= m_TableData.at(0).size()) |
nothing calls this directly
no outgoing calls
no test coverage detected