diff options
-rw-r--r-- | common/domainadaptor.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/common/domainadaptor.h b/common/domainadaptor.h index b541e23..39bd3b8 100644 --- a/common/domainadaptor.h +++ b/common/domainadaptor.h | |||
@@ -82,8 +82,6 @@ static void createBufferPartBuffer(const Akonadi2::ApplicationDomain::Applicatio | |||
82 | 82 | ||
83 | /** | 83 | /** |
84 | * A generic adaptor implementation that uses a property mapper to read/write values. | 84 | * A generic adaptor implementation that uses a property mapper to read/write values. |
85 | * | ||
86 | * TODO: this is the read-only part. Create a write only equivalent | ||
87 | */ | 85 | */ |
88 | template <class LocalBuffer, class ResourceBuffer> | 86 | template <class LocalBuffer, class ResourceBuffer> |
89 | class GenericBufferAdaptor : public Akonadi2::ApplicationDomain::BufferAdaptor | 87 | class GenericBufferAdaptor : public Akonadi2::ApplicationDomain::BufferAdaptor |
@@ -95,11 +93,6 @@ public: | |||
95 | 93 | ||
96 | } | 94 | } |
97 | 95 | ||
98 | //TODO remove | ||
99 | void setProperty(const QByteArray &key, const QVariant &value) | ||
100 | { | ||
101 | } | ||
102 | |||
103 | virtual QVariant getProperty(const QByteArray &key) const | 96 | virtual QVariant getProperty(const QByteArray &key) const |
104 | { | 97 | { |
105 | if (mResourceBuffer && mResourceMapper->hasMapping(key)) { | 98 | if (mResourceBuffer && mResourceMapper->hasMapping(key)) { |
@@ -107,16 +100,13 @@ public: | |||
107 | } else if (mLocalBuffer && mLocalMapper->hasMapping(key)) { | 100 | } else if (mLocalBuffer && mLocalMapper->hasMapping(key)) { |
108 | return mLocalMapper->getProperty(key, mLocalBuffer); | 101 | return mLocalMapper->getProperty(key, mLocalBuffer); |
109 | } | 102 | } |
110 | qWarning() << "no mapping available for key " << key; | 103 | Warning() << "No mapping available for key " << key; |
111 | return QVariant(); | 104 | return QVariant(); |
112 | } | 105 | } |
113 | 106 | ||
114 | virtual QList<QByteArray> availableProperties() const | 107 | virtual QList<QByteArray> availableProperties() const |
115 | { | 108 | { |
116 | QList<QByteArray> props; | 109 | return mResourceMapper->availableProperties() + mLocalMapper->availableProperties(); |
117 | props << mResourceMapper->availableProperties(); | ||
118 | props << mLocalMapper->availableProperties(); | ||
119 | return props; | ||
120 | } | 110 | } |
121 | 111 | ||
122 | LocalBuffer const *mLocalBuffer; | 112 | LocalBuffer const *mLocalBuffer; |