-rw-r--r-- | microkde/kresources/factory.cpp | 26 | ||||
-rw-r--r-- | microkde/kresources/managerimpl.cpp | 2 | ||||
-rw-r--r-- | microkde/microkde.pro | 8 |
3 files changed, 35 insertions, 1 deletions
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp index a3b7fff..5fbfa68 100644 --- a/microkde/kresources/factory.cpp +++ b/microkde/kresources/factory.cpp @@ -35,4 +35,9 @@ #include "factory.h" +#ifdef STATIC_RESOURCES +#include <file/resourcefile.h> +#include <dir/resourcedir.h> +#include <qtopia/resourceqtopia.h> +#endif using namespace KRES; @@ -220,4 +225,23 @@ Resource *Factory::resource( const QString& type, const KConfig *config ) return 0; +#ifdef STATIC_RESOURCES + qDebug("NEW STATIC RESOURCE %s", type.latin1()); + Resource *resource = 0; + if ( type == "file" ) { + resource = (Resource *) new KABC::ResourceFile( config ); + } else if ( type == "dir" ) { + resource = new KABC::ResourceDir( config ); + } else if ( type == "qtopia" ) { + resource = new KABC::ResourceQtopia( config ); + } + if ( !resource) + qDebug("Factory::resource:: resources are statically linked. resource type %s is not supported ",type.latin1() ); + else + resource->setType( type ); + return resource; +#else + + + /*US load the lib not dynamicly. !! KService::Ptr ptr = mTypeMap[ type ]; @@ -254,3 +278,5 @@ Resource *Factory::resource( const QString& type, const KConfig *config ) return resource; + +#endif } diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp index 566b8f4..a6d2007 100644 --- a/microkde/kresources/managerimpl.cpp +++ b/microkde/kresources/managerimpl.cpp @@ -41,4 +41,6 @@ $Id$ #include "managerimpl.h" + + using namespace KRES; diff --git a/microkde/microkde.pro b/microkde/microkde.pro index 9016260..783ec34 100644 --- a/microkde/microkde.pro +++ b/microkde/microkde.pro @@ -1,4 +1,5 @@ TEMPLATE = lib CONFIG += qt warn_on +include( ../variables.pri ) #INCLUDEPATH += $(QTDIR)/include . #DEPENDPATH += $(QTDIR)/include @@ -10,4 +11,10 @@ DESTDIR= ../bin DEFINES += DESKTOP_VERSION KDE_QT_ONLY unix : { +staticlib: { +INCLUDEPATH += ../kabc/plugins +DEFINES += STATIC_RESOURCES +} + + OBJECTS_DIR = obj/unix MOC_DIR = moc/unix @@ -18,5 +25,4 @@ OBJECTS_DIR = obj/win MOC_DIR = moc/win } -include( ../variables.pri ) |