summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/resource.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kresources/resource.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/resource.cpp5
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
QString mName;
bool mActive;
bool mIsOpen;
};
Resource::Resource( const KConfig* config )
: QObject( 0, "" ), d( new ResourcePrivate )
{
d->mOpenCount = 0;
d->mIsOpen = false;
//US compiler claimed that const discards qualifier
- KConfig* cfg = (KConfig*)config;
+ KConfig* cfg = (KConfig*)config;
if ( cfg ) {
#ifdef _WIN32_
// we use plugins on win32. the group is stored in a static variable
// such that group info not available on win32 plugins
// to fix that, it would be a looooot of work
if ( !cfg->tempGroup().isEmpty() )
cfg->setGroup( cfg->tempGroup() );
#endif
d->mType = cfg->readEntry( "ResourceType" );
d->mName = cfg->readEntry( "ResourceName" );
d->mReadOnly = cfg->readBoolEntry( "ResourceIsReadOnly", false );
d->mActive = cfg->readBoolEntry( "ResourceIsActive", true );
@@ -73,25 +73,25 @@ Resource::Resource( const KConfig* config )
d->mIdentifier = KApplication::randomString( 10 );
}
}
Resource::~Resource()
{
delete d;
d = 0;
}
void Resource::writeConfig( KConfig* config )
{
-
+
config->writeEntry( "ResourceType", d->mType );
config->writeEntry( "ResourceName", d->mName );
config->writeEntry( "ResourceIsReadOnly", d->mReadOnly );
config->writeEntry( "ResourceIsActive", d->mActive );
config->writeEntry( "ResourceIdentifier", d->mIdentifier );
}
bool Resource::open()
{
d->mIsOpen = true;
#ifdef QT_THREAD_SUPPORT
@@ -182,12 +182,13 @@ bool Resource::isActive() const
void Resource::dump() const
{
qDebug("Resource::dump() ");
kdDebug(5650) << "Resource:" << endl;
kdDebug(5650) << " Name: " << d->mName << endl;
kdDebug(5650) << " Identifier: " << d->mIdentifier << endl;
kdDebug(5650) << " Type: " << d->mType << endl;
kdDebug(5650) << " OpenCount: " << d->mOpenCount << endl;
kdDebug(5650) << " ReadOnly: " << ( d->mReadOnly ? "yes" : "no" ) << endl;
kdDebug(5650) << " Active: " << ( d->mActive ? "yes" : "no" ) << endl;
kdDebug(5650) << " IsOpen: " << ( d->mIsOpen ? "yes" : "no" ) << endl;
}
+