SkimConfigPlugin::SkimConfigPlugin( QObject *parent, const char *name, const QStringList & /*args*/ ) : SkimPlugin(SkimConfigPluginFactory::instance(), parent, name) { m_configdialog = new ScimSetupWindow(inputServer, "SetupWindow", ScimKdeSettings::self()); connect(m_configdialog, SIGNAL(readyForUnload()), this, SIGNAL(readyForUnload())); }
Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) { //kDebug( 14010 ) << pluginId; KPluginInfo info = infoForPluginId( pluginId ); if ( !info.isValid() ) { kWarning( 14010 ) << "Unable to find a plugin named '" << pluginId << "'!"; return 0L; } if ( _kpmp->loadedPlugins.contains( info ) ) return _kpmp->loadedPlugins[ info ]; QString error; Plugin *plugin = KServiceTypeTrader::createInstanceFromQuery<Plugin>( QString::fromLatin1( "Kopete/Plugin" ), QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, QVariantList(), &error ); if ( plugin ) { _kpmp->loadedPlugins.insert( info, plugin ); info.setPluginEnabled( true ); connect( plugin, SIGNAL(destroyed(QObject*)), this, SLOT(slotPluginDestroyed(QObject*)) ); connect( plugin, SIGNAL(readyForUnload()), this, SLOT(slotPluginReadyForUnload()) ); kDebug( 14010 ) << "Successfully loaded plugin '" << pluginId << "'"; emit pluginLoaded( plugin ); Protocol* protocol = dynamic_cast<Protocol*>( plugin ); if ( protocol ) emit protocolLoaded( protocol ); } else {
void Plugin::aboutToUnload() { // Just make the unload synchronous by default emit readyForUnload(); }
void Plugin::aboutToUnload() { kdDebug() << "plugin unloading" << endl; emit readyForUnload(); }
void ScimSetupWindow::hide() { KCMultiDialog::hide(); emit readyForUnload(); }