From b107e9b409cb1481d6a7b722bb88520328666e38 Mon Sep 17 00:00:00 2001 From: Juha Vuolle Date: Mon, 2 Aug 2021 13:56:00 +0300 Subject: Make overridden QObject functions public to enable Python bindings QSensorGesture implements a custom metaobject and does not use Q_OBJECT macro directly, but rather the key functions are overridden manually. These functions are now made public to allow Python bindings for the sensor gestures. Task-number: PYSIDE-487 Task-number: QTBUG-92505 Change-Id: I3682bfa1a39b2a6d85413eb1679492d9b5bd9513 Reviewed-by: Cristian Maureira-Fredes Reviewed-by: Alex Blasche (cherry picked from commit 5bcc6622c4283703c9f8cb5fcf9e983b6e91b377) Reviewed-by: Qt Cherry-pick Bot --- src/sensors/doc/src/qt6-changes.qdoc | 3 ++- src/sensors/gestures/qsensorgesture.h | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sensors/doc/src/qt6-changes.qdoc b/src/sensors/doc/src/qt6-changes.qdoc index 118c3700..d8db18cb 100644 --- a/src/sensors/doc/src/qt6-changes.qdoc +++ b/src/sensors/doc/src/qt6-changes.qdoc @@ -85,7 +85,8 @@ The property name is now aligned with the \c frontLidClosed property of the same QML type. - \section2 QSensorBackend::sensorBusy() and QSensor::isBusy() + \section2 Added parameter to QSensorBackend::sensorBusy() to be able to also clear + the busy state The \c QSensor::busy property and its accessor, \c QSensor::isBusy(), can be used to check if the sensor is busy or not. To allow this property to better reflect the diff --git a/src/sensors/gestures/qsensorgesture.h b/src/sensors/gestures/qsensorgesture.h index 00f132c2..cec39cf8 100644 --- a/src/sensors/gestures/qsensorgesture.h +++ b/src/sensors/gestures/qsensorgesture.h @@ -70,15 +70,13 @@ public: void startDetection(); void stopDetection(); -private: - QSensorGesturePrivate * d_ptr; - - // ### fixme: Qt 6: Make public to enable Qt for Python bindings -private: // Pretend to be a Q_OBJECT const QMetaObject *metaObject() const override; int qt_metacall(QMetaObject::Call, int, void **) override; +private: + QSensorGesturePrivate * d_ptr; + Q_SIGNALS: // these signals are created at runtime, along with // gesture recognizer specific signals. -- cgit v1.2.3