author | ulf69 <ulf69> | 2004-10-13 21:27:10 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-10-13 21:27:10 (UTC) |
commit | 737183a5abd7d7b02048e8a939bafd0a8e803918 (patch) (unidiff) | |
tree | ddacf864a06a6669911b1d48862e564399eeb33b /microkde/kresources/managerimpl.cpp | |
parent | 7bb6c5f55d29ad4632b1f5c7361eee4c0d8b7cb0 (diff) | |
download | kdepimpi-737183a5abd7d7b02048e8a939bafd0a8e803918.zip kdepimpi-737183a5abd7d7b02048e8a939bafd0a8e803918.tar.gz kdepimpi-737183a5abd7d7b02048e8a939bafd0a8e803918.tar.bz2 |
removal of syncresources
Diffstat (limited to 'microkde/kresources/managerimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/managerimpl.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp index 3655f50..81bbbec 100644 --- a/microkde/kresources/managerimpl.cpp +++ b/microkde/kresources/managerimpl.cpp | |||
@@ -32,26 +32,26 @@ $Id$ | |||
32 | 32 | ||
33 | #include <kapplication.h> | 33 | #include <kapplication.h> |
34 | #include <kdebug.h> | 34 | #include <kdebug.h> |
35 | #include <kconfig.h> | 35 | #include <kconfig.h> |
36 | #include <kstandarddirs.h> | 36 | #include <kstandarddirs.h> |
37 | 37 | ||
38 | #include "resource.h" | 38 | #include "resource.h" |
39 | #include "factory.h" | 39 | #include "factory.h" |
40 | #include "managerimpl.h" | 40 | #include "managerimpl.h" |
41 | 41 | ||
42 | using namespace KRES; | 42 | using namespace KRES; |
43 | 43 | ||
44 | ManagerImpl::ManagerImpl( const QString &family, bool syncable ) | 44 | ManagerImpl::ManagerImpl( const QString &family ) |
45 | : mFamily( family ), mSyncable(syncable), mConfig( 0 ), mStdConfig( 0 ), mStandard( 0 ), | 45 | : mFamily( family ), mConfig( 0 ), mStdConfig( 0 ), mStandard( 0 ), |
46 | mFactory( 0 ) | 46 | mFactory( 0 ) |
47 | 47 | ||
48 | { | 48 | { |
49 | kdDebug(5650) << "ManagerImpl::ManagerImpl()" << endl; | 49 | kdDebug(5650) << "ManagerImpl::ManagerImpl()" << endl; |
50 | 50 | ||
51 | 51 | ||
52 | } | 52 | } |
53 | 53 | ||
54 | ManagerImpl::~ManagerImpl() | 54 | ManagerImpl::~ManagerImpl() |
55 | { | 55 | { |
56 | kdDebug(5650) << "ManagerImpl::~ManagerImpl()" << endl; | 56 | kdDebug(5650) << "ManagerImpl::~ManagerImpl()" << endl; |
57 | 57 | ||
@@ -259,25 +259,25 @@ Resource* ManagerImpl::readResourceConfig( const QString& identifier, | |||
259 | 259 | ||
260 | // qDebug("ManagerImpl::readResourceConfig() %s", identifier.latin1()); | 260 | // qDebug("ManagerImpl::readResourceConfig() %s", identifier.latin1()); |
261 | 261 | ||
262 | mConfig->setGroup( "Resource_" + identifier ); | 262 | mConfig->setGroup( "Resource_" + identifier ); |
263 | #ifdef _WIN32_ | 263 | #ifdef _WIN32_ |
264 | // we use plugins on win32. the group is stored in a static variable | 264 | // we use plugins on win32. the group is stored in a static variable |
265 | // such that gourp info not avail on win32 plugins | 265 | // such that gourp info not avail on win32 plugins |
266 | // to fix that, it would be a looooot of work | 266 | // to fix that, it would be a looooot of work |
267 | mConfig->setTempGroup( "Resource_" + identifier ); | 267 | mConfig->setTempGroup( "Resource_" + identifier ); |
268 | #endif | 268 | #endif |
269 | QString type = mConfig->readEntry( "ResourceType" ); | 269 | QString type = mConfig->readEntry( "ResourceType" ); |
270 | QString name = mConfig->readEntry( "ResourceName" ); | 270 | QString name = mConfig->readEntry( "ResourceName" ); |
271 | Resource *resource = mFactory->resource( type, mConfig, mSyncable ); | 271 | Resource *resource = mFactory->resource( type, mConfig ); |
272 | if ( !resource ) { | 272 | if ( !resource ) { |
273 | qDebug("Failed to create resource with id %s ",identifier.latin1() ); | 273 | qDebug("Failed to create resource with id %s ",identifier.latin1() ); |
274 | return 0; | 274 | return 0; |
275 | } | 275 | } |
276 | 276 | ||
277 | if ( resource->identifier().isEmpty() ) | 277 | if ( resource->identifier().isEmpty() ) |
278 | resource->setIdentifier( identifier ); | 278 | resource->setIdentifier( identifier ); |
279 | 279 | ||
280 | mConfig->setGroup( "General" ); | 280 | mConfig->setGroup( "General" ); |
281 | 281 | ||
282 | QString standardKey = mConfig->readEntry( "Standard" ); | 282 | QString standardKey = mConfig->readEntry( "Standard" ); |
283 | if ( standardKey == identifier ) { | 283 | if ( standardKey == identifier ) { |
@@ -355,20 +355,13 @@ void ManagerImpl::removeResource( Resource *resource ) | |||
355 | } | 355 | } |
356 | 356 | ||
357 | Resource* ManagerImpl::getResource( const QString& identifier ) | 357 | Resource* ManagerImpl::getResource( const QString& identifier ) |
358 | { | 358 | { |
359 | Resource::List::ConstIterator it; | 359 | Resource::List::ConstIterator it; |
360 | for ( it = mResources.begin(); it != mResources.end(); ++it ) { | 360 | for ( it = mResources.begin(); it != mResources.end(); ++it ) { |
361 | if ( (*it)->identifier() == identifier ) | 361 | if ( (*it)->identifier() == identifier ) |
362 | return *it; | 362 | return *it; |
363 | } | 363 | } |
364 | return 0; | 364 | return 0; |
365 | } | 365 | } |
366 | 366 | ||
367 | /** | ||
368 | Return true, if the manager manages syncable resources. | ||
369 | */ | ||
370 | bool ManagerImpl::manageSyncable() const | ||
371 | { | ||
372 | return mSyncable; | ||
373 | } | ||
374 | 367 | ||