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.cpp38
1 files changed, 2 insertions, 36 deletions
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp
index e44fce3..4e4456d 100644
--- a/microkde/kresources/factory.cpp
+++ b/microkde/kresources/factory.cpp
@@ -189,36 +189,2 @@ ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent )
189 189
190SyncWidgetContainer *Factory::syncWidgetContainer( const QString& type )
191{
192 if ( type.isEmpty() || !mTypeMap.contains( type ) )
193 return 0;
194
195//US KService::Ptr ptr = mTypeMap[ type ];
196//US KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() );
197 PluginInfo* pi = mTypeMap[ type ];
198 KLibFactory *factory = (KLibFactory *)KLibLoader::self()->factory( pi->library.latin1() );
199 if ( !factory ) {
200 qDebug("KRES::Factory::syncWidget(): Factory creation failed for library %s", pi->library.latin1());
201 kdDebug() << "KRES::Factory::syncWidget(): Factory creation failed" << endl;
202 return 0;
203 }
204
205 PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory );
206
207 if ( !pluginFactory ) {
208 qDebug("KRES::Factory::syncWidget(): no plugin factory for library %s", pi->library.latin1());
209 kdDebug() << "KRES::Factory::syncWidget(): no plugin factory." << endl;
210 return 0;
211 }
212
213 SyncWidgetContainer *wdg = pluginFactory->syncWidgetContainer( );
214 if ( !wdg ) {
215//US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl;
216 qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1());
217 return 0;
218 }
219 return wdg;
220
221}
222
223
224QString Factory::typeName( const QString &type ) const 190QString Factory::typeName( const QString &type ) const
@@ -247,3 +213,3 @@ QString Factory::typeDescription( const QString &type ) const
247 213
248Resource *Factory::resource( const QString& type, const KConfig *config, bool syncable ) 214Resource *Factory::resource( const QString& type, const KConfig *config )
249{ 215{
@@ -278,3 +244,3 @@ Resource *Factory::resource( const QString& type, const KConfig *config, bool sy
278 244
279 Resource *resource = pluginFactory->resource( config, syncable ); 245 Resource *resource = pluginFactory->resource( config );
280 if ( !resource ) { 246 if ( !resource ) {