summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2021-08-09 12:09:21 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2021-08-16 12:20:32 +0300
commit1e6f2126f11a62813dd652d3df0edb8bff8dfbf1 (patch)
tree00ff952befa84b6de8176037ee1fab74ef60e915
parent47dd71e249b6e2fe560592423f4b9d36d6919e50 (diff)
Disable gestures from QtSensors
The sensor gestures requires some rethinking in order to be of more use for the developers. Therefore we should not yet commit to the old API at least in the first Qt 6 sensors release. This commit disables the gestures by: - Excluding gesture code from compilation - Excluding gesture examples and tests from compilation - Excluding the gesture related documentation - And updating the Qt 6 porting guide Pick-to: 6.2 Task-number: QTBUG-95747 Task-number: QTBUG-95649 Change-Id: I33c1e010825a88b10fa1f7ad49ad3b5383b470aa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
-rw-r--r--CMakeLists.txt2
-rw-r--r--examples/sensors/CMakeLists.txt14
-rw-r--r--examples/sensors/sensors.pro10
-rw-r--r--src/plugins/CMakeLists.txt2
-rw-r--r--src/sensors/CMakeLists.txt12
-rw-r--r--src/sensors/doc/qtsensors.qdocconf11
-rw-r--r--src/sensors/doc/src/compatmap.qdoc2
-rw-r--r--src/sensors/doc/src/qt6-changes.qdoc6
-rw-r--r--src/sensors/doc/src/qtsensors.qdoc4
-rw-r--r--src/sensorsquick/CMakeLists.txt2
-rw-r--r--tests/auto/CMakeLists.txt10
-rw-r--r--tests/auto/qml/qml_cpp/CMakeLists.txt4
-rw-r--r--tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp7
13 files changed, 50 insertions, 36 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25cdd756..5fb84e19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@ project(QtSensors
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS
- Xml Gui Widgets Quick Qml Svg DBus Multimedia QuickTest
+ Xml Gui Widgets Quick Qml Svg DBus QuickTest
)
qt_build_repo()
diff --git a/examples/sensors/CMakeLists.txt b/examples/sensors/CMakeLists.txt
index db539b53..32699493 100644
--- a/examples/sensors/CMakeLists.txt
+++ b/examples/sensors/CMakeLists.txt
@@ -2,16 +2,16 @@
# add_subdirectory(grue)
if(TARGET Qt::Quick)
add_subdirectory(maze)
- add_subdirectory(qmlsensorgestures)
+# add_subdirectory(qmlsensorgestures)
add_subdirectory(qmlqtsensors)
add_subdirectory(sensor_explorer)
- if (TARGET Qt::Multimedia)
- add_subdirectory(shakeit)
- endif()
+# if (TARGET Qt::Multimedia)
+# add_subdirectory(shakeit)
+# endif()
if(TARGET Qt::Svg)
add_subdirectory(accelbubble)
endif()
endif()
-if(TARGET Qt::Widgets)
- add_subdirectory(sensorgestures)
-endif()
+# if(TARGET Qt::Widgets)
+# add_subdirectory(sensorgestures)
+# endif()
diff --git a/examples/sensors/sensors.pro b/examples/sensors/sensors.pro
index be51a62c..62bb9e06 100644
--- a/examples/sensors/sensors.pro
+++ b/examples/sensors/sensors.pro
@@ -5,17 +5,17 @@ SUBDIRS += grue
qtHaveModule(quick) {
SUBDIRS += \
maze \
- qmlsensorgestures \
qmlqtsensors \
- sensor_explorer \
- shakeit
+ sensor_explorer
+ # qmlsensorgestures \
+ # shakeit
qtHaveModule(svg): SUBDIRS += \
accelbubble
}
-qtHaveModule(widgets): SUBDIRS += \
- sensorgestures
+# qtHaveModule(widgets): SUBDIRS += \
+# sensorgestures
EXAMPLE_FILES += \
stub.h
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index fdcb878d..0da96701 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -1,2 +1,2 @@
add_subdirectory(sensors)
-add_subdirectory(sensorgestures)
+# add_subdirectory(sensorgestures)
diff --git a/src/sensors/CMakeLists.txt b/src/sensors/CMakeLists.txt
index beeda6a5..1d1755cb 100644
--- a/src/sensors/CMakeLists.txt
+++ b/src/sensors/CMakeLists.txt
@@ -3,13 +3,13 @@
#####################################################################
qt_internal_add_module(Sensors
- PLUGIN_TYPES sensors sensorgestures
+ PLUGIN_TYPES sensors # sensorgestures
SOURCES
- gestures/qsensorgesture.cpp gestures/qsensorgesture.h gestures/qsensorgesture_p.h
- gestures/qsensorgesturemanager.cpp gestures/qsensorgesturemanager.h
- gestures/qsensorgesturemanagerprivate.cpp gestures/qsensorgesturemanagerprivate_p.h
- gestures/qsensorgestureplugininterface.cpp gestures/qsensorgestureplugininterface.h
- gestures/qsensorgesturerecognizer.cpp gestures/qsensorgesturerecognizer.h
+ # gestures/qsensorgesture.cpp gestures/qsensorgesture.h gestures/qsensorgesture_p.h
+ # gestures/qsensorgesturemanager.cpp gestures/qsensorgesturemanager.h
+ # gestures/qsensorgesturemanagerprivate.cpp gestures/qsensorgesturemanagerprivate_p.h
+ # gestures/qsensorgestureplugininterface.cpp gestures/qsensorgestureplugininterface.h
+ # gestures/qsensorgesturerecognizer.cpp gestures/qsensorgesturerecognizer.h
qsensorbackend.cpp qsensorbackend.h
qsensormanager.cpp qsensormanager.h
qsensorplugin.cpp qsensorplugin.h
diff --git a/src/sensors/doc/qtsensors.qdocconf b/src/sensors/doc/qtsensors.qdocconf
index 5c5e9434..0e83785c 100644
--- a/src/sensors/doc/qtsensors.qdocconf
+++ b/src/sensors/doc/qtsensors.qdocconf
@@ -47,6 +47,17 @@ examplesinstallpath = sensors
imagedirs += images
+# Gestures have been disabled for the time being
+excludedirs += ../../../examples/sensors/qmlsensorgestures \
+ ../../../examples/sensors/shakeit \
+ ../../../examples/sensors/sensorgestures \
+ ../../plugins/sensorgestures \
+ ../../sensors/gestures
+
+excludefiles += ../../sensorsquick/qmlsensorgesture.cpp \
+ src/qtsensorgestures-cpp.qdoc \
+ src/qtsensorgestures-plugins.qdoc
+
depends += qtcore qtdoc qtgui qtquick
navigation.landingpage = "Qt Sensors"
diff --git a/src/sensors/doc/src/compatmap.qdoc b/src/sensors/doc/src/compatmap.qdoc
index f013c891..acb98193 100644
--- a/src/sensors/doc/src/compatmap.qdoc
+++ b/src/sensors/doc/src/compatmap.qdoc
@@ -165,6 +165,4 @@
a magnetometer might support returning geo values. See QSensor::isFeatureSupported() for
additional details.
- Sensor Gestures are mostly platform independent, and will run if the platform has the sensors required.
- Whether they are supported and work well or not depends on the platform.
*/
diff --git a/src/sensors/doc/src/qt6-changes.qdoc b/src/sensors/doc/src/qt6-changes.qdoc
index d8db18cb..c82bf561 100644
--- a/src/sensors/doc/src/qt6-changes.qdoc
+++ b/src/sensors/doc/src/qt6-changes.qdoc
@@ -41,6 +41,12 @@
In this topic we summarize those changes in Qt Sensors, and provide
guidance to handle them.
+ \section1 Sensor Gesture support
+
+ The Gesture support has been removed. In its current shape the gestures
+ needs rethinking to be of more use for the developers. To track this please
+ see \l {https://bugreports.qt.io/browse/QTBUG-95649}{QTBUG-95649}.
+
\section1 Platform notes
\section2 Windows
diff --git a/src/sensors/doc/src/qtsensors.qdoc b/src/sensors/doc/src/qtsensors.qdoc
index b0f350ed..fb805d83 100644
--- a/src/sensors/doc/src/qtsensors.qdoc
+++ b/src/sensors/doc/src/qtsensors.qdoc
@@ -32,7 +32,6 @@
\since 5.1
The Qt Sensors API provides access to sensor hardware via QML and C++ interfaces.
- The Qt Sensors API also provides a motion gesture recognition API for devices.
Currently the API is supported on \l{Qt for Android}{Android},
\l{Qt for iOS}{iOS}, and \l {Qt for Windows}{Windows (MSVC)}.
@@ -75,9 +74,6 @@
\li \l{Qt Sensors C++ Overview}
\li High-level information on how to use the C++ API.
\row
- \li \l {Sensor Gestures C++ Overview}
- \li High-level information specific to sensor gestures
- \row
\li \l {Qt Sensors Examples}{Examples}
\li Examples demonstrating the use of the Qt Sensors APIs
\endtable
diff --git a/src/sensorsquick/CMakeLists.txt b/src/sensorsquick/CMakeLists.txt
index 6c247a6f..304504a2 100644
--- a/src/sensorsquick/CMakeLists.txt
+++ b/src/sensorsquick/CMakeLists.txt
@@ -17,7 +17,7 @@ qt_internal_add_qml_module(SensorsQuick
qmlproximitysensor.cpp qmlproximitysensor_p.h
qmlrotationsensor.cpp qmlrotationsensor_p.h
qmlsensor.cpp qmlsensor_p.h
- qmlsensorgesture.cpp qmlsensorgesture_p.h
+ # qmlsensorgesture.cpp qmlsensorgesture_p.h
qmlsensorglobal.cpp qmlsensorglobal_p.h
qmlsensorrange.cpp qmlsensorrange_p.h
qmltapsensor.cpp qmltapsensor_p.h
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index c325e2f7..1963e207 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -1,10 +1,10 @@
add_subdirectory(qsensor)
-add_subdirectory(qsensorgestures)
-add_subdirectory(qsensorgestureplugins)
add_subdirectory(cmake)
if(TARGET Qt::Quick)
add_subdirectory(qml)
endif()
-if(UNIX AND NOT APPLE)
- add_subdirectory(qsensorgestures_gestures)
-endif()
+# add_subdirectory(qsensorgestures)
+# add_subdirectory(qsensorgestureplugins)
+# if(UNIX AND NOT APPLE)
+# add_subdirectory(qsensorgestures_gestures)
+# endif()
diff --git a/tests/auto/qml/qml_cpp/CMakeLists.txt b/tests/auto/qml/qml_cpp/CMakeLists.txt
index 45c3230d..b03ab37e 100644
--- a/tests/auto/qml/qml_cpp/CMakeLists.txt
+++ b/tests/auto/qml/qml_cpp/CMakeLists.txt
@@ -1,8 +1,8 @@
qt_internal_add_test(tst_sensors_qmlcpp
SOURCES
../../common/test_backends.cpp ../../common/test_backends.h
- qtemplategestureplugin.cpp qtemplategestureplugin.h
- qtemplaterecognizer.cpp qtemplaterecognizer.h
+ # qtemplategestureplugin.cpp qtemplategestureplugin.h
+ # qtemplaterecognizer.cpp qtemplaterecognizer.h
tst_sensors_qmlcpp.cpp
LIBRARIES
Qt::Qml
diff --git a/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp b/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp
index 57cd0cb1..d86045b2 100644
--- a/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp
+++ b/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp
@@ -32,7 +32,7 @@
#include <QtTest/private/qpropertytesthelper_p.h>
#include <QtSensorsQuick/private/qmlsensor_p.h>
-#include <QtSensorsQuick/private/qmlsensorgesture_p.h>
+// #include <QtSensorsQuick/private/qmlsensorgesture_p.h>
#include "qtemplategestureplugin.h"
#include "qtemplaterecognizer.h"
@@ -69,7 +69,7 @@ class tst_sensors_qmlcpp : public QObject
private slots:
void initTestCase();
void testReadingBindings();
- void testGesture();
+ // void testGesture();
void testSensorRanges();
};
@@ -195,6 +195,7 @@ void tst_sensors_qmlcpp::testReadingBindings()
unregister_test_backends();
}
+/*
void tst_sensors_qmlcpp::testGesture()
{
QTemplateGesturePlugin* plugin = new QTemplateGesturePlugin();
@@ -311,6 +312,8 @@ void tst_sensors_qmlcpp::testGesture()
QCOMPARE(spy2_detected.count(), 1);
}
+*/
+
class QDummySensorBackend : public QSensorBackend
{
Q_OBJECT