another class of API warts found and fixed thanks to documenting: isFoo -> foo for properties

svn path=/trunk/KDE/kdebase/runtime/; revision=1081161
This commit is contained in:
Aaron J. Seigo 2010-01-27 21:06:03 +00:00
parent 3c299a6678
commit 52eacdf240
7 changed files with 27 additions and 27 deletions

View File

@ -100,9 +100,9 @@ static QScriptValue alpha(QScriptContext *ctx, QScriptEngine *eng)
return QScriptValue(eng, self->alpha());
}
static QScriptValue isValid(QScriptContext *ctx, QScriptEngine *eng)
static QScriptValue valid(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QColor, isValid);
DECLARE_SELF(QColor, valid);
return QScriptValue(eng, self->isValid());
}
@ -115,7 +115,7 @@ QScriptValue constructColorClass(QScriptEngine *eng)
proto.setProperty("green", eng->newFunction(green), getter | setter);
proto.setProperty("blue", eng->newFunction(blue), getter | setter);
proto.setProperty("alpha", eng->newFunction(alpha), getter | setter);
proto.setProperty("isValid", eng->newFunction(isValid), getter);
proto.setProperty("valid", eng->newFunction(valid), getter);
eng->setDefaultPrototype(qMetaTypeId<QColor>(), proto);
eng->setDefaultPrototype(qMetaTypeId<QColor*>(), proto);

View File

@ -585,9 +585,9 @@ static QScriptValue hasClipping(QScriptContext *ctx, QScriptEngine *eng)
/////////////////////////////////////////////////////////////
static QScriptValue isActive(QScriptContext *ctx, QScriptEngine *eng)
static QScriptValue active(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QPainter, isActive);
DECLARE_SELF(QPainter, active);
return QScriptValue(eng, self->isActive());
}
@ -1092,7 +1092,7 @@ QScriptValue constructPainterClass(QScriptEngine *eng)
proto.setProperty("combinedMatrix", eng->newFunction(combinedMatrix), getter);
proto.setProperty("combinedTransform", eng->newFunction(combinedTransform), getter);
proto.setProperty("isActive", eng->newFunction(isActive), getter);
proto.setProperty("active", eng->newFunction(active), getter);
ADD_METHOD(proto, begin);
ADD_METHOD(proto, end);

View File

@ -126,9 +126,9 @@ static QScriptValue width(QScriptContext *ctx, QScriptEngine *eng)
return QScriptValue(eng, self->width());
}
static QScriptValue isSolid(QScriptContext *ctx, QScriptEngine *eng)
static QScriptValue solid(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QPen, isSolid);
DECLARE_SELF(QPen, solid);
return QScriptValue(eng, self->isSolid());
}
@ -145,7 +145,7 @@ QScriptValue constructPenClass(QScriptEngine *eng)
proto.setProperty("dashOffset", eng->newFunction(dashOffset), getter | setter);
proto.setProperty("miterLimit", eng->newFunction(miterLimit), getter | setter);
proto.setProperty("width", eng->newFunction(width), getter | setter);
proto.setProperty("isSolid", eng->newFunction(isSolid), getter);
proto.setProperty("solid", eng->newFunction(solid), getter);
QScriptValue ctorFun = eng->newFunction(ctor, proto);
ADD_ENUM_VALUE(ctorFun, Qt, FlatCap);

View File

@ -48,9 +48,9 @@ static QScriptValue rect(QScriptContext *ctx, QScriptEngine *eng)
return qScriptValueFromValue(eng, QRectF(self->rect()));
}
static QScriptValue isNull(QScriptContext *ctx, QScriptEngine *eng)
static QScriptValue null(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QPixmap, isNull);
DECLARE_SELF(QPixmap, null);
return QScriptValue(eng, self->isNull());
}
@ -67,7 +67,7 @@ QScriptValue constructQPixmapClass(QScriptEngine *eng)
QScriptValue proto = qScriptValueFromValue(eng, QPixmap());
QScriptValue::PropertyFlags getter = QScriptValue::PropertyGetter;
QScriptValue::PropertyFlags setter = QScriptValue::PropertySetter;
proto.setProperty("isNull", eng->newFunction(isNull), getter);
proto.setProperty("null", eng->newFunction(null), getter);
proto.setProperty("rect", eng->newFunction(rect), getter);
proto.setProperty("scaled", eng->newFunction(scaled), getter);

