--- branches/KDE/3.5/kdebase/nsplugins/nspluginloader.cpp 2008/01/21 13:54:17764342 +++ branches/KDE/3.5/kdebase/nsplugins/nspluginloader.cpp 2008/12/04 18:20:21892605 @@ -69,7 +69,7 @@ if (cfg.readBoolEntry("demandLoad", false)) { _button = new QPushButton(i18n("Start Plugin"), dynamic_cast(this)); _layout->addWidget(_button, 0, 0); - connect(_button, SIGNAL(clicked()), this, SLOT(doLoadPlugin())); + connect(_button, SIGNAL(clicked()), this, SLOT(loadPlugin())); show(); } else { _button = 0L; @@ -84,11 +84,15 @@ } } +void NSPluginInstance::loadPlugin() +{ + delete _button; + _button = 0; + doLoadPlugin(); +} void NSPluginInstance::doLoadPlugin() { - if (!inited) { - delete _button; - _button = 0L; + if (!inited && !_button) { _loader = NSPluginLoader::instance(); setBackgroundMode(QWidget::NoBackground); WId winid = stub->winId(); --- branches/KDE/3.5/kdebase/nsplugins/nspluginloader.h 2008/01/21 13:54:17764342 +++ branches/KDE/3.5/kdebase/nsplugins/nspluginloader.h 2008/12/04 18:20:21892605 @@ -55,6 +55,7 @@ void javascriptResult( int id, QString result ) { stub->javascriptResult( id, result ); } private slots: + void loadPlugin(); void doLoadPlugin(); protected: