Diffstat (limited to 'microkde/kresources/resource.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/resource.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/microkde/kresources/resource.cpp b/microkde/kresources/resource.cpp index 991d53d..4f69540 100644 --- a/microkde/kresources/resource.cpp +++ b/microkde/kresources/resource.cpp | |||
@@ -42,25 +42,25 @@ class Resource::ResourcePrivate | |||
42 | QString mName; | 42 | QString mName; |
43 | bool mActive; | 43 | bool mActive; |
44 | bool mIsOpen; | 44 | bool mIsOpen; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | Resource::Resource( const KConfig* config ) | 47 | Resource::Resource( const KConfig* config ) |
48 | : QObject( 0, "" ), d( new ResourcePrivate ) | 48 | : QObject( 0, "" ), d( new ResourcePrivate ) |
49 | { | 49 | { |
50 | d->mOpenCount = 0; | 50 | d->mOpenCount = 0; |
51 | d->mIsOpen = false; | 51 | d->mIsOpen = false; |
52 | 52 | ||
53 | //US compiler claimed that const discards qualifier | 53 | //US compiler claimed that const discards qualifier |
54 | KConfig* cfg = (KConfig*)config; | 54 | KConfig* cfg = (KConfig*)config; |
55 | if ( cfg ) { | 55 | if ( cfg ) { |
56 | #ifdef _WIN32_ | 56 | #ifdef _WIN32_ |
57 | // we use plugins on win32. the group is stored in a static variable | 57 | // we use plugins on win32. the group is stored in a static variable |
58 | // such that group info not available on win32 plugins | 58 | // such that group info not available on win32 plugins |
59 | // to fix that, it would be a looooot of work | 59 | // to fix that, it would be a looooot of work |
60 | if ( !cfg->tempGroup().isEmpty() ) | 60 | if ( !cfg->tempGroup().isEmpty() ) |
61 | cfg->setGroup( cfg->tempGroup() ); | 61 | cfg->setGroup( cfg->tempGroup() ); |
62 | #endif | 62 | #endif |
63 | d->mType = cfg->readEntry( "ResourceType" ); | 63 | d->mType = cfg->readEntry( "ResourceType" ); |
64 | d->mName = cfg->readEntry( "ResourceName" ); | 64 | d->mName = cfg->readEntry( "ResourceName" ); |
65 | d->mReadOnly = cfg->readBoolEntry( "ResourceIsReadOnly", false ); | 65 | d->mReadOnly = cfg->readBoolEntry( "ResourceIsReadOnly", false ); |
66 | d->mActive = cfg->readBoolEntry( "ResourceIsActive", true ); | 66 | d->mActive = cfg->readBoolEntry( "ResourceIsActive", true ); |
@@ -73,25 +73,25 @@ Resource::Resource( const KConfig* config ) | |||
73 | d->mIdentifier = KApplication::randomString( 10 ); | 73 | d->mIdentifier = KApplication::randomString( 10 ); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | Resource::~Resource() | 77 | Resource::~Resource() |
78 | { | 78 | { |
79 | delete d; | 79 | delete d; |
80 | d = 0; | 80 | d = 0; |
81 | } | 81 | } |
82 | 82 | ||
83 | void Resource::writeConfig( KConfig* config ) | 83 | void Resource::writeConfig( KConfig* config ) |
84 | { | 84 | { |
85 | 85 | ||
86 | 86 | ||
87 | config->writeEntry( "ResourceType", d->mType ); | 87 | config->writeEntry( "ResourceType", d->mType ); |
88 | config->writeEntry( "ResourceName", d->mName ); | 88 | config->writeEntry( "ResourceName", d->mName ); |
89 | config->writeEntry( "ResourceIsReadOnly", d->mReadOnly ); | 89 | config->writeEntry( "ResourceIsReadOnly", d->mReadOnly ); |
90 | config->writeEntry( "ResourceIsActive", d->mActive ); | 90 | config->writeEntry( "ResourceIsActive", d->mActive ); |
91 | config->writeEntry( "ResourceIdentifier", d->mIdentifier ); | 91 | config->writeEntry( "ResourceIdentifier", d->mIdentifier ); |
92 | } | 92 | } |
93 | 93 | ||
94 | bool Resource::open() | 94 | bool Resource::open() |
95 | { | 95 | { |
96 | d->mIsOpen = true; | 96 | d->mIsOpen = true; |
97 | #ifdef QT_THREAD_SUPPORT | 97 | #ifdef QT_THREAD_SUPPORT |
@@ -182,12 +182,13 @@ bool Resource::isActive() const | |||
182 | void Resource::dump() const | 182 | void Resource::dump() const |
183 | { | 183 | { |
184 | qDebug("Resource::dump() "); | 184 | qDebug("Resource::dump() "); |
185 | kdDebug(5650) << "Resource:" << endl; | 185 | kdDebug(5650) << "Resource:" << endl; |
186 | kdDebug(5650) << " Name: " << d->mName << endl; | 186 | kdDebug(5650) << " Name: " << d->mName << endl; |
187 | kdDebug(5650) << " Identifier: " << d->mIdentifier << endl; | 187 | kdDebug(5650) << " Identifier: " << d->mIdentifier << endl; |
188 | kdDebug(5650) << " Type: " << d->mType << endl; | 188 | kdDebug(5650) << " Type: " << d->mType << endl; |
189 | kdDebug(5650) << " OpenCount: " << d->mOpenCount << endl; | 189 | kdDebug(5650) << " OpenCount: " << d->mOpenCount << endl; |
190 | kdDebug(5650) << " ReadOnly: " << ( d->mReadOnly ? "yes" : "no" ) << endl; | 190 | kdDebug(5650) << " ReadOnly: " << ( d->mReadOnly ? "yes" : "no" ) << endl; |
191 | kdDebug(5650) << " Active: " << ( d->mActive ? "yes" : "no" ) << endl; | 191 | kdDebug(5650) << " Active: " << ( d->mActive ? "yes" : "no" ) << endl; |
192 | kdDebug(5650) << " IsOpen: " << ( d->mIsOpen ? "yes" : "no" ) << endl; | 192 | kdDebug(5650) << " IsOpen: " << ( d->mIsOpen ? "yes" : "no" ) << endl; |
193 | } | 193 | } |
194 | |||