summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/factory.cpp
Unidiff
Diffstat (limited to 'microkde/kresources/factory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/factory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp
index 86b22b2..4f286d1 100644
--- a/microkde/kresources/factory.cpp
+++ b/microkde/kresources/factory.cpp
@@ -20,59 +20,59 @@
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. 21 Boston, MA 02111-1307, USA.
22*/ 22*/
23 23
24#include <kdebug.h> 24#include <kdebug.h>
25#include <klocale.h> 25#include <klocale.h>
26#include <ksimpleconfig.h> 26#include <ksimpleconfig.h>
27#include <kstandarddirs.h> 27#include <kstandarddirs.h>
28#include <kstaticdeleter.h> 28#include <kstaticdeleter.h>
29//#ifndef DESKTOP_VERSION 29//#ifndef DESKTOP_VERSION
30#include <klibloader.h> 30#include <klibloader.h>
31//#endif 31//#endif
32#include <qfile.h> 32#include <qfile.h>
33 33
34#include "resource.h" 34#include "resource.h"
35#include "factory.h" 35#include "factory.h"
36 36
37#ifdef STATIC_RESOURCES 37#ifdef STATIC_RESOURCES
38#include <file/resourcefile.h> 38#include <file/resourcefile.h>
39#include <dir/resourcedir.h> 39#include <dir/resourcedir.h>
40#include <qtopia/resourceqtopia.h> 40#include <qtopia/resourceqtopia.h>
41#endif 41#endif
42using namespace KRES; 42using namespace KRES;
43 43
44QDict<Factory> *Factory::mSelves = 0; 44Q3Dict<Factory> *Factory::mSelves = 0;
45static KStaticDeleter< QDict<Factory> > staticDeleter; 45static KStaticDeleter< Q3Dict<Factory> > staticDeleter;
46 46
47Factory *Factory::self( const QString& resourceFamily) 47Factory *Factory::self( const QString& resourceFamily)
48{ 48{
49 49
50 50
51 Factory *factory = 0; 51 Factory *factory = 0;
52 if ( !mSelves ) 52 if ( !mSelves )
53 { 53 {
54 mSelves = staticDeleter.setObject( new QDict<Factory> ); 54 mSelves = staticDeleter.setObject( new Q3Dict<Factory> );
55 } 55 }
56 56
57 factory = mSelves->find( resourceFamily ); 57 factory = mSelves->find( resourceFamily );
58 58
59 if ( !factory ) { 59 if ( !factory ) {
60 factory = new Factory( resourceFamily); 60 factory = new Factory( resourceFamily);
61 mSelves->insert( resourceFamily, factory ); 61 mSelves->insert( resourceFamily, factory );
62 } 62 }
63 63
64 return factory; 64 return factory;
65} 65}
66 66
67Factory::Factory( const QString& resourceFamily) : 67Factory::Factory( const QString& resourceFamily) :
68 mResourceFamily( resourceFamily ) 68 mResourceFamily( resourceFamily )
69{ 69{
70//US so far we have three types available for resourceFamily "contact" 70//US so far we have three types available for resourceFamily "contact"
71// and that are "file", "dir", "ldap" 71// and that are "file", "dir", "ldap"
72/*US 72/*US
73 73
74 KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", QString( "[X-KDE-ResourceFamily] == '%1'" ) 74 KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", QString( "[X-KDE-ResourceFamily] == '%1'" )
75 .arg( resourceFamily ) ); 75 .arg( resourceFamily ) );
76 KTrader::OfferList::ConstIterator it; 76 KTrader::OfferList::ConstIterator it;
77 for ( it = plugins.begin(); it != plugins.end(); ++it ) { 77 for ( it = plugins.begin(); it != plugins.end(); ++it ) {
78 QVariant type = (*it)->property( "X-KDE-ResourceType" ); 78 QVariant type = (*it)->property( "X-KDE-ResourceType" );