summaryrefslogtreecommitdiffstats
path: root/src/script/qscriptecmafunction.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-06-25 15:25:48 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-06-25 15:32:13 (GMT)
commit47c9e7b1b3551ff6dbe71590461a45ae398a9501 (patch)
treef965ed1cb23bbdb2116dfba945e44b1d2dfc2532 /src/script/qscriptecmafunction.cpp
parent3984253ac58e0cca1c0b94fad1549dd4e0e3c2e1 (diff)
downloadQt-47c9e7b1b3551ff6dbe71590461a45ae398a9501.zip
Qt-47c9e7b1b3551ff6dbe71590461a45ae398a9501.tar.gz
Qt-47c9e7b1b3551ff6dbe71590461a45ae398a9501.tar.bz2
make it possible to support queued connections in qtscript
This change doesn't actually add public API for it, but makes it trivial to add. On the C++ side, qScriptConnect() would get an overload that takes an additional argument, the connection type (d'oh, it should have had a default argument to begin with!). On the script side, it's a bit more tricky to "overload" the existing connect(), since it's already "overloaded" (can have either one or two parameters). Plus, I'd like connect() to be able to support bind-like functionality so you can pass additional arguments to it that will be passed to the signal handler at signal emission time. Oh well, we'll see.
Diffstat (limited to 'src/script/qscriptecmafunction.cpp')
-rw-r--r--src/script/qscriptecmafunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/qscriptecmafunction.cpp b/src/script/qscriptecmafunction.cpp
index 87b0639..0bb5f12 100644
--- a/src/script/qscriptecmafunction.cpp
+++ b/src/script/qscriptecmafunction.cpp
@@ -436,7 +436,7 @@ QScriptValueImpl Function::method_connect(QScriptContextPrivate *context, QScrip
QLatin1String("Function.prototype.connect: target is not a function"));
}
- bool ok = eng->scriptConnect(self, receiver, slot);
+ bool ok = eng->scriptConnect(self, receiver, slot, Qt::AutoConnection);
if (!ok) {
return context->throwError(
QString::fromLatin1("Function.prototype.connect: failed to connect to %0::%1")