[Kst] extragear/graphics/kst/kst/extensions/js
George Staikos
staikos at kde.org
Mon Sep 12 19:06:44 CEST 2005
SVN commit 460006 by staikos:
fix warning
M +3 -2 bind_label.cpp
--- trunk/extragear/graphics/kst/kst/extensions/js/bind_label.cpp #460005:460006
@@ -365,7 +365,8 @@
void KstBindLabel::setDataPrecision(KJS::ExecState *exec, const KJS::Value& value) {
- if (value.type() != KJS::NumberType) {
+ uint i = 0;
+ if (value.type() != KJS::NumberType || !value.toUInt32(i)) {
KJS::Object eobj = KJS::Error::create(exec, KJS::TypeError);
exec->setException(eobj);
return;
@@ -373,7 +374,7 @@
KstViewLabelPtr d = makeLabel(_d);
if (d) {
KstWriteLocker wl(d);
- d->setDataPrecision(value.toNumber(exec));
+ d->setDataPrecision(i);
KstApp::inst()->paintAll(P_PAINT);
}
}
More information about the Kst
mailing list