summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2004-07-08 11:20:17 (UTC)
committer zautrix <zautrix>2004-07-08 11:20:17 (UTC)
commit3f84322a2da502f95be386372da9f75ed17df574 (patch) (side-by-side diff)
tree9a4ccd4568c38d60bb1efa7a6713f4d0914aae86 /microkde
parent40cf8102d2f38b5e952b889ffbd19cb1d428fc9b (diff)
downloadkdepimpi-3f84322a2da502f95be386372da9f75ed17df574.zip
kdepimpi-3f84322a2da502f95be386372da9f75ed17df574.tar.gz
kdepimpi-3f84322a2da502f95be386372da9f75ed17df574.tar.bz2
Fixes for resource plugin handling on wintendo
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kconfig.cpp22
-rw-r--r--microkde/kconfig.h4
-rw-r--r--microkde/kresources/managerimpl.cpp11
-rw-r--r--microkde/kresources/resource.cpp7
4 files changed, 36 insertions, 8 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 )
{
- kdDebug() << "KConfig::KConfig(): '" << fileName << "'" << endl;
-
+
+ mTempGroup = "";
load();
@@ -27,2 +27,14 @@ KConfig::~KConfig()
}
+// we need the temp group for plugins on windows
+void KConfig::setTempGroup( const QString &group )
+{
+ mTempGroup = group;
+
+ if ( mTempGroup.right( 1 ) != "/" ) mTempGroup += "/";
+}
+
+
+QString KConfig::tempGroup() const {
+ return mTempGroup;
+}
@@ -30,3 +42,3 @@ void KConfig::setGroup( const QString &group )
{
- kdDebug() << "KConfig::setGroup(): '" << group << "'" << endl;
+
@@ -71,3 +83,3 @@ QValueList<int> KConfig::readIntListEntry( const QString & key)
{
- kdDebug() << "KConfig::readIntListEntry: error while reading one of the intvalues." << endl;
+
qDebug("KConfig::readIntListEntry: error while reading one of the intvalues.");
@@ -229,3 +241,3 @@ void KConfig::load()
{
- kdDebug() << "KConfig::load(): " << mFileName << endl;
+
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
+ void setTempGroup( const QString &group );
+ QString tempGroup() const;
+
void setGroup( const QString & );
@@ -89,2 +92,3 @@ class KConfig
static QString mGroup;
+ QString mTempGroup;
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,
mConfig->setGroup( "Resource_" + identifier );
-
+#ifdef _WIN32_
+ // we use plugins on win32. the group is stored in a static variable
+ // such that gourp info not avail on win32 plugins
+ // to fix that, it would be a looooot of work
+ mConfig->setTempGroup( "Resource_" + identifier );
+#endif
QString type = mConfig->readEntry( "ResourceType" );
@@ -260,4 +265,4 @@ Resource* ManagerImpl::readResourceConfig( const QString& identifier,
if ( !resource ) {
- kdDebug(5650) << "Failed to create resource with id " << identifier << endl;
- return 0;
+ qDebug("Failed to create resource with id %s ",identifier.latin1() );
+ 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 )
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" );