summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@digia.com>2013-09-19 14:31:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 14:43:38 +0200
commite3e80980ca6a4628bf7a0dae61d9ab140913518c (patch)
tree3b57c7a924c2ac2edaeeb1a5ccb14b772189be93
parented96b2ea42bd95feeba1085665286a33c9672ab1 (diff)
downloadqtsensors-e3e80980ca6a4628bf7a0dae61d9ab140913518c.tar.gz
qtsensors-e3e80980ca6a4628bf7a0dae61d9ab140913518c.tar.bz2
qtsensors-e3e80980ca6a4628bf7a0dae61d9ab140913518c.zip
[Doc] Fix the SensorGlobal usage example
If qml type is registered with qmlRegisterSingletonType(), for example: qmlRegisterSingletonType <QmlSensorGlobal>(package, major, minor, "QmlSensors", global_object_50); where: package = "QtSensors" major = 5 minor = 0 Then it can be accessed like this: import QtSensors 5.0 as Sensors var types = Sensors.QmlSensors.sensorTypes(); Task-number: QTBUG-33558 Change-Id: I228fb51e8a2887c59ac8edba1a944a9b2c6ec05f Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
-rw-r--r--src/imports/sensors/qmlsensorglobal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/sensors/qmlsensorglobal.cpp b/src/imports/sensors/qmlsensorglobal.cpp
index 1cba256..0acf397 100644
--- a/src/imports/sensors/qmlsensorglobal.cpp
+++ b/src/imports/sensors/qmlsensorglobal.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
import QtSensors 5.0 as Sensors
...
Component.onCompleted: {
- var types = Sensors.sensorTypes();
+ var types = Sensors.QmlSensors.sensorTypes();
console.log(types.join(", "));
}
\endcode