summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kconfig.cpp20
-rw-r--r--microkde/kconfig.h4
-rw-r--r--microkde/kresources/managerimpl.cpp9
-rw-r--r--microkde/kresources/resource.cpp7
4 files changed, 34 insertions, 6 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index 737b3f2..4cbec94 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -16,4 +16,4 @@ KConfig::KConfig( const QString &fileName )
16{ 16{
17 kdDebug() << "KConfig::KConfig(): '" << fileName << "'" << endl;
18 17
18 mTempGroup = "";
19 load(); 19 load();
@@ -27,2 +27,14 @@ KConfig::~KConfig()
27} 27}
28// we need the temp group for plugins on windows
29void KConfig::setTempGroup( const QString &group )
30{
31 mTempGroup = group;
32
33 if ( mTempGroup.right( 1 ) != "/" ) mTempGroup += "/";
34}
35
36
37QString KConfig::tempGroup() const {
38 return mTempGroup;
39}
28 40
@@ -30,3 +42,3 @@ void KConfig::setGroup( const QString &group )
30{ 42{
31 kdDebug() << "KConfig::setGroup(): '" << group << "'" << endl; 43
32 44
@@ -71,3 +83,3 @@ QValueList<int> KConfig::readIntListEntry( const QString & key)
71 { 83 {
72 kdDebug() << "KConfig::readIntListEntry: error while reading one of the intvalues." << endl; 84
73 qDebug("KConfig::readIntListEntry: error while reading one of the intvalues."); 85 qDebug("KConfig::readIntListEntry: error while reading one of the intvalues.");
@@ -229,3 +241,3 @@ void KConfig::load()
229{ 241{
230 kdDebug() << "KConfig::load(): " << mFileName << endl; 242
231 243
diff --git a/microkde/kconfig.h b/microkde/kconfig.h
index bfedf53..a01b1a5 100644
--- a/microkde/kconfig.h
+++ b/microkde/kconfig.h
@@ -17,2 +17,5 @@ class KConfig
17 17
18 void setTempGroup( const QString &group );
19 QString tempGroup() const;
20
18 void setGroup( const QString & ); 21 void setGroup( const QString & );
@@ -89,2 +92,3 @@ class KConfig
89 static QString mGroup; 92 static QString mGroup;
93 QString mTempGroup;
90 94
diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp
index 1baa6be..785b6b4 100644
--- a/microkde/kresources/managerimpl.cpp
+++ b/microkde/kresources/managerimpl.cpp
@@ -255,3 +255,8 @@ Resource* ManagerImpl::readResourceConfig( const QString& identifier,
255 mConfig->setGroup( "Resource_" + identifier ); 255 mConfig->setGroup( "Resource_" + identifier );
256 256#ifdef _WIN32_
257 // we use plugins on win32. the group is stored in a static variable
258 // such that gourp info not avail on win32 plugins
259 // to fix that, it would be a looooot of work
260 mConfig->setTempGroup( "Resource_" + identifier );
261#endif
257 QString type = mConfig->readEntry( "ResourceType" ); 262 QString type = mConfig->readEntry( "ResourceType" );
@@ -260,3 +265,3 @@ Resource* ManagerImpl::readResourceConfig( const QString& identifier,
260 if ( !resource ) { 265 if ( !resource ) {
261 kdDebug(5650) << "Failed to create resource with id " << identifier << endl; 266 qDebug("Failed to create resource with id %s ",identifier.latin1() );
262 return 0; 267 return 0;
diff --git a/microkde/kresources/resource.cpp b/microkde/kresources/resource.cpp
index 7827a67..991d53d 100644
--- a/microkde/kresources/resource.cpp
+++ b/microkde/kresources/resource.cpp
@@ -55,2 +55,9 @@ Resource::Resource( const KConfig* config )
55 if ( cfg ) { 55 if ( cfg ) {
56#ifdef _WIN32_
57 // we use plugins on win32. the group is stored in a static variable
58 // such that group info not available on win32 plugins
59 // to fix that, it would be a looooot of work
60 if ( !cfg->tempGroup().isEmpty() )
61 cfg->setGroup( cfg->tempGroup() );
62#endif
56 d->mType = cfg->readEntry( "ResourceType" ); 63 d->mType = cfg->readEntry( "ResourceType" );