summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorMica <qt-info@nokia.com>2010-03-23 13:30:37 +0200
committerLorn Potter <lorn.potter@nokia.com>2010-03-24 08:11:41 +1000
commitf4d6c07dff68759a6ed53c1a4932a78bcc00115d (patch)
tree37921b8e856af26e15a971da2134dcd91ea9ed2f /doc/src
parent3fd2e2ca9f252ac6bcaf05fd2f6d6dfce987653b (diff)
parent208c181c6b6f09baad40a0f48a4ab2887382afdf (diff)
Merge commit 'origin/1.0' into maemo5-d
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/examples.qdoc1
-rw-r--r--doc/src/examples/undocumented.qdoc5
-rw-r--r--doc/src/future.qdoc7
-rw-r--r--doc/src/images/Flight_dynamics_with_text.pngbin50566 -> 0 bytes
-rw-r--r--doc/src/images/Rotation_angles.pngbin0 -> 21599 bytes
-rw-r--r--doc/src/index.qdoc30
-rw-r--r--doc/src/installation.qdoc8
-rw-r--r--doc/src/multimedia.qdoc6
-rw-r--r--doc/src/preview.qdoc7
-rw-r--r--doc/src/publ-subs.qdoc18
-rw-r--r--doc/src/qtmobility-known-issues.qdoc4
-rw-r--r--doc/src/snippets/qtversitdocsample/qtversitdocsample.cpp153
-rw-r--r--doc/src/snippets/sensors/creating.cpp44
-rw-r--r--doc/src/snippets/sensors/main.cpp43
-rw-r--r--doc/src/snippets/sensors/mybackend.h41
-rw-r--r--doc/src/snippets/sensors/plugin.cpp41
-rw-r--r--doc/src/snippets/sensors/sensors.pro1
-rw-r--r--doc/src/snippets/sensors/start.cpp47
18 files changed, 372 insertions, 84 deletions
diff --git a/doc/src/examples.qdoc b/doc/src/examples.qdoc
index bf869ad270..e53cff7054 100644
--- a/doc/src/examples.qdoc
+++ b/doc/src/examples.qdoc
@@ -83,7 +83,6 @@
\list
\o \l{audiorecorder}{Audio Recorder}
- \o \l{cameracapture}{Camera Capture}
\o \l{player}{Player}
\o \l{radio}{Radio}
\o \l{recorder}{Recorder}
diff --git a/doc/src/examples/undocumented.qdoc b/doc/src/examples/undocumented.qdoc
index 0b8ba97473..16019b172b 100644
--- a/doc/src/examples/undocumented.qdoc
+++ b/doc/src/examples/undocumented.qdoc
@@ -45,11 +45,6 @@
*/
/*!
- \example cameracapture
- \title Camera Capture Example
-*/
-
-/*!
\example declarative
\title Declarative Example
*/
diff --git a/doc/src/future.qdoc b/doc/src/future.qdoc
index 6b6e6a0e8a..5ce8e517f6 100644
--- a/doc/src/future.qdoc
+++ b/doc/src/future.qdoc
@@ -56,13 +56,6 @@ Versit Classes.
\annotatedlist versit
-\target {Camera Support}
-\section1 Camera Support (Multimedia)
-
-\annotatedlist camera
-
-
-
*/
diff --git a/doc/src/images/Flight_dynamics_with_text.png b/doc/src/images/Flight_dynamics_with_text.png
deleted file mode 100644
index a712a4f46d..0000000000
--- a/doc/src/images/Flight_dynamics_with_text.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/Rotation_angles.png b/doc/src/images/Rotation_angles.png
new file mode 100644
index 0000000000..313e5590f4
--- /dev/null
+++ b/doc/src/images/Rotation_angles.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index d8eebed8d4..ef138e83aa 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -88,8 +88,7 @@
\o Services built on top of these APIs would include Internet
applications such as email and web browsing.
\o Multimedia features enable image and video capture with audio ,
- audio recording, and the playing of music or video clips. However,
- camera ability is not part of this release.
+ audio recording, and the playing of music or video clips.
\o Location will make the device aware of its geographical location
to support GIS applications.
\o Publish-Subscribe enables communication between separate objects
@@ -253,14 +252,6 @@
are proud of the work we have done on this project and want to show
not only what we are delivering now but what is around the corner.
- \section2 Camera
-
- A technology preview of the Camera API will be made available with this
- release. The Camera will be treated separately from Multimedia at this
- stage because of the different level of maturity of the APIs.
-
- For more details see the \l {preview.html#Camera-Support}{Camera classes}.
-
\section2 Sensors
An API for accessing hardware sensors. This covers both high-level
@@ -385,7 +376,7 @@
<td bgcolor="green"></td>
<td bgcolor="lightgreen"></td>
<td bgcolor="lightgreen"></td>
- <td bgcolor="lightgreen"></td>
+ <td bgcolor="green"></td>
<td bgcolor="lightgreen"></td>
<td bgcolor="green"></td>
<td bgcolor="green"></td>
@@ -417,7 +408,7 @@
<td bgcolor="green"></td>
<td bgcolor="green"></td>
<td bgcolor="green"></td>
- <td bgcolor="lightgreen"></td>
+ <td bgcolor="green"></td>
<td bgcolor="lightgreen"></td>
<td bgcolor="green"></td>
<td bgcolor="gray"></td>
@@ -472,21 +463,6 @@
<td bgcolor="gray"></td>
<td></td>
</tr>
- <td>Camera</td>
- <td>TP</td>
- <td bgcolor="lightgreen"></td>
- <td bgcolor="lightgreen"></td>
- <td bgcolor="lightgreen"></td>
- <td bgcolor="lightgray"></td>
- <td bgcolor="lightgray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="lightgreen"></td>
- <td bgcolor="gray"></td>
- <td></td>
- </tr>
<td>Versit</td>
<td>TP</td>
<td bgcolor="lightgreen"></td>
diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc
index 9966183f3e..f1dfd471a6 100644
--- a/doc/src/installation.qdoc
+++ b/doc/src/installation.qdoc
@@ -112,8 +112,6 @@ these domains have dependencies and these are outlined below:
On all platforms, QML elements for sound effects and music and video playing are exported if QtDeclarative (auto-detected) is available.
On all platforms, additional rendering paths are enabled of QtOpenGL (auto-detected) is available.
-
- On Maemo 5, QtMedia depends on \l {http://www.pulseaudio.org}{PulseAudio} if QtDeclarative is used.
\o
\o
\row
@@ -125,14 +123,10 @@ these domains have dependencies and these are outlined below:
The gstengine plugin for Linux and Maemo depends on gstreamer-0.10 (>= 0.10.19), gstreamer-audio-0.10 (>= 0.10.19), gstreamer-base-0.10 (>= 0.10.19), gstreamer-interfaces-0.10 (>= 0.10.19) and gstreamer-video-0.10 (>= 0.10.19).
If asound (auto-detected) is available, ALSA device detection will be enabled.
- The phononengine plugin for Mac depends on phonon.
-
The QtMobilityMultimediaEngine for Symbian depends on QtMultimedia.
To enable all mediaservices on symbian one must download sdk plugins. Sdk plugins are available at \l http://wiki.forum.nokia.com/index.php/SDK_API_Plug-in
For 5th edition sdk plugins are installed with installer (all at once), but for FP1 and FP2 devices a zip is provided. You will need following plugins to compile all features:
- MediaPlayerEngine (MediaPlayerUtilityAPI for 3rd FP2), AudioRoutingAPI , Tuner Utility (only for 3rd FP1) Radio Utility API (for 3rd FP2 and 5th ed), SymbianOnboardCameraAdvancedSettingsAPI(for 3rd FP2 and 5th ed) and
- autofocus_extension_library_s60_3rd_ed for (3rd FP1 included in the camera example \l http://sw.nokia.com/id/2f492479-ac8c-4c3e-aa90-cc883e190d83/S60_Platform_Camera_Example_with_AutoFocus_Support_v2_2_en.zip)
-
+ MediaPlayerEngine (MediaPlayerUtilityAPI for 3rd FP2), AudioRoutingAPI , Tuner Utility (only for 3rd FP1) Radio Utility API (for 3rd FP2 and 5th ed).
\o Y
\o N
\row
diff --git a/doc/src/multimedia.qdoc b/doc/src/multimedia.qdoc
index 4ac4e93baa..0add885187 100644
--- a/doc/src/multimedia.qdoc
+++ b/doc/src/multimedia.qdoc
@@ -56,9 +56,6 @@
collection of media content.
\ingroup mobility
-\warning The camera support classes are in a technology preview state. They
-are in development and subject to change.
-
Multimedia provides a set of APIs that allow the developer to play, record
and manage a collection of media content. It is dependent on the
QtMultimedia API. This API is planned to replace Phonon at a later stage.
@@ -113,9 +110,6 @@ recording application, excluding the supporting user interface code.
\section2 Video
-Support for the camera is not included in this release but will be part of
-a future update.
-
For playing and manipulating video sources the API enables us to easily
implement a player application. If we examine the \l{player}{Player}
example we see that the implementation of a simple media player requires a
diff --git a/doc/src/preview.qdoc b/doc/src/preview.qdoc
index 89c733efa5..a8ba76947a 100644
--- a/doc/src/preview.qdoc
+++ b/doc/src/preview.qdoc
@@ -56,13 +56,6 @@ An overview is available for the \l{versit.html}{Versit API}
Versit Classes.
\annotatedlist versit
-
-\target {Camera Support}
-\section1 Camera Support (Multimedia)
-
-\annotatedlist camera
-
-
\target {Sensor Classes}
\section1 Sensor API
diff --git a/doc/src/publ-subs.qdoc b/doc/src/publ-subs.qdoc
index 7c2ba17b82..57262bb863 100644
--- a/doc/src/publ-subs.qdoc
+++ b/doc/src/publ-subs.qdoc
@@ -141,6 +141,11 @@ The Shared Memory layer has an order of 0x10000000.
\o The Symbian Settings layer provides a permanent Value Space backing store using the
Symbian OS' Properties (RProperty) as well as Central Repository files (CRepository).
The Symbian Settings layer has an order of 0.
+ \row
+ \o \l{GConf Layer}
+ \o The GConf Layer provides a permanent Value Space backing store using the
+ GConf configuration system designed for the GNOME desktop environment.
+ The GConf Layer has an order of 0 and it's the only available layer in Maemo 5.
\endtable
The Value Space has support for both client/server and peer-to-peer layer architectures. If a
@@ -236,6 +241,19 @@ QByteArray and stored as 8-bit byte form by SymbianSettingslayer. The serializat
is transparent operation to the API user but may cause interoperatibility issues with native Symbian codes
that access the same data directly. The maximum size of the bytearray is 65535 for RPropery backing store.
+\section2 GConf Layer
+
+Publish and Subscribe API can be used to access the GConf configuration system.
+
+\section3 Limitations
+
+GConf can natively store only a limited set of QVariant data types. These types are Bool, Int, Double,
+String, StringList and List. When publishing other data types the values are automatically serialized
+and stored to GConf as BASE64 encoded strings. When reading these values they are automatically
+converted back to the original data types. The serialization/deserialization is transparent operation
+to the API user but may cause interoperatibility issues with native applications that access the same
+data directly.
+
\section1 Examples
\section2 Publish and Subscribe
diff --git a/doc/src/qtmobility-known-issues.qdoc b/doc/src/qtmobility-known-issues.qdoc
index 40ef8c8ce3..ccd6c1bd78 100644
--- a/doc/src/qtmobility-known-issues.qdoc
+++ b/doc/src/qtmobility-known-issues.qdoc
@@ -113,7 +113,6 @@ Of all supported Symbian platforms S60 3.2+ platforms enjoy the most comprehensi
\o Play video from local file.
\o Retrieve meta data information from currently playing media. Following tags supported: title, artist, comment, genre, year, copyright, album, composer, albumtrack, audiobitrate, videobitrate, duration, content type.
\o Media recording: audio capture to specified file from phone microphone or phone call (call needs to be started before media recording).
- \o Experimental camera support.
\endlist
@@ -186,15 +185,12 @@ Support is present for the following System Info API classes
\section2 Multimedia API
\list
- \o \bold {Camera support classes in Multimedia API is in technology preview state.}
\o S60: S60 specific play list not supported
\o S60: Device specific play list management not supported.
\o S60: Audio capture does not support currently any special features like format, encoding etc...
\o S60: seeking is not working properly
\o S60: video size does not remain constant in repeated plays
\o S60: full screen video not working OK
- \o S60: Calling QStillImageCapture::capture() with an existing file name results in Symbian:-11 error.
- \o S60: advancedsettings focus, whitebalance, exposure,etc don't work with 3.2/5.0. 3.1 Devices do not support them at all.
\o S60: 3.2.3 (E75 for example) player example don't work.
\o Windows desktop: wmp multimedia plugin does not display video with Windows Media Player 10 or 12
\endlist
diff --git a/doc/src/snippets/qtversitdocsample/qtversitdocsample.cpp b/doc/src/snippets/qtversitdocsample/qtversitdocsample.cpp
index 5f12351814..f097fe8e31 100644
--- a/doc/src/snippets/qtversitdocsample/qtversitdocsample.cpp
+++ b/doc/src/snippets/qtversitdocsample/qtversitdocsample.cpp
@@ -41,6 +41,7 @@
#include "qmobilityglobal.h"
#include "qtcontacts.h"
+#include "qcontacttag.h"
#include "qversitreader.h"
#include "qversitcontactimporter.h"
#include "qversitwriter.h"
@@ -137,6 +138,7 @@ void completeExample()
input.seek(0);
// Parse the input into QVersitDocuments
+ // Note: we could also use the more convenient QVersitReader(QByteArray) constructor.
QVersitReader reader;
reader.setDevice(&input);
reader.startReading(); // Remember to check the return value
@@ -145,15 +147,20 @@ void completeExample()
// Convert the QVersitDocuments to QContacts
QList<QVersitDocument> inputDocuments = reader.results();
QVersitContactImporter importer;
- QList<QContact> contacts = importer.importContacts(inputDocuments);
+ if (!importer.importDocuments(inputDocuments))
+ return;
+ QList<QContact> contacts = importer.contacts();
// Note that the QContacts are not saved yet.
// Use QContactManager::saveContacts() for saving if necessary
// Export the QContacts back to QVersitDocuments
QVersitContactExporter exporter;
- QList<QVersitDocument> outputDocuments = exporter.exportContacts(contacts);
+ if (!exporter.exportContacts(contacts, QVersitDocument::VCard30Type))
+ return;
+ QList<QVersitDocument> outputDocuments = exporter.documents();
// Encode the QVersitDocument back to a vCard
+ // Note: we could also use the more convenient QVersitWriter(QByteArray*) constructor.
QBuffer output;
output.open(QBuffer::ReadWrite);
QVersitWriter writer;
@@ -181,15 +188,9 @@ void exportExample()
name.setFirstName(QString::fromAscii("John"));
contact.saveDetail(&name);
- // Create an avatar type which is not supported by the exporter
- QContactAvatar contactAvatar;
- contactAvatar.setAvatar(QString::fromAscii("/my/image/avatar_path/texture.type"));
- contactAvatar.setSubType(QContactAvatar::SubTypeTexturedMesh);
- contact.saveDetail(&contactAvatar);
-
- QList<QContact> contactList;
- contactList.append(contact);
- QList<QVersitDocument> versitDocuments = contactExporter.exportContacts(contactList);
+ if (!contactExporter.exportContacts(QList<QContact>() << contact, QVersitDocument::VCard30Type))
+ return;
+ QList<QVersitDocument> versitDocuments = contactExporter.documents();
// detailHandler.mUnknownDetails now contains the list of unknown details
//! [Export example]
@@ -214,11 +215,129 @@ void importExample()
property.setValue("some value");
document.addProperty(property);
- QList<QVersitDocument> list;
- list.append(document);
-
- QList<QContact> contactList = importer.importContacts(list);
- // contactList.first() now contains the "N" property as a QContactName
- // propertyHandler.mUnknownProperties contains the list of unknown properties
+ if (importer.importDocuments(QList<QVersitDocument>() << document)) {
+ QList<QContact> contactList = importer.contacts();
+ // contactList.first() now contains the "N" property as a QContactName
+ // propertyHandler.mUnknownProperties contains the list of unknown properties
+ }
//! [Import example]
}
+
+//! [Import relationship example]
+/*! Adds contacts in \a newContacts into \a manager, converting categories specified
+ with tags into group membership relationships. Note that this implementation uses the
+ synchronous API of QContactManager for clarity. It is recommended that the asynchronous
+ API is used in practice.
+
+ Relationships are added so that if a contact, A, has a tag "b", then a HasMember relationship is
+ created between a group contact in the manager, B with display label "b", and contact A. If there
+ does not exist a group contact with display label "b", one is created.
+ */
+void insertWithGroups(const QList<QContact>& newContacts, QContactManager* manager)
+{
+ // Cache map from group names to QContactIds
+ QMap<QString, QContactId> groupMap;
+
+ foreach (QContact contact, newContacts) {
+ if (!manager->saveContact(&contact))
+ continue; // In practice, better error handling may be required
+ foreach (const QContactTag& tag, contact.details<QContactTag>()) {
+ QString groupName = tag.tag();
+ QContactId groupId;
+ if (groupMap.contains(groupName)) {
+ // We've already seen a group with the right name
+ groupId = groupMap.value(groupName);
+ } else {
+ QContactDetailFilter groupFilter;
+ groupFilter.setDetailDefinitionName(QContactType::DefinitionName);
+ groupFilter.setValue(QLatin1String(QContactType::TypeGroup));
+ groupFilter.setMatchFlags(QContactFilter::MatchExactly);
+ // In practice, some detail other than the display label could be used
+ QContactDetailFilter nameFilter = QContactDisplayLabel::match(groupName);
+ QList<QContactLocalId> matchingGroups = manager->contactIds(groupFilter & nameFilter);
+ if (!matchingGroups.isEmpty()) {
+ // Found an existing group in the manager
+ QContactId groupId;
+ groupId.setManagerUri(manager->managerUri());
+ groupId.setLocalId(matchingGroups.first());
+ groupMap.insert(groupName, groupId);
+ }
+ else {
+ // Make a new group
+ QContact groupContact;
+ QContactName name;
+ name.setCustomLabel(groupName);
+ // Beware that not all managers support custom label
+ groupContact.saveDetail(&name);
+ if (!manager->saveContact(&groupContact))
+ continue; // In practice, better error handling may be required
+ groupId = groupContact.id();
+ groupMap.insert(groupName, groupId);
+ }
+ }
+ // Add the relationship
+ QContactRelationship rel;
+ rel.setFirst(groupId);
+ rel.setRelationshipType(QContactRelationship::HasMember);
+ rel.setSecond(contact.id());
+ manager->saveRelationship(&rel);
+ }
+ }
+}
+//! [Import relationship example]
+
+//! [Export relationship example]
+/*! Adds QContactTag details to the \a contacts, based on the \a relationships.
+
+ Tags are created such that if a group contact, B with display label "b", has a HasMember
+ relationship with a contact, A, then a QContactTag, "b", is added to A.
+
+ Group contacts can be passed in with the \a contacts list. If a contact is part of a group which
+ is not in \a contacts, the \a manager is queried to find them.
+ */
+void createTagsFromGroups(QList<QContact>* contacts,
+ const QList<QContactRelationship>& relationships,
+ const QContactManager* manager)
+{
+ // Map from QContactIds to group names
+ QMap<QContactId, QString> groupMap;
+
+ // Map from QContactIds to indices into the contacts list
+ QMap<QContactId, int> indexMap;
+ // Build up groupMap and indexMap
+ for (int i = 0; i < contacts->size(); ++i) {
+ QContact contact = contacts->at(i);
+ if (contact.type() == QContactType::TypeGroup) {
+ // In practice, you may want to check that there aren't two distinct groups with the
+ // same name, and you may want to use a field other than display label.
+ groupMap.insert(contact.id(), contact.displayLabel());
+ }
+ indexMap.insert(contact.id(), i);
+ }
+
+ // Now add all the tags specified by the group relationships
+ foreach (const QContactRelationship& rel, relationships) {
+ if (rel.relationshipType() == QContactRelationship::HasMember
+ && indexMap.contains(rel.second())) {
+ QString groupName = groupMap.value(rel.first()); // Have we seen the group before?
+ if (groupName.isEmpty()) {
+ // Try and find the group in the manager
+ QContactId groupId = rel.second();
+ QContactFetchHint fetchHint;
+ fetchHint.setDetailDefinitionsHint(QStringList(QContactDisplayLabel::DefinitionName));
+ QContact contact = manager->contact(groupId.localId(), fetchHint);
+ if (!contact.isEmpty()) {
+ groupName = contact.displayLabel();
+ groupMap.insert(groupId, groupName); // Cache the group id/name
+ }
+ }
+ if (!groupName.isEmpty()) {
+ // Add the tag
+ QContactTag tag;
+ tag.setTag(groupName);
+ (*contacts)[indexMap.value(rel.second())].saveDetail(&tag);
+ }
+ }
+ }
+}
+//! [Export relationship example]
diff --git a/doc/src/snippets/sensors/creating.cpp b/doc/src/snippets/sensors/creating.cpp
index 30d8503610..c5a107cae7 100644
--- a/doc/src/snippets/sensors/creating.cpp
+++ b/doc/src/snippets/sensors/creating.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QWidget>
#include <qaccelerometer.h>
#include <qorientationsensor.h>
@@ -18,5 +59,8 @@ QAccelerometer *sensor = new QAccelerometer(this);
// On the stack (deleted when the current scope ends)
QOrientationSensor orient_sensor;
//! [Creating a sensor]
+
+ Q_UNUSED(sensor)
+ Q_UNUSED(orient_sensor);
}
diff --git a/doc/src/snippets/sensors/main.cpp b/doc/src/snippets/sensors/main.cpp
index d7ab4e54f7..c20aa671cc 100644
--- a/doc/src/snippets/sensors/main.cpp
+++ b/doc/src/snippets/sensors/main.cpp
@@ -1,4 +1,45 @@
-int main(int argc, char **argv)
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+int main(int /*argc*/, char ** /*argv*/)
{
return 0;
}
diff --git a/doc/src/snippets/sensors/mybackend.h b/doc/src/snippets/sensors/mybackend.h
index ea726aecf6..e4a918a12a 100644
--- a/doc/src/snippets/sensors/mybackend.h
+++ b/doc/src/snippets/sensors/mybackend.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef MYBACKEND_H
#define MYBACKEND_H
diff --git a/doc/src/snippets/sensors/plugin.cpp b/doc/src/snippets/sensors/plugin.cpp
index a4855659ca..6a69e35c7d 100644
--- a/doc/src/snippets/sensors/plugin.cpp
+++ b/doc/src/snippets/sensors/plugin.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include "mybackend.h"
#include <qsensorplugin.h>
#include <qsensormanager.h>
diff --git a/doc/src/snippets/sensors/sensors.pro b/doc/src/snippets/sensors/sensors.pro
index 08701269a2..95dd7d4114 100644
--- a/doc/src/snippets/sensors/sensors.pro
+++ b/doc/src/snippets/sensors/sensors.pro
@@ -10,3 +10,4 @@ HEADERS+=myplugin.h
LIBS+=-rdynamic
CONFIG+=mobility
MOBILITY+=sensors
+CONFIG+=strict_flags
diff --git a/doc/src/snippets/sensors/start.cpp b/doc/src/snippets/sensors/start.cpp
index dc30cc76fb..2b91297e7e 100644
--- a/doc/src/snippets/sensors/start.cpp
+++ b/doc/src/snippets/sensors/start.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <qsensor.h>
QTM_USE_NAMESPACE
@@ -6,8 +47,7 @@ void start()
{
//! [Starting a sensor]
// start the sensor
-QSensor sensor;
-sensor.setType("QAccelerometer");
+QSensor sensor("QAccelerometer");
sensor.start();
// later
@@ -15,4 +55,7 @@ QSensorReading *reading = sensor.reading();
qreal x = reading->property("x").value<qreal>();
qreal y = reading->value(1).value<qreal>();
//! [Starting a sensor]
+
+ Q_UNUSED(x)
+ Q_UNUSED(y)
}