[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Fri Mar 11 20:45:05 CET 2005
CVS commit by staikos:
revertlast, re-apply relevant portion of patch
M +14 -17 kstiface_impl.cpp 1.64
--- kdeextragear-2/kst/kst/kstiface_impl.cpp #1.63:1.64
@@ -436,12 +436,12 @@ double KstIfaceImpl::scalar(const QStrin
KstReadLocker ml(&KST::scalarList.lock());
KstScalarList::Iterator it = KST::scalarList.findTag(name);
- double rc = 0.0;
- if (it != KST::scalarList.end()) {
- KstReadLocker l2(*it);
- rc = (*it)->value();
+ if (it == KST::scalarList.end()) {
+ return 0.0;
}
- return rc;
+ KstReadLocker l2(*it);
+
+ return (*it)->value();
}
@@ -450,15 +450,12 @@ bool KstIfaceImpl::setScalar(const QStri
KstReadLocker ml(&KST::scalarList.lock());
KstScalarList::Iterator it = KST::scalarList.findTag(name);
- bool rc = false;
- if (it != KST::scalarList.end()) {
- if ((*it)->editable()) {
- KstWriteLocker l2(*it);
- *(*it) = value;
- rc = true;
- }
+ if (it == KST::scalarList.end()) {
+ return false;
}
- return rc;
+ KstWriteLocker l2(*it);
+ *(*it) = value;
+ return true;
}
More information about the Kst
mailing list