summaryrefslogtreecommitdiffstats
path: root/src/sensors/doc/src/qtsensors-backend.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sensors/doc/src/qtsensors-backend.qdoc')
-rw-r--r--src/sensors/doc/src/qtsensors-backend.qdoc53
1 files changed, 18 insertions, 35 deletions
diff --git a/src/sensors/doc/src/qtsensors-backend.qdoc b/src/sensors/doc/src/qtsensors-backend.qdoc
index 7e62186d..35945f61 100644
--- a/src/sensors/doc/src/qtsensors-backend.qdoc
+++ b/src/sensors/doc/src/qtsensors-backend.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page sensors-backend-topics.html
@@ -89,9 +65,9 @@ An example follows.
Sensors was designed so that multiple sensors could exist for a given type. Why?
Consider this example.
-The N900 has an accelerometer built-in. It also features bluetooth and can pair
-with a gaming controller that features an accelerometer. To a developer writing
-a game these two devices are conceptually the same type.
+An Android device has an accelerometer built-in. It also features bluetooth and
+can pair with a gaming controller that features an accelerometer. To a developer
+writing a game these two devices are conceptually the same type.
\section1 Default Sensor for a Type
@@ -109,21 +85,28 @@ instead.
\section1 Sensors.conf
-The config file that determines the default sensor for a type is called Sensors.conf.
-If present, it is located in /etc/xdg/QtProject. It has the standard formatting
-of an ini file.
+The config file that determines the default sensor for a type is called
+\e Sensors.conf. The configuration file is looked for from \e QtProject
+directory under the directories given by
+QStandardPaths::standardLocations(QStandardPaths::ConfigLocation).
+An example of a complete file path is:
+\badcode
+/etc/xdg/QtProject/Sensors.conf
+\endcode
+The first found configuration file is used.
+The configuration file has the standard formatting of an ini file.
The settings live in the Default group and the general format is:
\code
type = identifier
\endcode
-An example: Sensors.conf ensures that the N900 accelerometer is used by default,
-not considering the order in which backends were registered.
+An example: Sensors.conf ensures that the \e sensorfw accelerometer is used by
+default, ignoring the order in which backends were registered.
\code
[Default]
-QAccelerometer = n900.accelerometer
+QAccelerometer=sensorfw.accelerometer
\endcode
If Sensors.conf specifies an identifier that is not registered, the system will