diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-12-08 16:59:14 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-12-09 10:28:50 +0000 |
commit | c363b0324ac7a19e8c30c075ce001da0a0a8b6bd (patch) | |
tree | 55b5ac3549475d258b344dc9b75788acf6c3ecfc /src/quick/handlers/qquickpinchhandler_p.h | |
parent | c79d397925d535d72c0407af7c45f6b35df64cc2 (diff) |
add virtual QQuickPointerHandler::onActiveChanged
and override it in PinchHandler. Many handlers will need to do
something in response to change in active state, so calling a virtual
when the state changes and overriding it in subclasses is more
efficient than for subclasses to connect to the activeChanged signal.
This also helps us control the signal emit order: the subclass can
deal with any consequences (such as changing its own properties) before
activeChanged is emitted.
Change-Id: I6d05643e8facfd1941aa9152de6865932edb1b3a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpinchhandler_p.h')
-rw-r--r-- | src/quick/handlers/qquickpinchhandler_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/handlers/qquickpinchhandler_p.h b/src/quick/handlers/qquickpinchhandler_p.h index 5107a5c50b..83d6447b15 100644 --- a/src/quick/handlers/qquickpinchhandler_p.h +++ b/src/quick/handlers/qquickpinchhandler_p.h @@ -127,7 +127,7 @@ signals: void updated(); protected: - void onActiveChanged(); + void onActiveChanged() override; void onTargetChanged(); void handlePointerEventImpl(QQuickPointerEvent *event) override; |