[Kst] kdeextragear-2/kst/kst/extensions/js

George Staikos staikos at kde.org
Mon Apr 11 18:18:36 CEST 2005


CVS commit by staikos: 

setColor works now - we will not use an explicit colour object


  M +0 -1      TODO   1.16
  M +1 -1      bind_curve.cpp   1.3


--- kdeextragear-2/kst/kst/extensions/js/TODO  #1.15:1.16
@@ -2,5 +2,4 @@
 - more verbose error messages (ie: which argument is wrong, and why)
 - what should we do for toString()?  It's basically empty in all classes
-- How to use QColor?  (see bind_curve)
 - "delete" support - in order drop references?
 - Possible to create duplicate tagnames with current script code

--- kdeextragear-2/kst/kst/extensions/js/bind_curve.cpp  #1.2:1.3
@@ -408,5 +408,5 @@ KJS::Value KstBindCurve::tagName(KJS::Ex
 void KstBindCurve::setColor(KJS::ExecState *exec, const KJS::Value& value) {
   QVariant cv = KJSEmbed::convertToVariant(exec, value);
-  if (cv.type() != QVariant::Color) {
+  if (!cv.canCast(QVariant::Color)) {
     KJS::Object eobj = KJS::Error::create(exec, KJS::TypeError);
     exec->setException(eobj);




More information about the Kst mailing list