summaryrefslogtreecommitdiffstats
path: root/src/script/qscriptextqobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/qscriptextqobject.cpp')
-rw-r--r--src/script/qscriptextqobject.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/script/qscriptextqobject.cpp b/src/script/qscriptextqobject.cpp
index 47c04d4..88fd007 100644
--- a/src/script/qscriptextqobject.cpp
+++ b/src/script/qscriptextqobject.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1420,7 +1420,8 @@ public:
bool addSignalHandler(QObject *sender, int signalIndex,
const QScriptValueImpl &receiver,
const QScriptValueImpl &slot,
- const QScriptValueImpl &senderWrapper = QScriptValueImpl());
+ const QScriptValueImpl &senderWrapper,
+ Qt::ConnectionType type);
bool removeSignalHandler(
QObject *sender, int signalIndex,
const QScriptValueImpl &receiver,
@@ -1741,13 +1742,14 @@ void QScript::QObjectConnectionManager::mark(int generation)
bool QScript::QObjectConnectionManager::addSignalHandler(
QObject *sender, int signalIndex, const QScriptValueImpl &receiver,
- const QScriptValueImpl &function, const QScriptValueImpl &senderWrapper)
+ const QScriptValueImpl &function, const QScriptValueImpl &senderWrapper,
+ Qt::ConnectionType type)
{
if (connections.size() <= signalIndex)
connections.resize(signalIndex+1);
QVector<QObjectConnection> &cs = connections[signalIndex];
int absSlotIndex = m_slotCounter + metaObject()->methodOffset();
- bool ok = QMetaObject::connect(sender, signalIndex, this, absSlotIndex);
+ bool ok = QMetaObject::connect(sender, signalIndex, this, absSlotIndex, type);
if (ok) {
cs.append(QScript::QObjectConnection(m_slotCounter++, receiver, function, senderWrapper));
QMetaMethod signal = sender->metaObject()->method(signalIndex);
@@ -2051,12 +2053,12 @@ bool ExtQMetaObjectData::resolve(const QScriptValueImpl &object,
for (int i = 0; i < meta->enumeratorCount(); ++i) {
QMetaEnum e = meta->enumerator(i);
-
for (int j = 0; j < e.keyCount(); ++j) {
const char *key = e.key(j);
-
if (! qstrcmp (key, name.constData())) {
- member->native(nameId, e.value(j), QScriptValue::ReadOnly);
+ member->native(nameId, e.value(j),
+ QScriptValue::ReadOnly
+ | QScriptValue::Undeletable);
*base = object;
return true;
}
@@ -2176,12 +2178,13 @@ bool QScriptQObjectData::addSignalHandler(QObject *sender,
int signalIndex,
const QScriptValueImpl &receiver,
const QScriptValueImpl &slot,
- const QScriptValueImpl &senderWrapper)
+ const QScriptValueImpl &senderWrapper,
+ Qt::ConnectionType type)
{
if (!m_connectionManager)
m_connectionManager = new QScript::QObjectConnectionManager();
return m_connectionManager->addSignalHandler(
- sender, signalIndex, receiver, slot, senderWrapper);
+ sender, signalIndex, receiver, slot, senderWrapper, type);
}
bool QScriptQObjectData::removeSignalHandler(QObject *sender,