Changeset View
Changeset View
Standalone View
Standalone View
src/core/collectionsync.cpp
Show First 20 Lines • Show All 567 Lines • ▼ Show 20 Line(s) | 562 | for (const CollectionPair &pair : qAsConst(remoteCollectionsToUpdate)) { | |||
---|---|---|---|---|---|
568 | Q_ASSERT(currentTransaction); | 568 | Q_ASSERT(currentTransaction); | ||
569 | upd.setId(local.id()); | 569 | upd.setId(local.id()); | ||
570 | if (ignoreAttributeChanges(remote, CONTENTMIMETYPES)) { | 570 | if (ignoreAttributeChanges(remote, CONTENTMIMETYPES)) { | ||
571 | upd.setContentMimeTypes(local.contentMimeTypes()); | 571 | upd.setContentMimeTypes(local.contentMimeTypes()); | ||
572 | } | 572 | } | ||
573 | Q_FOREACH (Attribute *remoteAttr, upd.attributes()) { | 573 | Q_FOREACH (Attribute *remoteAttr, upd.attributes()) { | ||
574 | if (ignoreAttributeChanges(remote, remoteAttr->type()) && local.hasAttribute(remoteAttr->type())) { | 574 | if (ignoreAttributeChanges(remote, remoteAttr->type()) && local.hasAttribute(remoteAttr->type())) { | ||
575 | //We don't want to overwrite the attribute changes with the defaults provided by the resource. | 575 | //We don't want to overwrite the attribute changes with the defaults provided by the resource. | ||
576 | Attribute *localAttr = local.attribute(remoteAttr->type()); | 576 | const Attribute *localAttr = local.attribute(remoteAttr->type()); | ||
577 | upd.removeAttribute(localAttr->type()); | 577 | upd.removeAttribute(localAttr->type()); | ||
578 | upd.addAttribute(localAttr->clone()); | 578 | upd.addAttribute(localAttr->clone()); | ||
579 | } | 579 | } | ||
580 | } | 580 | } | ||
581 | 581 | | |||
582 | // ### HACK to work around the implicit move attempts of CollectionModifyJob | 582 | // ### HACK to work around the implicit move attempts of CollectionModifyJob | ||
583 | // which we do explicitly below | 583 | // which we do explicitly below | ||
584 | Collection c(upd); | 584 | Collection c(upd); | ||
▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines |