Changeset View
Changeset View
Standalone View
Standalone View
src/core/collection.cpp
Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Line(s) | 171 | if (existing) { | |||
---|---|---|---|---|---|
172 | if (attr == existing) { | 172 | if (attr == existing) { | ||
173 | return; | 173 | return; | ||
174 | } | 174 | } | ||
175 | d_ptr->mAttributes.remove(attr->type()); | 175 | d_ptr->mAttributes.remove(attr->type()); | ||
176 | delete existing; | 176 | delete existing; | ||
177 | } | 177 | } | ||
178 | d_ptr->mAttributes.insert(attr->type(), attr); | 178 | d_ptr->mAttributes.insert(attr->type(), attr); | ||
179 | d_ptr->mDeletedAttributes.remove(attr->type()); | 179 | d_ptr->mDeletedAttributes.remove(attr->type()); | ||
180 | d_ptr->attributesChanged = true; | ||||
180 | } | 181 | } | ||
181 | 182 | | |||
182 | void Collection::removeAttribute(const QByteArray &type) | 183 | void Collection::removeAttribute(const QByteArray &type) | ||
183 | { | 184 | { | ||
184 | d_ptr->mDeletedAttributes.insert(type); | 185 | d_ptr->mDeletedAttributes.insert(type); | ||
185 | delete d_ptr->mAttributes.take(type); | 186 | delete d_ptr->mAttributes.take(type); | ||
186 | } | 187 | } | ||
187 | 188 | | |||
▲ Show 20 Lines • Show All 267 Lines • ▼ Show 20 Line(s) | |||||
455 | { | 456 | { | ||
456 | d_ptr->keepLocalChanges = parts; | 457 | d_ptr->keepLocalChanges = parts; | ||
457 | } | 458 | } | ||
458 | 459 | | |||
459 | QSet<QByteArray> Collection::keepLocalChanges() const | 460 | QSet<QByteArray> Collection::keepLocalChanges() const | ||
460 | { | 461 | { | ||
461 | return d_ptr->keepLocalChanges; | 462 | return d_ptr->keepLocalChanges; | ||
462 | } | 463 | } | ||
464 | | ||||
465 | void Collection::markAttributesChanged() | ||||
466 | { | ||||
467 | d_ptr->attributesChanged = true; | ||||
468 | } |