diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-06-25 15:25:48 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-06-25 15:32:13 (GMT) |
commit | 47c9e7b1b3551ff6dbe71590461a45ae398a9501 (patch) | |
tree | f965ed1cb23bbdb2116dfba945e44b1d2dfc2532 /src/script/qscriptenginefwd_p.h | |
parent | 3984253ac58e0cca1c0b94fad1549dd4e0e3c2e1 (diff) | |
download | Qt-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.h | 9 |
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); |