File patch-r892604.diff of Package kdebase4

Subject: konqueror: Fix load netscape plugins on demand
From: wstephenson@suse.de
Bug: kde:155797
Patch-upstream: 892604
--- apps/nsplugins/nspluginloader.cpp	(revision 892603)
+++ apps/nsplugins/nspluginloader.cpp	(revision 892604)
@@ -78,16 +78,23 @@ NSPluginInstance::NSPluginInstance(QWidg
     if ( cfg.readEntry("demandLoad", false) ) {
         _button = new QPushButton(i18n("Start Plugin"), this);
         _layout->addWidget(_button, 0, 0);
-        connect(_button, SIGNAL(clicked()), this, SLOT(doLoadPlugin()));
+        connect(_button, SIGNAL(clicked()), this, SLOT(loadPlugin()));
         show();
     } else {
         _button = 0;
     }
 }
 
+void NSPluginInstance::loadPlugin()
+{
+    delete _button;
+    _button = 0;
+    doLoadPlugin(width(), height());
+}
+
 
 void NSPluginInstance::doLoadPlugin(int w, int h) {
-    if (!inited) {
+    if (!inited && !_button) {
         delete _button;
         _button = 0L;
         _loader = NSPluginLoader::instance();
--- apps/nsplugins/nspluginloader.h	(revision 892603)
+++ apps/nsplugins/nspluginloader.h	(revision 892604)
@@ -53,8 +53,10 @@ public:
     void javascriptResult(int id, const QString &result);
 
     void pluginResized(int w, int h);
+
 private Q_SLOTS:
-    void doLoadPlugin(int w, int h);
+    void loadPlugin();
+
 protected:
     void resizeEvent(QResizeEvent *event);
     void showEvent(QShowEvent *event);
@@ -66,6 +68,7 @@ private:
     OrgKdeNspluginsInstanceInterface *_instanceInterface;
     bool inited;
     bool haveSize;
+    void doLoadPlugin(int w, int h);
     void embedIfNeeded(int w, int h);
     void resizePlugin(int w, int h );
 
Index: apps/nsplugins/nspluginloader.cpp
===================================================================
Index: apps/nsplugins/nspluginloader.h
===================================================================