summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/manager.h
Unidiff
Diffstat (limited to 'microkde/kresources/manager.h') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kresources/manager.h12
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
@@ -164,23 +164,18 @@ class Manager : private ManagerImplListener
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()
@@ -257,17 +252,16 @@ class Manager : private ManagerImplListener
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