| 227 | } |
| 228 | |
| 229 | QString SyncthingFileModel::availabilityNote(const SyncthingItem *item) const |
| 230 | { |
| 231 | if (item->existsInDb.value_or(false) && item->existsLocally.value_or(false)) { |
| 232 | return tr("Exists locally and globally"); |
| 233 | } else if (item->existsInDb.value_or(false) && item->existsLocally.has_value()) { |
| 234 | return tr("Exists only globally"); |
| 235 | } else if (item->existsLocally.value_or(false) && item->existsInDb.has_value()) { |
| 236 | return tr("Exists only locally"); |
| 237 | } else if (item->existsInDb.value_or(false)) { |
| 238 | return tr("Exists globally and perhaps locally"); |
| 239 | } else if (item->existsLocally.value_or(false)) { |
| 240 | return tr("Exists locally and perhaps globally"); |
| 241 | } else { |
| 242 | return tr("Does not exist"); |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | /*! |
| 247 | * \brief Computes new ignore patterns based on the present ignore patterns and staged changes. |
nothing calls this directly
no outgoing calls
no test coverage detected