diff options
Diffstat (limited to 'common/bufferadaptor.h')
-rw-r--r-- | common/bufferadaptor.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/common/bufferadaptor.h b/common/bufferadaptor.h index ad50582..2a40d18 100644 --- a/common/bufferadaptor.h +++ b/common/bufferadaptor.h | |||
@@ -82,15 +82,29 @@ public: | |||
82 | } | 82 | } |
83 | virtual void setProperty(const QByteArray &key, const QVariant &value) | 83 | virtual void setProperty(const QByteArray &key, const QVariant &value) |
84 | { | 84 | { |
85 | if (value != mValues.value(key)) { | ||
86 | mChanges << key; | ||
87 | } | ||
85 | mValues.insert(key, value); | 88 | mValues.insert(key, value); |
86 | } | 89 | } |
90 | |||
87 | virtual QByteArrayList availableProperties() const | 91 | virtual QByteArrayList availableProperties() const |
88 | { | 92 | { |
89 | return mValues.keys(); | 93 | return mValues.keys(); |
90 | } | 94 | } |
91 | 95 | ||
96 | void resetChangedProperties() | ||
97 | { | ||
98 | mChanges.clear(); | ||
99 | } | ||
100 | |||
101 | QList<QByteArray> changedProperties() const | ||
102 | { | ||
103 | return mChanges; | ||
104 | } | ||
92 | private: | 105 | private: |
93 | QHash<QByteArray, QVariant> mValues; | 106 | QHash<QByteArray, QVariant> mValues; |
107 | QList<QByteArray> mChanges; | ||
94 | }; | 108 | }; |
95 | } | 109 | } |
96 | } | 110 | } |