[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Oct 26 04:49:31 CEST 2004


CVS commit by staikos: 

temporarily re-add the doLock bool until I find a better solution for this
locking issue


  M +1 -1      kstfilterdialog_i.cpp   1.22
  M +1 -1      kstfitdialog_i.cpp   1.45
  M +1 -1      kstplugindialog_i.cpp   1.94
  M +7 -3      kststring.cpp   1.3
  M +1 -1      kststring.h   1.2


--- kdeextragear-2/kst/kst/kstfilterdialog_i.cpp  #1.21:1.22
@@ -214,5 +214,5 @@ bool KstFilterDialogI::saveInputs(KstPlu
         if (s == *KST::stringList.end()) {
           QString val = ss->_string->currentText();
-          KstStringPtr newString = new KstString(ss->_string->currentText(), val, true);
+          KstStringPtr newString = new KstString(ss->_string->currentText(), val, true, false);
           newString->writeLock(); // to match with plugin->writeLock()
           if (plugin->inputStrings().contains((*it)._name) && plugin->inputStrings()[(*it)._name] != newString) {

--- kdeextragear-2/kst/kst/kstfitdialog_i.cpp  #1.44:1.45
@@ -244,5 +244,5 @@ bool KstFitDialogI::saveInputs(KstPlugin
           QString val = ss->_string->currentText();
 
-          KstStringPtr newString = new KstString(ss->_string->currentText(), val, true);
+          KstStringPtr newString = new KstString(ss->_string->currentText(), val, true, false);
           newString->writeLock(); // to match with plugin->writeLock()
           if (plugin->inputStrings().contains((*it)._name)) {

--- kdeextragear-2/kst/kst/kstplugindialog_i.cpp  #1.93:1.94
@@ -320,5 +320,5 @@ bool KstPluginDialogI::saveInputs(KstPlu
       if (s == *KST::stringList.end()) {
         QString val = ss->_string->currentText();
-        KstStringPtr newString = new KstString(ss->_string->currentText(), val, true);
+        KstStringPtr newString = new KstString(ss->_string->currentText(), val, true, false);
         newString->writeLock(); // to match with plugin->writeLock()
         if (plugin->inputStrings().contains((*it)._name) && plugin->inputStrings()[(*it)._name] != s) {

--- kdeextragear-2/kst/kst/kststring.cpp  #1.2:1.3
@@ -24,5 +24,5 @@
 static int anonymousStringCounter = 0;
 
-KstString::KstString(const QString& in_tag, const QString& val, bool orphan)
+KstString::KstString(const QString& in_tag, const QString& val, bool orphan, bool doLock)
 : KstObject(), _value(val), _orphan(orphan) {
   QString _tag = in_tag;
@@ -40,7 +40,11 @@ KstString::KstString(const QString& in_t
   setTagName(_tag);
 
+  if (doLock) {
   KST::stringList.lock().writeLock();
+  }
   KST::stringList.append(this);
+  if (doLock) {
   KST::stringList.lock().writeUnlock();
+  }
 }
 

--- kdeextragear-2/kst/kst/kststring.h  #1.1:1.2
@@ -26,5 +26,5 @@ class KstString : public KstObject {
   Q_PROPERTY(bool orphan READ orphan WRITE setOrphan)
   public:
-    KstString(const QString& in_tag = QString::null, const QString& val = QString::null, bool orphan = false);
+    KstString(const QString& in_tag = QString::null, const QString& val = QString::null, bool orphan = false, bool doLock = true);
     KstString(QDomElement& e);
     virtual ~KstString();





More information about the Kst mailing list