[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Fri Mar 11 21:05:33 CET 2005
This reversion now allows the user (via DCOP) to change
the value of a non-editable scalar. Was this the intent?
On Friday 11 March 2005 11:45, George Staikos wrote:
> 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;
> }
>
>
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
More information about the Kst
mailing list