summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/factory.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kresources/factory.cpp') (more/less context) (show 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
@@ -184,46 +184,12 @@ ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent )
return 0;
}
return wdg;
}
-SyncWidgetContainer *Factory::syncWidgetContainer( const QString& type )
-{
- if ( type.isEmpty() || !mTypeMap.contains( type ) )
- return 0;
-
-//US KService::Ptr ptr = mTypeMap[ type ];
-//US KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() );
- PluginInfo* pi = mTypeMap[ type ];
- KLibFactory *factory = (KLibFactory *)KLibLoader::self()->factory( pi->library.latin1() );
- if ( !factory ) {
- qDebug("KRES::Factory::syncWidget(): Factory creation failed for library %s", pi->library.latin1());
- kdDebug() << "KRES::Factory::syncWidget(): Factory creation failed" << endl;
- return 0;
- }
-
- PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory );
-
- if ( !pluginFactory ) {
- qDebug("KRES::Factory::syncWidget(): no plugin factory for library %s", pi->library.latin1());
- kdDebug() << "KRES::Factory::syncWidget(): no plugin factory." << endl;
- return 0;
- }
-
- SyncWidgetContainer *wdg = pluginFactory->syncWidgetContainer( );
- if ( !wdg ) {
-//US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl;
- qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1());
- return 0;
- }
- return wdg;
-
-}
-
-
QString Factory::typeName( const QString &type ) const
{
if ( type.isEmpty() || !mTypeMap.contains( type ) )
return QString();
@@ -242,13 +208,13 @@ QString Factory::typeDescription( const QString &type ) const
//US KService::Ptr ptr = mTypeMap[ type ];
//US return ptr->comment();
PluginInfo* pi = mTypeMap[ type ];
return pi->descriptionLabel;
}
-Resource *Factory::resource( const QString& type, const KConfig *config, bool syncable )
+Resource *Factory::resource( const QString& type, const KConfig *config )
{
if ( type.isEmpty() || !mTypeMap.contains( type ) )
return 0;
@@ -273,13 +239,13 @@ Resource *Factory::resource( const QString& type, const KConfig *config, bool sy
if ( !pluginFactory ) {
qDebug("KRES::Factory::resource(): no plugin factory for library %s", pi->library.latin1());
kdDebug() << "KRES::Factory::resource(): no plugin factory." << endl;
return 0;
}
- Resource *resource = pluginFactory->resource( config, syncable );
+ Resource *resource = pluginFactory->resource( config );
if ( !resource ) {
//US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl;
qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1());
return 0;
}