Changeset View
Changeset View
Standalone View
Standalone View
src/core/collection.cpp
Show First 20 Lines • Show All 409 Lines • ▼ Show 20 Line(s) | 409 | case ListIndex: | |||
---|---|---|---|---|---|
410 | return d_ptr->indexPreference; | 410 | return d_ptr->indexPreference; | ||
411 | } | 411 | } | ||
412 | return ListDefault; | 412 | return ListDefault; | ||
413 | } | 413 | } | ||
414 | 414 | | |||
415 | bool Collection::shouldList(Collection::ListPurpose purpose) const | 415 | bool Collection::shouldList(Collection::ListPurpose purpose) const | ||
416 | { | 416 | { | ||
417 | if (localListPreference(purpose) == ListDefault) { | 417 | if (localListPreference(purpose) == ListDefault) { | ||
418 | return enabled() || referenced(); | 418 | return enabled(); | ||
419 | } | 419 | } | ||
420 | return (localListPreference(purpose) == ListEnabled); | 420 | return (localListPreference(purpose) == ListEnabled); | ||
421 | } | 421 | } | ||
422 | 422 | | |||
423 | void Collection::setShouldList(ListPurpose purpose, bool list) | 423 | void Collection::setShouldList(ListPurpose purpose, bool list) | ||
424 | { | 424 | { | ||
425 | if (localListPreference(purpose) == ListDefault) { | 425 | if (localListPreference(purpose) == ListDefault) { | ||
426 | setEnabled(list); | 426 | setEnabled(list); | ||
427 | } else { | 427 | } else { | ||
428 | setLocalListPreference(purpose, list ? ListEnabled : ListDisabled); | 428 | setLocalListPreference(purpose, list ? ListEnabled : ListDisabled); | ||
429 | } | 429 | } | ||
430 | } | 430 | } | ||
431 | 431 | | |||
432 | void Collection::setReferenced(bool referenced) | | |||
433 | { | | |||
434 | d_ptr->referencedChanged = true; | | |||
435 | d_ptr->referenced = referenced; | | |||
436 | } | | |||
437 | | ||||
438 | bool Collection::referenced() const | | |||
439 | { | | |||
440 | return d_ptr->referenced; | | |||
441 | } | | |||
442 | | ||||
443 | void Collection::setKeepLocalChanges(const QSet<QByteArray> &parts) | 432 | void Collection::setKeepLocalChanges(const QSet<QByteArray> &parts) | ||
444 | { | 433 | { | ||
445 | d_ptr->keepLocalChanges = parts; | 434 | d_ptr->keepLocalChanges = parts; | ||
446 | } | 435 | } | ||
447 | 436 | | |||
448 | QSet<QByteArray> Collection::keepLocalChanges() const | 437 | QSet<QByteArray> Collection::keepLocalChanges() const | ||
449 | { | 438 | { | ||
450 | return d_ptr->keepLocalChanges; | 439 | return d_ptr->keepLocalChanges; | ||
451 | } | 440 | } | ||
452 | 441 | | |||
453 | void Collection::markAttributeModified(const QByteArray &type) | 442 | void Collection::markAttributeModified(const QByteArray &type) | ||
454 | { | 443 | { | ||
455 | d_ptr->mAttributeStorage.markAttributeModified(type); | 444 | d_ptr->mAttributeStorage.markAttributeModified(type); | ||
456 | } | 445 | } |