diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2012-05-18 11:11:40 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-24 17:49:58 +0200 |
commit | 72ac68162e4ab94bb2b62e047a726c119f77df13 (patch) | |
tree | e8f1bc56ef27347837426b10cb1abb5079cdf9cf /src/qml/qml/v4 | |
parent | 59ddedfb6faf040eb052ee25ed7154de1b05eb2c (diff) |
Reduce size of QQmlNotifierEndpoint
Change-Id: I4d4a22f5f3d88d4ad2fcd738753fd8da2d8a9263
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/qml/qml/v4')
-rw-r--r-- | src/qml/qml/v4/qv4bindings.cpp | 10 | ||||
-rw-r--r-- | src/qml/qml/v4/qv4bindings_p.h | 5 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/qml/qml/v4/qv4bindings.cpp b/src/qml/qml/v4/qv4bindings.cpp index 95eb0b9984..39b571f336 100644 --- a/src/qml/qml/v4/qv4bindings.cpp +++ b/src/qml/qml/v4/qv4bindings.cpp @@ -349,9 +349,15 @@ void QV4Bindings::Binding::retargetBinding(QObject *t, int i) target.value().targetProperty = i; } -void QV4Bindings::Subscription::subscriptionCallback(QQmlNotifierEndpoint *e, void **) +QV4Bindings::Subscription::Subscription() +: bindings(0), method(-1) { - Subscription *s = static_cast<Subscription *>(e); + setCallback(QQmlNotifierEndpoint::QV4BindingsSubscription); +} + +void QV4BindingsSubscription_callback(QQmlNotifierEndpoint *e, void **) +{ + QV4Bindings::Subscription *s = static_cast<QV4Bindings::Subscription *>(e); s->bindings->subscriptionNotify(s->method); } diff --git a/src/qml/qml/v4/qv4bindings_p.h b/src/qml/qml/v4/qv4bindings_p.h index be58e02358..d2d8520a83 100644 --- a/src/qml/qml/v4/qv4bindings_p.h +++ b/src/qml/qml/v4/qv4bindings_p.h @@ -117,12 +117,11 @@ private: class Subscription : public QQmlNotifierEndpoint { public: - Subscription() : bindings(0), method(-1) { callback = &subscriptionCallback; } - static void subscriptionCallback(QQmlNotifierEndpoint *e, void**); + inline Subscription(); QV4Bindings *bindings; int method; }; - friend class Subscription; + friend void QV4BindingsSubscription_callback(QQmlNotifierEndpoint *e, void **); Subscription *subscriptions; |