summaryrefslogtreecommitdiffstats
path: root/common/domain/applicationdomaintype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/domain/applicationdomaintype.cpp')
-rw-r--r--common/domain/applicationdomaintype.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp
index 3718f77..ee70c35 100644
--- a/common/domain/applicationdomaintype.cpp
+++ b/common/domain/applicationdomaintype.cpp
@@ -34,7 +34,13 @@ QDebug Sink::ApplicationDomain::operator<< (QDebug d, const Sink::ApplicationDom
34QDebug Sink::ApplicationDomain::operator<< (QDebug d, const Sink::ApplicationDomain::ApplicationDomainType &type) 34QDebug Sink::ApplicationDomain::operator<< (QDebug d, const Sink::ApplicationDomain::ApplicationDomainType &type)
35{ 35{
36 d << "ApplicationDomainType(\n"; 36 d << "ApplicationDomainType(\n";
37 auto properties = type.mAdaptor->availableProperties(); 37 auto properties = [&] {
38 if (!type.changedProperties().isEmpty()) {
39 return type.changedProperties();
40 } else {
41 return type.mAdaptor->availableProperties();
42 }
43 }();
38 std::sort(properties.begin(), properties.end()); 44 std::sort(properties.begin(), properties.end());
39 d << " " << "Id: " << "\t" << type.identifier() << "\n"; 45 d << " " << "Id: " << "\t" << type.identifier() << "\n";
40 d << " " << "Resource: " << "\t" << type.resourceInstanceIdentifier() << "\n"; 46 d << " " << "Resource: " << "\t" << type.resourceInstanceIdentifier() << "\n";
@@ -216,8 +222,13 @@ QVariant ApplicationDomainType::getProperty(const QByteArray &key) const
216void ApplicationDomainType::setProperty(const QByteArray &key, const QVariant &value) 222void ApplicationDomainType::setProperty(const QByteArray &key, const QVariant &value)
217{ 223{
218 Q_ASSERT(mAdaptor); 224 Q_ASSERT(mAdaptor);
219 mChangeSet->insert(key); 225 auto existing = mAdaptor->getProperty(key);
220 mAdaptor->setProperty(key, value); 226 if (existing.isValid() && existing == value) {
227 SinkTrace() << "Tried to set property that is still the same: " << key << value;
228 } else {
229 mChangeSet->insert(key);
230 mAdaptor->setProperty(key, value);
231 }
221} 232}
222 233
223void ApplicationDomainType::setResource(const QByteArray &identifier) 234void ApplicationDomainType::setResource(const QByteArray &identifier)