summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Makefile263
-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
5 files changed, 151 insertions, 152 deletions
diff --git a/Makefile b/Makefile
index 6eb89e7..d770a05 100644
--- a/Makefile
+++ b/Makefile
@@ -1,147 +1,118 @@
-#############################################################################
-# Makefile for building: kopi-desktop
-# Generated by qmake (1.07a) (Qt 3.3.2) on: Wed Jul 7 14:00:48 2004
-# Project: kopi-desktop.pro
-# Template: subdirs
-# Command: $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
-#############################################################################
-
-MAKEFILE = Makefile
-QMAKE = qmake
-DEL_FILE = rm -f
-CHK_DIR_EXISTS= test -d
-MKDIR = mkdir -p
-INSTALL_FILE=
-INSTALL_DIR =
-SUBTARGETS = \
- sub-libical \
- sub-libkcal \
- sub-microkde \
- sub-libkdepim \
- sub-kabc \
- sub-korganizer \
- sub-kaddressbook \
- sub-kabc-plugins-file \
- sub-kabc-plugins-dir
-
-first: all
-
-all: Makefile $(SUBTARGETS)
-
-libical/$(MAKEFILE):
- @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical"
- cd libical && $(QMAKE) libical.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
-sub-libical: libical/$(MAKEFILE) FORCE
- cd libical && $(MAKE) -f $(MAKEFILE)
-
-libkcal/$(MAKEFILE):
- @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal"
- cd libkcal && $(QMAKE) libkcal.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
-sub-libkcal: libkcal/$(MAKEFILE) FORCE
- cd libkcal && $(MAKE) -f $(MAKEFILE)
-
-microkde/$(MAKEFILE):
- @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde"
- cd microkde && $(QMAKE) microkde.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
-sub-microkde: microkde/$(MAKEFILE) FORCE
- cd microkde && $(MAKE) -f $(MAKEFILE)
-
-libkdepim/$(MAKEFILE):
- @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim"
- cd libkdepim && $(QMAKE) libkdepim.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
-sub-libkdepim: libkdepim/$(MAKEFILE) FORCE
- cd libkdepim && $(MAKE) -f $(MAKEFILE)
-
-kabc/$(MAKEFILE):
- @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc"
- cd kabc && $(QMAKE) kabc.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
-sub-kabc: kabc/$(MAKEFILE) FORCE
- cd kabc && $(MAKE) -f $(MAKEFILE)
-
-korganizer/$(MAKEFILE):
- @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer"
- cd korganizer && $(QMAKE) korganizer.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
-sub-korganizer: korganizer/$(MAKEFILE) FORCE
- cd korganizer && $(MAKE) -f $(MAKEFILE)
-
-kaddressbook/$(MAKEFILE):
- @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook"
- cd kaddressbook && $(QMAKE) kaddressbook.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
-sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE
- cd kaddressbook && $(MAKE) -f $(MAKEFILE)
-
-kabc/plugins/file/$(MAKEFILE):
- @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file"
- cd kabc/plugins/file && $(QMAKE) file.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
-sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE
- cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE)
-
-kabc/plugins/dir/$(MAKEFILE):
- @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir"
- cd kabc/plugins/dir && $(QMAKE) dir.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
-sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE
- cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE)
-
-Makefile: kopi-desktop.pro /usr/local/qtgcc/mkspecs/default/qmake.conf
- $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
-qmake: qmake_all
- @$(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
-
-all: $(SUBTARGETS)
-qmake_all: libical/$(MAKEFILE) libkcal/$(MAKEFILE) microkde/$(MAKEFILE) libkdepim/$(MAKEFILE) kabc/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE)
- ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
- ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
- ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
- ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
- ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
- ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
- ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
- ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
- ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
-clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE
- ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true
- ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true
- ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true
- ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true
- ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true
- ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true
- ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true
- ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true
- ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true
-uninstall_subdirs: qmake_all FORCE
- ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
- ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
- ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
- ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
- ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
- ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
- ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
- ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
- ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
-install_subdirs: qmake_all FORCE
- ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true
- ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true
- ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true
- ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true
- ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true
- ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true
- ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true
- ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true
- ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true
-distclean: qmake_all FORCE
- ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
- ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
- ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
- ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
- ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
- ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
- ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
- ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
- ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
-
-install: install_subdirs
-
-uninstall: uninstall_subdirs
-
-FORCE:
+DISTPATH = $(shell pwd)
+DISTDIR = $(shell basename $(DISTPATH))
+
+SUBDIRS = libical/src/libical libical/src/libicalss qtcompat microkde \
+ libkcal libkdepim kabc kabc/converter/opie kabc/formats/binary kabc/plugins/file kabc/plugins/dir \
+ kabc/plugins/opie \
+ korganizer kalarmd kaddressbook kmicromail/libetpan kmicromail/libmailwrapper kmicromail
+all: tmake
+ for i in $(SUBDIRS); do pushd $$i; \
+ make -f Makefile$(PLATFORM) || exit 1; popd; \
+ done
+
+objects:
+ for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done
+ for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done
+ mkdir -p libical/lib/$(PLATFORM)
+
+clean:
+ rm -f libical/lib/$(PLATFORM)/*;
+ for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\
+ rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \
+ done
+install:
+ cd bin/kdepim; make install
+ cp db2file/db2file $(QPEDIR)/bin/db2file
+ cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop
+ cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kmicromail.desktop
+ cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop
+
+dist:
+ @echo Dont forget to do "make install" before "make dist"
+ rm -f *arm.ipk
+ rm -f *~
+ cd ..; tar czf kdepim.src.tar.gz --exclude=obj --exclude=moc kdepim
+ mkipks kmicrokdelibs.control
+ mkipks korganizer.control
+ mkipks kaddressbook.control
+ mkipks kopiemail.control
+ mkipks korganizer-alarm.control
+
+tmake: objects qtcompat/Makefile$(PLATFORM) microkde/Makefile$(PLATFORM) \
+ libkcal/Makefile$(PLATFORM) \
+ libkdepim/Makefile$(PLATFORM) korganizer/Makefile$(PLATFORM) \
+ kalarmd/Makefile$(PLATFORM) \
+ libical/src/libical/Makefile$(PLATFORM) \
+ libical/src/libicalss/Makefile$(PLATFORM) \
+ kabc/Makefile$(PLATFORM) \
+ kabc/converter/opie/Makefile$(PLATFORM) \
+ kabc/formats/binary/Makefile$(PLATFORM) \
+ kabc/plugins/file/Makefile$(PLATFORM) \
+ kabc/plugins/dir/Makefile$(PLATFORM) \
+ kabc/plugins/ldap/Makefile$(PLATFORM) \
+ kabc/plugins/opie/Makefile$(PLATFORM) \
+ kaddressbook/Makefile$(PLATFORM) \
+ kmicromail/Makefile$(PLATFORM) \
+ kmicromail/libetpan/Makefile$(PLATFORM) \
+ kmicromail/libmailwrapper/Makefile$(PLATFORM)
+
+
+
+qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro
+ cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM)
+
+microkde/Makefile$(PLATFORM): microkde/microkdeE.pro
+ cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM)
+
+libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro
+ cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM)
+
+
+libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro
+ cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM)
+
+kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro
+ cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" kalarmdE.pro -o Makefile$(PLATFORM)
+
+korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro
+ cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" korganizerE.pro -o Makefile$(PLATFORM)
+
+libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro
+ cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalE.pro -o Makefile$(PLATFORM)
+
+libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro
+ cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalssE.pro -o Makefile$(PLATFORM)
+
+kabc/Makefile$(PLATFORM): kabc/kabcE.pro
+ cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcE.pro -o Makefile$(PLATFORM)
+
+kabc/converter/opie/Makefile$(PLATFORM): kabc/converter/opie/opieconverterE.pro
+ cd kabc/converter/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieconverterE.pro -o Makefile$(PLATFORM)
+
+kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro
+ cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcformat_binaryE.pro -o Makefile$(PLATFORM)
+
+kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/kabc_fileE.pro
+ cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" kabc_fileE.pro -o Makefile$(PLATFORM)
+
+kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/kabc_dirE.pro
+ cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" kabc_dirE.pro -o Makefile$(PLATFORM)
+
+kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/kabc_ldapE.pro
+ cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" kabc_ldapE.pro -o Makefile$(PLATFORM)
+
+kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/kabc_opieE.pro
+ cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" kabc_opieE.pro -o Makefile$(PLATFORM)
+
+
+kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro
+ cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM)
+
+
+kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro
+ cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.pro -o Makefile$(PLATFORM)
+kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro
+ cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM)
+kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro
+ cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.pro -o Makefile$(PLATFORM)
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index 737b3f2..4cbec94 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -9,31 +9,43 @@
#include "kconfig.h"
QString KConfig::mGroup = "";
//QString KConfig::mGroup = "General";
KConfig::KConfig( const QString &fileName )
: mFileName( fileName ), mDirty( false )
{
- kdDebug() << "KConfig::KConfig(): '" << fileName << "'" << endl;
+ mTempGroup = "";
load();
}
KConfig::~KConfig()
{
sync();
}
+// 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;
+}
void KConfig::setGroup( const QString &group )
{
- kdDebug() << "KConfig::setGroup(): '" << group << "'" << endl;
+
mGroup = group;
if ( mGroup.right( 1 ) != "/" ) mGroup += "/";
}
//US
QString KConfig::group() const {
@@ -64,17 +76,17 @@ QValueList<int> KConfig::readIntListEntry( const QString & key)
if (ok == false) {
qDebug("KConfig::readIntListEntry str=%s , int=%n:", (*sit).latin1(), &val);
ok2 = false;
}
}
if (ok2 == false)
{
- kdDebug() << "KConfig::readIntListEntry: error while reading one of the intvalues." << endl;
+
qDebug("KConfig::readIntListEntry: error while reading one of the intvalues.");
}
return result;
}
int KConfig::readNumEntry( const QString & key, int def )
{
@@ -222,17 +234,17 @@ void KConfig::writeEntry( const QString & e , const QFont & f )
void KConfig::writeEntry( const QString &key, const QDateTime &dt )
{
mDateTimeMap.insert( mGroup + key, dt );
}
void KConfig::load()
{
- kdDebug() << "KConfig::load(): " << mFileName << endl;
+
QFile f( mFileName );
if ( !f.open( IO_ReadOnly ) ) {
qDebug("KConfig: could not open file %s ",mFileName.latin1() );
return;
}
mBoolMap.clear();
diff --git a/microkde/kconfig.h b/microkde/kconfig.h
index bfedf53..a01b1a5 100644
--- a/microkde/kconfig.h
+++ b/microkde/kconfig.h
@@ -10,16 +10,19 @@
#include <qdatetime.h>
class KConfig
{
public:
KConfig( const QString & );
~KConfig();
+ void setTempGroup( const QString &group );
+ QString tempGroup() const;
+
void setGroup( const QString & );
//US
/**
* Returns the name of the group in which we are
* searching for keys and from which we are retrieving entries.
*
* @return The current group.
@@ -82,16 +85,17 @@ class KConfig
void deleteEntry( const QString &);
void load();
void sync();
private:
static QString mGroup;
+ QString mTempGroup;
QString mFileName;
QMap<QString,bool> mBoolMap;
QMap<QString,QString> mStringMap;
QMap<QString,QDateTime> mDateTimeMap;
bool mDirty;
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
@@ -248,22 +248,27 @@ void ManagerImpl::setListener( ManagerImplListener *listener )
Resource* ManagerImpl::readResourceConfig( const QString& identifier,
bool checkActive )
{
kdDebug() << "ManagerImpl::readResourceConfig() " << identifier << endl;
// qDebug("ManagerImpl::readResourceConfig() %s", identifier.latin1());
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" );
QString name = mConfig->readEntry( "ResourceName" );
Resource *resource = mFactory->resource( type, mConfig );
if ( !resource ) {
- kdDebug(5650) << "Failed to create resource with id " << identifier << endl;
+ qDebug("Failed to create resource with id %s ",identifier.latin1() );
return 0;
}
if ( resource->identifier().isEmpty() )
resource->setIdentifier( identifier );
mConfig->setGroup( "General" );
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
@@ -48,16 +48,23 @@ 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;
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 );
d->mIdentifier = cfg->readEntry( "ResourceIdentifier" );
} else {
d->mType = "type";
d->mName = "resource-name";