--unecessary duplication
svn path=/trunk/KDE/kdebase/runtime/; revision=1063084
This commit is contained in:
parent
f26351ef58
commit
745dc92f50
@ -42,28 +42,6 @@ static QScriptValue toString(QScriptContext *ctx, QScriptEngine *eng)
|
|||||||
.arg(self->interval()));
|
.arg(self->interval()));
|
||||||
}
|
}
|
||||||
|
|
||||||
static QScriptValue singleShot(QScriptContext *ctx, QScriptEngine *eng)
|
|
||||||
{
|
|
||||||
DECLARE_SELF(QTimer, singleShot);
|
|
||||||
|
|
||||||
if (ctx->argumentCount()) {
|
|
||||||
self->setSingleShot(ctx->argument(0).toBool());
|
|
||||||
}
|
|
||||||
|
|
||||||
return QScriptValue(eng, self->isSingleShot());
|
|
||||||
}
|
|
||||||
|
|
||||||
static QScriptValue interval(QScriptContext *ctx, QScriptEngine *eng)
|
|
||||||
{
|
|
||||||
DECLARE_SELF(QTimer, interval);
|
|
||||||
|
|
||||||
if (ctx->argumentCount()) {
|
|
||||||
self->setInterval(ctx->argument(0).toInt32());
|
|
||||||
}
|
|
||||||
|
|
||||||
return QScriptValue(eng, self->interval());
|
|
||||||
}
|
|
||||||
|
|
||||||
static QScriptValue isActive(QScriptContext *ctx, QScriptEngine *eng)
|
static QScriptValue isActive(QScriptContext *ctx, QScriptEngine *eng)
|
||||||
{
|
{
|
||||||
DECLARE_SELF(QTimer, isActive);
|
DECLARE_SELF(QTimer, isActive);
|
||||||
@ -86,8 +64,6 @@ QScriptValue constructTimerClass(QScriptEngine *eng)
|
|||||||
eng->setDefaultPrototype(qMetaTypeId<QTimer*>(), proto);
|
eng->setDefaultPrototype(qMetaTypeId<QTimer*>(), proto);
|
||||||
QScriptValue::PropertyFlags getter = QScriptValue::PropertyGetter;
|
QScriptValue::PropertyFlags getter = QScriptValue::PropertyGetter;
|
||||||
QScriptValue::PropertyFlags setter = QScriptValue::PropertySetter;
|
QScriptValue::PropertyFlags setter = QScriptValue::PropertySetter;
|
||||||
proto.setProperty("singleShot", eng->newFunction(singleShot), getter | setter);
|
|
||||||
proto.setProperty("interval", eng->newFunction(interval), getter | setter);
|
|
||||||
proto.setProperty("isActive", eng->newFunction(isActive), getter | setter);
|
proto.setProperty("isActive", eng->newFunction(isActive), getter | setter);
|
||||||
|
|
||||||
return eng->newFunction(ctor, proto);
|
return eng->newFunction(ctor, proto);
|
||||||
|
Loading…
Reference in New Issue
Block a user