Diffstat (limited to 'microkde/kresources/factory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/factory.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp index 56b0ef3..827ec38 100644 --- a/microkde/kresources/factory.cpp +++ b/microkde/kresources/factory.cpp | |||
@@ -35,17 +35,17 @@ | |||
35 | 35 | ||
36 | using namespace KRES; | 36 | using namespace KRES; |
37 | 37 | ||
38 | QDict<Factory> *Factory::mSelves = 0; | 38 | QDict<Factory> *Factory::mSelves = 0; |
39 | static KStaticDeleter< QDict<Factory> > staticDeleter; | 39 | static KStaticDeleter< QDict<Factory> > staticDeleter; |
40 | 40 | ||
41 | Factory *Factory::self( const QString& resourceFamily ) | 41 | Factory *Factory::self( const QString& resourceFamily ) |
42 | { | 42 | { |
43 | kdDebug(5650) << "Factory::self()" << endl; | 43 | |
44 | 44 | ||
45 | Factory *factory = 0; | 45 | Factory *factory = 0; |
46 | if ( !mSelves ) | 46 | if ( !mSelves ) |
47 | { | 47 | { |
48 | mSelves = staticDeleter.setObject( new QDict<Factory> ); | 48 | mSelves = staticDeleter.setObject( new QDict<Factory> ); |
49 | } | 49 | } |
50 | 50 | ||
51 | factory = mSelves->find( resourceFamily ); | 51 | factory = mSelves->find( resourceFamily ); |
@@ -74,29 +74,29 @@ Factory::Factory( const QString& resourceFamily ) : | |||
74 | mTypeMap.insert( type.toString(), *it ); | 74 | mTypeMap.insert( type.toString(), *it ); |
75 | } | 75 | } |
76 | */ | 76 | */ |
77 | 77 | ||
78 | //US new | 78 | //US new |
79 | PluginInfo* info = new PluginInfo; | 79 | PluginInfo* info = new PluginInfo; |
80 | info->library = "microkabc_file"; | 80 | info->library = "microkabc_file"; |
81 | info->nameLabel = i18n( "file" ); | 81 | info->nameLabel = i18n( "file" ); |
82 | info->descriptionLabel = i18n( "No description available." ); | 82 | info->descriptionLabel = i18n( "Choose one file" ); |
83 | mTypeMap.insert( "file", info ); | 83 | mTypeMap.insert( "file", info ); |
84 | 84 | ||
85 | info = new PluginInfo; | 85 | info = new PluginInfo; |
86 | info->library = "microkabc_dir"; | 86 | info->library = "microkabc_dir"; |
87 | info->nameLabel = i18n( "dir" ); | 87 | info->nameLabel = i18n( "dir" ); |
88 | info->descriptionLabel = i18n( "No description available." ); | 88 | info->descriptionLabel = i18n( "Choose a directory with may files" ); |
89 | mTypeMap.insert( "dir", info ); | 89 | mTypeMap.insert( "dir", info ); |
90 | 90 | ||
91 | info = new PluginInfo; | 91 | info = new PluginInfo; |
92 | info->library = "microkabc_ldap"; | 92 | info->library = "microkabc_ldap"; |
93 | info->nameLabel = i18n( "ldap" ); | 93 | info->nameLabel = i18n( "ldap" ); |
94 | info->descriptionLabel = i18n( "No description available." ); | 94 | info->descriptionLabel = i18n( "No description available" ); |
95 | mTypeMap.insert( "ldap", info ); | 95 | mTypeMap.insert( "ldap", info ); |
96 | 96 | ||
97 | //US add opie plugin only, if the library exists | 97 | //US add opie plugin only, if the library exists |
98 | QString libname = "microkabc_opie"; | 98 | QString libname = "microkabc_opie"; |
99 | QString path = KLibLoader::findLibrary( QFile::encodeName( libname ) ); | 99 | QString path = KLibLoader::findLibrary( QFile::encodeName( libname ) ); |
100 | if ( !path.isEmpty() ) | 100 | if ( !path.isEmpty() ) |
101 | { | 101 | { |
102 | info = new PluginInfo; | 102 | info = new PluginInfo; |
@@ -195,17 +195,17 @@ QString Factory::typeDescription( const QString &type ) const | |||
195 | //US KService::Ptr ptr = mTypeMap[ type ]; | 195 | //US KService::Ptr ptr = mTypeMap[ type ]; |
196 | //US return ptr->comment(); | 196 | //US return ptr->comment(); |
197 | PluginInfo* pi = mTypeMap[ type ]; | 197 | PluginInfo* pi = mTypeMap[ type ]; |
198 | return pi->descriptionLabel; | 198 | return pi->descriptionLabel; |
199 | } | 199 | } |
200 | 200 | ||
201 | Resource *Factory::resource( const QString& type, const KConfig *config ) | 201 | Resource *Factory::resource( const QString& type, const KConfig *config ) |
202 | { | 202 | { |
203 | kdDebug() << "Factory::resource( " << type << ", config)" << endl; | 203 | |
204 | 204 | ||
205 | if ( type.isEmpty() || !mTypeMap.contains( type ) ) | 205 | if ( type.isEmpty() || !mTypeMap.contains( type ) ) |
206 | return 0; | 206 | return 0; |
207 | 207 | ||
208 | /*US load the lib not dynamicly. !! | 208 | /*US load the lib not dynamicly. !! |
209 | KService::Ptr ptr = mTypeMap[ type ]; | 209 | KService::Ptr ptr = mTypeMap[ type ]; |
210 | KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() ); | 210 | KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() ); |
211 | if ( !factory ) { | 211 | if ( !factory ) { |