| 35 | } |
| 36 | |
| 37 | QVariant EnvironmentProfileListModel::data(const QModelIndex& index, int role) const |
| 38 | { |
| 39 | if (!index.isValid() || |
| 40 | index.row() < 0 || index.row() >= rowCount() || |
| 41 | index.column() != 0) { |
| 42 | return {}; |
| 43 | } |
| 44 | |
| 45 | if (role == Qt::DisplayRole) { |
| 46 | auto profileName = profileNames().at(index.row()); |
| 47 | if (profileName == defaultProfileName()) { |
| 48 | profileName = i18n("%1 (default profile)", profileName); |
| 49 | } |
| 50 | return profileName; |
| 51 | } |
| 52 | |
| 53 | return {}; |
| 54 | } |
| 55 | |
| 56 | QModelIndex EnvironmentProfileListModel::index(int row, int column, const QModelIndex& parent) const |
| 57 | { |
nothing calls this directly
no test coverage detected