View File

@ -37,9 +37,9 @@ static QScriptValue ctor(QScriptContext *ctx, QScriptEngine *eng)
return qScriptValueFromValue(eng, QPoint());
}
static QScriptValue isNull(QScriptContext *ctx, QScriptEngine *eng)
static QScriptValue null(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QPoint, isNull);
DECLARE_SELF(QPoint, null);
return QScriptValue(eng, self->isNull());
}
@ -79,7 +79,7 @@ QScriptValue constructQPointClass(QScriptEngine *eng)
QScriptValue::PropertyFlags getter = QScriptValue::PropertyGetter;
QScriptValue::PropertyFlags setter = QScriptValue::PropertySetter;
proto.setProperty("isNull", eng->newFunction(isNull), getter);
proto.setProperty("null", eng->newFunction(null), getter);
proto.setProperty("manhattanLength", eng->newFunction(manhattanLength), getter);
proto.setProperty("x", eng->newFunction(x), getter | setter);
proto.setProperty("y", eng->newFunction(y), getter | setter);

View File

@ -107,21 +107,21 @@ static QScriptValue height(QScriptContext *ctx, QScriptEngine *eng)
return QScriptValue(eng, self->height());
}
static QScriptValue isEmpty(QScriptContext *ctx, QScriptEngine *eng)
static QScriptValue empty(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QRectF, isEmpty);
DECLARE_SELF(QRectF, empty);
return QScriptValue(eng, self->isEmpty());
}
static QScriptValue isNull(QScriptContext *ctx, QScriptEngine *eng)
static QScriptValue null(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QRectF, isNull);
DECLARE_SELF(QRectF, null);
return QScriptValue(eng, self->isNull());
}
static QScriptValue isValid(QScriptContext *ctx, QScriptEngine *eng)
static QScriptValue valid(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QRectF, isValid);
DECLARE_SELF(QRectF, valid);
return QScriptValue(eng, self->isValid());
}
@ -310,9 +310,9 @@ QScriptValue constructQRectFClass(QScriptEngine *eng)
proto.setProperty("moveTo", eng->newFunction(moveTo));
proto.setProperty("moveTop", eng->newFunction(moveTop));
proto.setProperty("isEmpty", eng->newFunction(isEmpty), getter);
proto.setProperty("isNull", eng->newFunction(isNull), getter);
proto.setProperty("isValid", eng->newFunction(isValid), getter);
proto.setProperty("empty", eng->newFunction(empty), getter);
proto.setProperty("null", eng->newFunction(null), getter);
proto.setProperty("valid", eng->newFunction(valid), getter);
proto.setProperty("left", eng->newFunction(left), getter | setter);
proto.setProperty("top", eng->newFunction(top), getter | setter);

View File

@ -42,9 +42,9 @@ static QScriptValue toString(QScriptContext *ctx, QScriptEngine *eng)
.arg(self->interval()));
}
static QScriptValue isActive(QScriptContext *ctx, QScriptEngine *eng)
static QScriptValue active(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QTimer, isActive);
DECLARE_SELF(QTimer, active);
if (ctx->argumentCount()) {
if (ctx->argument(0).toBool()) {
@ -64,7 +64,7 @@ QScriptValue constructTimerClass(QScriptEngine *eng)
eng->setDefaultPrototype(qMetaTypeId<QTimer*>(), proto);
QScriptValue::PropertyFlags getter = QScriptValue::PropertyGetter;
QScriptValue::PropertyFlags setter = QScriptValue::PropertySetter;
proto.setProperty("isActive", eng->newFunction(isActive), getter | setter);
proto.setProperty("active", eng->newFunction(active), getter | setter);
return eng->newFunction(ctor, proto);
}