author | zautrix <zautrix> | 2005-04-03 21:03:06 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-03 21:03:06 (UTC) |
commit | f3707f1dcc3d42d43c9e6b649a9a68b2e706051e (patch) (unidiff) | |
tree | cad8019b110d59bd76a2901494259f2971c160b7 /microkde | |
parent | 2d83daf3568bb829db2530baa917db5a4cbf0768 (diff) | |
download | kdepimpi-f3707f1dcc3d42d43c9e6b649a9a68b2e706051e.zip kdepimpi-f3707f1dcc3d42d43c9e6b649a9a68b2e706051e.tar.gz kdepimpi-f3707f1dcc3d42d43c9e6b649a9a68b2e706051e.tar.bz2 |
static fix
-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 | |||
@@ -34,6 +34,11 @@ | |||
34 | #include "resource.h" | 34 | #include "resource.h" |
35 | #include "factory.h" | 35 | #include "factory.h" |
36 | 36 | ||
37 | #ifdef STATIC_RESOURCES | ||
38 | #include <file/resourcefile.h> | ||
39 | #include <dir/resourcedir.h> | ||
40 | #include <qtopia/resourceqtopia.h> | ||
41 | #endif | ||
37 | using namespace KRES; | 42 | using namespace KRES; |
38 | 43 | ||
39 | QDict<Factory> *Factory::mSelves = 0; | 44 | QDict<Factory> *Factory::mSelves = 0; |
@@ -219,6 +224,25 @@ Resource *Factory::resource( const QString& type, const KConfig *config ) | |||
219 | if ( type.isEmpty() || !mTypeMap.contains( type ) ) | 224 | if ( type.isEmpty() || !mTypeMap.contains( type ) ) |
220 | return 0; | 225 | return 0; |
221 | 226 | ||
227 | #ifdef STATIC_RESOURCES | ||
228 | qDebug("NEW STATIC RESOURCE %s", type.latin1()); | ||
229 | Resource *resource = 0; | ||
230 | if ( type == "file" ) { | ||
231 | resource = (Resource *) new KABC::ResourceFile( config ); | ||
232 | } else if ( type == "dir" ) { | ||
233 | resource = new KABC::ResourceDir( config ); | ||
234 | } else if ( type == "qtopia" ) { | ||
235 | resource = new KABC::ResourceQtopia( config ); | ||
236 | } | ||
237 | if ( !resource) | ||
238 | qDebug("Factory::resource:: resources are statically linked. resource type %s is not supported ",type.latin1() ); | ||
239 | else | ||
240 | resource->setType( type ); | ||
241 | return resource; | ||
242 | #else | ||
243 | |||
244 | |||
245 | |||
222 | /*US load the lib not dynamicly. !! | 246 | /*US load the lib not dynamicly. !! |
223 | KService::Ptr ptr = mTypeMap[ type ]; | 247 | KService::Ptr ptr = mTypeMap[ type ]; |
224 | KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() ); | 248 | KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() ); |
@@ -253,4 +277,6 @@ Resource *Factory::resource( const QString& type, const KConfig *config ) | |||
253 | resource->setType( type ); | 277 | resource->setType( type ); |
254 | 278 | ||
255 | return resource; | 279 | return resource; |
280 | |||
281 | #endif | ||
256 | } | 282 | } |
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$ | |||
40 | #include "factory.h" | 40 | #include "factory.h" |
41 | #include "managerimpl.h" | 41 | #include "managerimpl.h" |
42 | 42 | ||
43 | |||
44 | |||
43 | using namespace KRES; | 45 | using namespace KRES; |
44 | 46 | ||
45 | ManagerImpl::ManagerImpl( const QString &family ) | 47 | 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 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | include( ../variables.pri ) | ||
3 | #INCLUDEPATH += $(QTDIR)/include . | 4 | #INCLUDEPATH += $(QTDIR)/include . |
4 | #DEPENDPATH += $(QTDIR)/include | 5 | #DEPENDPATH += $(QTDIR)/include |
5 | INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio | 6 | INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio |
@@ -9,6 +10,12 @@ TARGET = microkde | |||
9 | DESTDIR= ../bin | 10 | DESTDIR= ../bin |
10 | DEFINES += DESKTOP_VERSION KDE_QT_ONLY | 11 | DEFINES += DESKTOP_VERSION KDE_QT_ONLY |
11 | unix : { | 12 | unix : { |
13 | staticlib: { | ||
14 | INCLUDEPATH += ../kabc/plugins | ||
15 | DEFINES += STATIC_RESOURCES | ||
16 | } | ||
17 | |||
18 | |||
12 | OBJECTS_DIR = obj/unix | 19 | OBJECTS_DIR = obj/unix |
13 | MOC_DIR = moc/unix | 20 | MOC_DIR = moc/unix |
14 | } | 21 | } |
@@ -17,7 +24,6 @@ DEFINES += _WIN32_ | |||
17 | OBJECTS_DIR = obj/win | 24 | OBJECTS_DIR = obj/win |
18 | MOC_DIR = moc/win | 25 | MOC_DIR = moc/win |
19 | } | 26 | } |
20 | include( ../variables.pri ) | ||
21 | 27 | ||
22 | 28 | ||
23 | 29 | ||