diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-04-03 12:11:55 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-03 09:22:17 +0200 |
commit | 07d3b18a5fc0b6431cafef57c9df22696e27b805 (patch) | |
tree | a3f506ea82b1db0072aec4fad7287612149ecd49 /src/qml/qml/qqmlboundsignal.cpp | |
parent | 1b6c1c3f85483f1d19375ce44de4e61b7d209f14 (diff) |
Revert "Add QQmlBoundSignalNoParams"
This reverts commit ec7deb3d123bb44b5d57590615a60ed48b1d2860.
Other Qt modules may be relying on QObject::receivers() to
know when there is a QML signal handler for a signal, and
using QQmlNotifierEndpoint in QQmlBoundSignalNoParams breaks
this assumption.
Change-Id: I1b8085254697d909f85a88617eb4e3f258b88950
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r-- | src/qml/qml/qqmlboundsignal.cpp | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index 446bad855a..af63cb122d 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -400,70 +400,6 @@ int QQmlBoundSignalParameters::metaCall(QMetaObject::Call c, int id, void **a) } } -//////////////////////////////////////////////////////////////////////// - -QQmlBoundSignalNoParams::QQmlBoundSignalNoParams(QObject *scope, const QMetaMethod &signal, - QObject *owner) -: m_expression(0), m_owner(owner), m_index(signal.methodIndex()), m_isEvaluating(false) -{ - callback = &subscriptionCallback; - QQmlNotifierEndpoint::connect(scope, m_index); -} - -QQmlBoundSignalNoParams::~QQmlBoundSignalNoParams() -{ - delete m_expression; - m_expression = 0; -} - -int QQmlBoundSignalNoParams::index() const -{ - return m_index; -} - -/*! - Returns the signal expression. -*/ -QQmlBoundSignalExpression *QQmlBoundSignalNoParams::expression() const -{ - return m_expression; -} - -/*! - Sets the signal expression to \a e. Returns the current signal expression, - or null if there is no signal expression. - - The QQmlBoundSignalNoParams instance takes ownership of \a e. The caller is - assumes ownership of the returned QQmlExpression. -*/ -QQmlBoundSignalExpression *QQmlBoundSignalNoParams::setExpression(QQmlBoundSignalExpression *e) -{ - QQmlBoundSignalExpression *rv = m_expression; - m_expression = e; - if (m_expression) m_expression->setNotifyOnValueChanged(false); - return rv; -} - -void QQmlBoundSignalNoParams::subscriptionCallback(QQmlNotifierEndpoint *e) -{ - QQmlBoundSignalNoParams *s = static_cast<QQmlBoundSignalNoParams*>(e); - if (!s->m_expression) - return; - - if (QQmlDebugService::isDebuggingEnabled()) - QV8DebugService::instance()->signalEmitted(QString::fromAscii(s->m_owner->metaObject()->method(s->m_index).signature())); - - QQmlHandlingSignalProfiler prof(s->m_owner, s->m_index, s->m_expression); - - s->m_isEvaluating = true; - if (s->m_expression && s->m_expression->engine()) { - s->m_expression->evaluate(); // evaluate signal expression. - if (s->m_expression && s->m_expression->hasError()) - QQmlEnginePrivate::warning(s->m_expression->engine(), s->m_expression->error()); - } - s->m_isEvaluating = false; -} - QT_END_NAMESPACE #include <qqmlboundsignal.moc> |