diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-05-03 20:02:05 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-18 08:51:38 +0000 |
commit | 91bbe86251398280f54bf3c769a700041488eb24 (patch) | |
tree | 4249166951e470720743afff08b66b5f654ebcab /src/qml/qml/qqmlnotifier_p.h | |
parent | 66fa2b979632d87f0ac9b3f1455df66411984670 (diff) |
Move setting the callback type for the endpoint to the constructor
Change-Id: I1881fc3e79f93e3cfe01a201d60956c460c0d196
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlnotifier_p.h')
-rw-r--r-- | src/qml/qml/qqmlnotifier_p.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlnotifier_p.h b/src/qml/qml/qqmlnotifier_p.h index 009ffb7107..bd2c0e6506 100644 --- a/src/qml/qml/qqmlnotifier_p.h +++ b/src/qml/qml/qqmlnotifier_p.h @@ -61,9 +61,6 @@ class QQmlEngine; class QQmlNotifierEndpoint { public: - inline QQmlNotifierEndpoint(); - inline ~QQmlNotifierEndpoint(); - // QQmlNotifierEndpoint can only invoke one of a set of pre-defined callbacks. // To add another callback, extend this enum and add the callback to the top // of qqmlnotifier.cpp. Four bits are reserved for the callback, so there can @@ -75,7 +72,8 @@ public: QQmlVMEMetaObjectEndpoint = 3 }; - inline void setCallback(Callback c) { callback = c; } + inline QQmlNotifierEndpoint(Callback callback); + inline ~QQmlNotifierEndpoint(); inline bool isConnected(); inline bool isConnected(QObject *source, int sourceSignal); @@ -138,8 +136,8 @@ void QQmlNotifier::notify() if (endpoints) emitNotify(endpoints, args); } -QQmlNotifierEndpoint::QQmlNotifierEndpoint() -: senderPtr(0), callback(None), sourceSignal(-1), next(0), prev(0) +QQmlNotifierEndpoint::QQmlNotifierEndpoint(Callback callback) +: senderPtr(0), callback(callback), sourceSignal(-1), next(0), prev(0) { } |