summaryrefslogtreecommitdiffstats
path: root/src/script/qscriptenginefwd_p.h
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/qscriptenginefwd_p.h
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/qscriptenginefwd_p.h')
-rw-r--r--src/script/qscriptenginefwd_p.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/script/qscriptenginefwd_p.h b/src/script/qscriptenginefwd_p.h
index 11cd839..62942a5 100644
--- a/src/script/qscriptenginefwd_p.h
+++ b/src/script/qscriptenginefwd_p.h
@@ -385,7 +385,8 @@ public:
bool scriptConnect(QObject *sender, const char *signal,
const QScriptValueImpl &receiver,
- const QScriptValueImpl &function);
+ const QScriptValueImpl &function,
+ Qt::ConnectionType type);
bool scriptDisconnect(QObject *sender, const char *signal,
const QScriptValueImpl &receiver,
const QScriptValueImpl &function);
@@ -393,14 +394,16 @@ public:
bool scriptConnect(QObject *sender, int index,
const QScriptValueImpl &receiver,
const QScriptValueImpl &function,
- const QScriptValueImpl &senderWrapper = QScriptValueImpl());
+ const QScriptValueImpl &senderWrapper,
+ Qt::ConnectionType type);
bool scriptDisconnect(QObject *sender, int index,
const QScriptValueImpl &receiver,
const QScriptValueImpl &function);
bool scriptConnect(const QScriptValueImpl &signal,
const QScriptValueImpl &receiver,
- const QScriptValueImpl &function);
+ const QScriptValueImpl &function,
+ Qt::ConnectionType type);
bool scriptDisconnect(const QScriptValueImpl &signal,
const QScriptValueImpl &receiver,
const QScriptValueImpl &function);