summaryrefslogtreecommitdiffstats
path: root/src/script/bridge
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-24 11:07:11 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-24 11:09:50 (GMT)
commit293fc4d4b4eb4caa5f50efe23252fe7d93b28df4 (patch)
tree5aace719430a8891e422d974328d1e8af3973189 /src/script/bridge
parent05254db72eaba7e3394f2c788b259ec29a26d640 (diff)
downloadQt-293fc4d4b4eb4caa5f50efe23252fe7d93b28df4.zip
Qt-293fc4d4b4eb4caa5f50efe23252fe7d93b28df4.tar.gz
Qt-293fc4d4b4eb4caa5f50efe23252fe7d93b28df4.tar.bz2
use QVarLengthArray instead of QVector for holding JS arguments
It's faster. Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/script/bridge')
-rw-r--r--src/script/bridge/qscriptqobject.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index d45a6d8..34e6504 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -2022,8 +2022,7 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv)
int argc = parameterTypes.count();
JSC::ExecState *exec = engine->currentFrame;
- QVector<JSC::JSValue> argsVector;
- argsVector.resize(argc);
+ QVarLengthArray<JSC::JSValue, 8> argsVector(argc);
for (int i = 0; i < argc; ++i) {
// ### optimize -- no need to convert via QScriptValue
QScriptValue actual;