From f3707f1dcc3d42d43c9e6b649a9a68b2e706051e Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 03 Apr 2005 21:03:06 +0000 Subject: static fix --- (limited to 'microkde') 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 @@ -34,6 +34,11 @@ #include "resource.h" #include "factory.h" +#ifdef STATIC_RESOURCES +#include +#include +#include +#endif using namespace KRES; QDict *Factory::mSelves = 0; @@ -219,6 +224,25 @@ Resource *Factory::resource( const QString& type, const KConfig *config ) if ( type.isEmpty() || !mTypeMap.contains( type ) ) 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 ]; KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() ); @@ -253,4 +277,6 @@ Resource *Factory::resource( const QString& type, const KConfig *config ) resource->setType( type ); 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 @@ -40,6 +40,8 @@ $Id$ #include "factory.h" #include "managerimpl.h" + + using namespace KRES; ManagerImpl::ManagerImpl( const QString &family ) diff --git a/microkde/microkde.pro b/microkde/microkde.pro index 9016260..783ec34 100644 --- a/microkde/microkde.pro +++ b/microkde/microkde.pro @@ -1,5 +1,6 @@ TEMPLATE = lib CONFIG += qt warn_on +include( ../variables.pri ) #INCLUDEPATH += $(QTDIR)/include . #DEPENDPATH += $(QTDIR)/include INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio @@ -9,6 +10,12 @@ TARGET = microkde DESTDIR= ../bin DEFINES += DESKTOP_VERSION KDE_QT_ONLY unix : { +staticlib: { +INCLUDEPATH += ../kabc/plugins +DEFINES += STATIC_RESOURCES +} + + OBJECTS_DIR = obj/unix MOC_DIR = moc/unix } @@ -17,7 +24,6 @@ DEFINES += _WIN32_ OBJECTS_DIR = obj/win MOC_DIR = moc/win } -include( ../variables.pri ) -- cgit v0.9.0.2