From 5a8aa096dc61336ac95734e8cc61f106e359c865 Mon Sep 17 00:00:00 2001 From: Juha Vuolle Date: Tue, 5 Jan 2021 14:27:16 +0200 Subject: Base commit to make QtSensors runnable on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fair amount of work remains after the commit still, but this should allow further development as a compilable baseline: code compiles, autotests pass, and most example applications at least start. The changes: -Change examples to use QtQuickControls 2 as per removal of v1 -Fix ambiguous conditional expression compilation error -Link against runtimeobject library (previously part of winrt QPA?) -Change the .pro file rule to win32 as winrt moniker does not exist anymore -Remove references to deleted winrt event dispatcher -Fix error handling: getdefault may be successful even if there is no default sensor -Fix QCOMPARE failure output (toString has changed in Qt6) -Remove qtimestamp alias which was deprecated already in Qt5 -Remove unit test hook that does not seem to be used anywhere -From typedef to ‘using’ for readability -Q_ENUMS -> Q_ENUM as the former has been obsoleted by the latter -Add qt6 changes qdoc page Task-number: QTBUG-88616 Change-Id: I92c168228ba76106b2c636c88f54331c76c3d2e6 Reviewed-by: Karsten Heimrich Reviewed-by: Oliver Wolff Reviewed-by: Alex Blasche --- examples/sensors/accelbubble/accelbubble.qml | 2 +- examples/sensors/sensor_explorer/import/sensoritem.cpp | 2 +- examples/sensors/sensor_explorer/sensor_explorer.qml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/sensors') diff --git a/examples/sensors/accelbubble/accelbubble.qml b/examples/sensors/accelbubble/accelbubble.qml index 8bd036ff..a980033f 100644 --- a/examples/sensors/accelbubble/accelbubble.qml +++ b/examples/sensors/accelbubble/accelbubble.qml @@ -50,7 +50,7 @@ import QtQuick 2.1 -import QtQuick.Controls 1.0 +import QtQuick.Controls 2.0 //! [0] import QtSensors 5.0 diff --git a/examples/sensors/sensor_explorer/import/sensoritem.cpp b/examples/sensors/sensor_explorer/import/sensoritem.cpp index f268db3a..40fb847e 100644 --- a/examples/sensors/sensor_explorer/import/sensoritem.cpp +++ b/examples/sensors/sensor_explorer/import/sensoritem.cpp @@ -110,7 +110,7 @@ void QSensorItem::setStart(bool run) */ QString QSensorItem::id() { - return (_qsensor ? _qsensor->identifier() : ""); + return (_qsensor ? _qsensor->identifier() : QStringLiteral("")); } /* diff --git a/examples/sensors/sensor_explorer/sensor_explorer.qml b/examples/sensors/sensor_explorer/sensor_explorer.qml index 365842d9..24e22133 100644 --- a/examples/sensors/sensor_explorer/sensor_explorer.qml +++ b/examples/sensors/sensor_explorer/sensor_explorer.qml @@ -50,7 +50,7 @@ import QtQuick 2.1 import QtQuick.Window 2.1 -import QtQuick.Controls 1.0 +import QtQuick.Controls 2.0 //! [0] import Explorer 1.0 -- cgit v1.2.3