Diffstat (limited to 'microkde/kresources/factory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/factory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp index 7a5c2f6..e44fce3 100644 --- a/microkde/kresources/factory.cpp +++ b/microkde/kresources/factory.cpp | |||
@@ -166,72 +166,72 @@ ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent ) | |||
166 | if ( !factory ) { | 166 | if ( !factory ) { |
167 | qDebug("KRES::Factory::configWidget(): Factory creation failed for library %s", pi->library.latin1()); | 167 | qDebug("KRES::Factory::configWidget(): Factory creation failed for library %s", pi->library.latin1()); |
168 | kdDebug() << "KRES::Factory::configWidget(): Factory creation failed" << endl; | 168 | kdDebug() << "KRES::Factory::configWidget(): Factory creation failed" << endl; |
169 | return 0; | 169 | return 0; |
170 | } | 170 | } |
171 | 171 | ||
172 | PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory ); | 172 | PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory ); |
173 | 173 | ||
174 | if ( !pluginFactory ) { | 174 | if ( !pluginFactory ) { |
175 | qDebug("KRES::Factory::configWidget(): no plugin factory for library %s", pi->library.latin1()); | 175 | qDebug("KRES::Factory::configWidget(): no plugin factory for library %s", pi->library.latin1()); |
176 | kdDebug() << "KRES::Factory::configWidget(): no plugin factory." << endl; | 176 | kdDebug() << "KRES::Factory::configWidget(): no plugin factory." << endl; |
177 | return 0; | 177 | return 0; |
178 | } | 178 | } |
179 | 179 | ||
180 | ConfigWidget *wdg = pluginFactory->configWidget( parent ); | 180 | ConfigWidget *wdg = pluginFactory->configWidget( parent ); |
181 | if ( !wdg ) { | 181 | if ( !wdg ) { |
182 | //US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl; | 182 | //US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl; |
183 | qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1()); | 183 | qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1()); |
184 | return 0; | 184 | return 0; |
185 | } | 185 | } |
186 | return wdg; | 186 | return wdg; |
187 | 187 | ||
188 | } | 188 | } |
189 | 189 | ||
190 | SyncWidget *Factory::syncWidget( const QString& type, QWidget *parent ) | 190 | SyncWidgetContainer *Factory::syncWidgetContainer( const QString& type ) |
191 | { | 191 | { |
192 | if ( type.isEmpty() || !mTypeMap.contains( type ) ) | 192 | if ( type.isEmpty() || !mTypeMap.contains( type ) ) |
193 | return 0; | 193 | return 0; |
194 | 194 | ||
195 | //US KService::Ptr ptr = mTypeMap[ type ]; | 195 | //US KService::Ptr ptr = mTypeMap[ type ]; |
196 | //US KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() ); | 196 | //US KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() ); |
197 | PluginInfo* pi = mTypeMap[ type ]; | 197 | PluginInfo* pi = mTypeMap[ type ]; |
198 | KLibFactory *factory = (KLibFactory *)KLibLoader::self()->factory( pi->library.latin1() ); | 198 | KLibFactory *factory = (KLibFactory *)KLibLoader::self()->factory( pi->library.latin1() ); |
199 | if ( !factory ) { | 199 | if ( !factory ) { |
200 | qDebug("KRES::Factory::syncWidget(): Factory creation failed for library %s", pi->library.latin1()); | 200 | qDebug("KRES::Factory::syncWidget(): Factory creation failed for library %s", pi->library.latin1()); |
201 | kdDebug() << "KRES::Factory::syncWidget(): Factory creation failed" << endl; | 201 | kdDebug() << "KRES::Factory::syncWidget(): Factory creation failed" << endl; |
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | 204 | ||
205 | PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory ); | 205 | PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory ); |
206 | 206 | ||
207 | if ( !pluginFactory ) { | 207 | if ( !pluginFactory ) { |
208 | qDebug("KRES::Factory::syncWidget(): no plugin factory for library %s", pi->library.latin1()); | 208 | qDebug("KRES::Factory::syncWidget(): no plugin factory for library %s", pi->library.latin1()); |
209 | kdDebug() << "KRES::Factory::syncWidget(): no plugin factory." << endl; | 209 | kdDebug() << "KRES::Factory::syncWidget(): no plugin factory." << endl; |
210 | return 0; | 210 | return 0; |
211 | } | 211 | } |
212 | 212 | ||
213 | SyncWidget *wdg = pluginFactory->syncWidget( parent ); | 213 | SyncWidgetContainer *wdg = pluginFactory->syncWidgetContainer( ); |
214 | if ( !wdg ) { | 214 | if ( !wdg ) { |
215 | //US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl; | 215 | //US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl; |
216 | qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1()); | 216 | qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1()); |
217 | return 0; | 217 | return 0; |
218 | } | 218 | } |
219 | return wdg; | 219 | return wdg; |
220 | 220 | ||
221 | } | 221 | } |
222 | 222 | ||
223 | 223 | ||
224 | QString Factory::typeName( const QString &type ) const | 224 | QString Factory::typeName( const QString &type ) const |
225 | { | 225 | { |
226 | if ( type.isEmpty() || !mTypeMap.contains( type ) ) | 226 | if ( type.isEmpty() || !mTypeMap.contains( type ) ) |
227 | return QString(); | 227 | return QString(); |
228 | 228 | ||
229 | 229 | ||
230 | //US KService::Ptr ptr = mTypeMap[ type ]; | 230 | //US KService::Ptr ptr = mTypeMap[ type ]; |
231 | //US return ptr->name(); | 231 | //US return ptr->name(); |
232 | PluginInfo* pi = mTypeMap[ type ]; | 232 | PluginInfo* pi = mTypeMap[ type ]; |
233 | return pi->nameLabel; | 233 | return pi->nameLabel; |
234 | 234 | ||
235 | } | 235 | } |
236 | 236 | ||
237 | QString Factory::typeDescription( const QString &type ) const | 237 | QString Factory::typeDescription( const QString &type ) const |