Diffstat (limited to 'microkde/kresources/manager.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/manager.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/microkde/kresources/manager.h b/microkde/kresources/manager.h index 7e9e19a..0e6f838 100644 --- a/microkde/kresources/manager.h +++ b/microkde/kresources/manager.h | |||
@@ -158,35 +158,30 @@ class Manager : private ManagerImplListener | |||
158 | } | 158 | } |
159 | 159 | ||
160 | ActiveIterator activeEnd() | 160 | ActiveIterator activeEnd() |
161 | { | 161 | { |
162 | ActiveIterator it; | 162 | ActiveIterator it; |
163 | it.mIt = mImpl->resourceList()->end(); | 163 | it.mIt = mImpl->resourceList()->end(); |
164 | it.mList = mImpl->resourceList(); | 164 | it.mList = mImpl->resourceList(); |
165 | return it; | 165 | return it; |
166 | } | 166 | } |
167 | 167 | ||
168 | bool isEmpty() const { return mImpl->resourceList()->isEmpty(); } | 168 | bool isEmpty() const { return mImpl->resourceList()->isEmpty(); } |
169 | 169 | ||
170 | /** | 170 | Manager( const QString &family ) |
171 | Return true, if the manager manages syncable resources. | ||
172 | */ | ||
173 | bool manageSyncable() { return mImpl->manageSyncable(); } | ||
174 | |||
175 | Manager( const QString &family, bool syncable ) | ||
176 | { | 171 | { |
177 | mFactory = Factory::self( family ); | 172 | mFactory = Factory::self( family ); |
178 | // The managerimpl will use the same Factory object as the manager | 173 | // The managerimpl will use the same Factory object as the manager |
179 | // because of the Factory::self() pattern | 174 | // because of the Factory::self() pattern |
180 | mImpl = new ManagerImpl( family, syncable ); | 175 | mImpl = new ManagerImpl( family ); |
181 | mImpl->setListener( this ); | 176 | mImpl->setListener( this ); |
182 | 177 | ||
183 | mListeners = new QPtrList<ManagerListener<T> >; | 178 | mListeners = new QPtrList<ManagerListener<T> >; |
184 | } | 179 | } |
185 | 180 | ||
186 | virtual ~Manager() | 181 | virtual ~Manager() |
187 | { | 182 | { |
188 | mImpl->setListener( 0 ); | 183 | mImpl->setListener( 0 ); |
189 | delete mListeners; | 184 | delete mListeners; |
190 | delete mImpl; | 185 | delete mImpl; |
191 | } | 186 | } |
192 | 187 | ||
@@ -251,29 +246,28 @@ class Manager : private ManagerImplListener | |||
251 | return mFactory->resourceConfigWidget( type, parent ); | 246 | return mFactory->resourceConfigWidget( type, parent ); |
252 | } | 247 | } |
253 | 248 | ||
254 | /** | 249 | /** |
255 | Creates a new resource of type @param type, with default | 250 | Creates a new resource of type @param type, with default |
256 | settings. The resource is | 251 | settings. The resource is |
257 | not added to the manager, the application has to do that. | 252 | not added to the manager, the application has to do that. |
258 | Returns a pointer to a resource object or a null pointer | 253 | Returns a pointer to a resource object or a null pointer |
259 | if resource type doesn't exist. | 254 | if resource type doesn't exist. |
260 | 255 | ||
261 | @param type The type of the resource, one of those returned | 256 | @param type The type of the resource, one of those returned |
262 | by @ref resourceTypeNames() | 257 | by @ref resourceTypeNames() |
263 | * @param syncable If the resource should support syncing capabilities. | ||
264 | */ | 258 | */ |
265 | T *createResource( const QString& type ) | 259 | T *createResource( const QString& type ) |
266 | { | 260 | { |
267 | return (T *)( mFactory->resource( type, 0, mImpl->manageSyncable() ) ); | 261 | return (T *)( mFactory->resource( type, 0 ) ); |
268 | } | 262 | } |
269 | 263 | ||
270 | /** | 264 | /** |
271 | Returns a list of the names of all available resource types. | 265 | Returns a list of the names of all available resource types. |
272 | */ | 266 | */ |
273 | QStringList resourceTypeNames() const | 267 | QStringList resourceTypeNames() const |
274 | { | 268 | { |
275 | return mFactory->typeNames(); | 269 | return mFactory->typeNames(); |
276 | } | 270 | } |
277 | 271 | ||
278 | QStringList resourceTypeDescriptions() const | 272 | QStringList resourceTypeDescriptions() const |
279 | { | 273 | { |