MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / availabilityNote

Method availabilityNote

syncthingmodel/syncthingfilemodel.cpp:229–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229QString 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected