[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Tue Feb 7 11:36:45 CET 2006


SVN commit 506625 by staikos:

Fix deadlock discovered by Marc-Antoine and others, patch by me, tested and
approved by Marc-Antoine.


 M  +9 -5      kstplugindialog_i.cpp  


--- trunk/extragear/graphics/kst/kst/kstplugindialog_i.cpp #506624:506625
@@ -158,17 +158,21 @@
     pp->readUnlock();
     return;
   }
-  _tagName->setText(pp->tagName());
+  const QString pluginName(pp->tagName());
+  const QString pluginObjectName(pp->plugin()->data()._name);
+  const int usage = pp->getUsage();
+  KstSharedPtr<Plugin> plug = pp->plugin();
+  pp->readUnlock();
 
+  _tagName->setText(pluginName);
   updatePluginList();
 
-  int i = _pluginList.findIndex(pp->plugin()->data()._name);
+  int i = _pluginList.findIndex(pluginObjectName);
   _w->PluginCombo->setCurrentItem(i);
   pluginChanged(_w->PluginCombo->currentItem());
 
-  fillVectorScalarCombos(pp->plugin());
-  _w->PluginCombo->setEnabled(pp->getUsage() < 3);
-  pp->readUnlock();
+  fillVectorScalarCombos(plug);
+  _w->PluginCombo->setEnabled(usage < 3);
 
   fixupLayout();
 }


More information about the Kst mailing list