summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Android: don't crash if Gravity is not supportedstablePaul Olav Tvete2014-06-023-0/+8
| | | | | | | | | | | | The QtSensors documentation says that if Gravity mode is not available, we should silently fall back to the default Combined mode. In addition, add null pointer checks in case we try to ask for non-existent sensors in the future. Task-number: QTBUG-39335 Change-Id: I6c18622d081db4e3a7d07c744bb0b746e3f5c6ff Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* ios: skip accelerometer, gyroscope and magnetomenter updates if NaNFawzi Mohamed2014-04-173-0/+12
| | | | | | Change-Id: I7becfab81d56fc45ec7dc76333383503b8abccfe Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Android, Fix generic access to QAccelerometerAndrew Inwood2014-04-092-4/+5
| | | | | | | | | | | | | Generic access to QAccelerometer through QSensor was broken by my previous change: 971fc95eca1d9db93aa4bdb75793dfe83e4a97db When using a QSensor* to access the accelerometer, the qobject_cast would fail, and return 0. I fix this by defaulting the accelerationMode to Combined when a QSensor* is used. Change-Id: If8389808a416807b72709a13ca315aa23bbf94a0 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* add PLUGIN_CLASS_NAME declarations to plugin projectsOswald Buddenhagen2014-04-099-0/+11
| | | | | | | | | | | needed for automatic static linking (and later deployment). the gesture plugins are excluded from the automation based on the assumption that they are usually not needed. the example and the test plugin are also excluded for obvious reasons. Change-Id: I7645aa0daf216ce430989e13d4380dbe6dd2bbd1 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* BlackBerry: update plugin keyAndrew Inwood2014-04-079-9/+9
| | | | | | | | | | | | | | The plugin key for both the Generic backend and the BlackBerry backend were set to "notused". This ultimately caused the Generic backend not to be loaded, which is why QTiltSensor wasn't being exposed. The duplicate keys caused a collision in a QMap in QFactoryLoader, making it look like the generic backend had been created, when it hadn't. Tested on a BlackBerry Z10. Change-Id: Ie5e40586751e7c3b9683a94a39b07efd4fc7fc82 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Simplify building of simulator based codeAlex Blasche2014-04-071-3/+5
| | | | | | | | | There is no need for the CONFIG+=simulator logic anymore. qtHaveModule() is an automatic way of doing the same. Change-Id: Ibe87abb93e036a82fae3a752d9886c58ccebeec1 Reviewed-by: Rainer Keller <rainer.keller@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Implement QAccelerometer accelerationModev5.3.0-beta1Andrew Inwood2014-03-204-3/+49
| | | | | | | | | | | | | | | | | | | The Qt API does not expose Linear Accel and Gravity as separate sensor types, they are different versions of QAccelerometer, accessed by modifying the accelerationMode property. The possible values are Combined, User, and Gravity, which correspond to Acceleration, Linear Acceleration, and Gravity respectively. When constructing the accelerometer backend, the accelerationMode must be queried. The backend must also connect to the accelerationModeChanged signal from the QAccelerometer. I think that the existing implementation of QSensors on Android assumes that there is a one-to-one correspondence between QSensors and AndroidSensorTypes. To fix this assumption, I promoted the m_type attribute of androidcommonsensor.h from private to protected so that a sensor backend can update the Android sensor being used. Task-number: QTBUG-30531 Change-Id: I842d2485109542f74731d179e2720ea55fa248cc Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* BlackBerry: Update threshold for close detectionAndrew Inwood2014-03-111-1/+5
| | | | | | | | | | The current algorithm for close detection in QProximitySensor will not work for sensors whose output is not binary (ie, close/far). The new algorithm will use the threshold of 8cm when the output is not binary. Change-Id: I2173e9afae0a2d29434e092e1afc09d1c6f5647c Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Fix some typos in comments and documentationSergio Ahumada2014-03-044-5/+5
| | | | | Change-Id: I8541601c0bfe2b7c80e88b4617e8215b266fb0bd Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Initial sensors backend for WinRT/Windows Phonev5.3.0-alpha1Andrew Knight2014-02-1618-0/+1887
| | | | | | | | | | This provides the sensor plugin with support for accelerometer, gyroscope, rotation sensor, orientation sensor, compass, and ambient light sensor. Change-Id: Ic91a6cef98e4011858552c5cd6407b494579fe17 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Normalize signal & slot signatures in connectionThiago Macieira2014-02-0321-86/+86
| | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I462d0e0b603ab644e57c5b804015508abeebdc6e Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Compile fix for WinRTMaurice Kalinowski2014-01-281-0/+4
| | | | | | Change-Id: Ifc7b86fa4d40dd051399999ad998b0750183d501 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Use correct method signature for slots.old/5.2Michael Brasser2014-01-161-2/+2
| | | | | | Change-Id: I09b5df218ad22afefe8a615c80585aa3fb46006f Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Make QtSensors use Q_DECL_OVERRIDESamuel Gaist2013-11-1954-163/+167
| | | | | | | | | This patch aims to make QtSensors uses Q_DECL_OVERRIDE uniformly across the module Task-number: QTBUG-27392 Change-Id: I5f814f93307159175f92e29a9990587c03cce96f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* BlackBerry: Disabled "returnGeoValues" featureBernd Weimer2013-10-282-36/+15
| | | | | | | | Elimination of interference is not supported on BlackBerry, so returnGeoValues property will be ignored. Change-Id: I5c6e3a80ec18f9e0d349d3c4040bfb8067a72291 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* make sensorfw plugin handle the sensord restarting.Lorn Potter2013-10-2325-74/+182
| | | | | | | | | | This way, clients that are connected will continue to receive updates after the sensord has restarted, without the need to restart the sensor. Task-number: QTBUG-34050 Change-Id: I4a8fbca189764cf23a1453feae5c1fd9ed6911e7 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* BlackBerry: Ensured that proper sensor.h file is usedBernd Weimer2013-09-192-3/+7
| | | | | Change-Id: I746cbf971b88cdffcfc5d675d27d0dda5bac95ad Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Android: Add missing sensorsPaul Olav Tvete2013-09-1911-8/+435
| | | | | | | | | This adds Android backends for QAmbientTemperatureSensor, QPressureSensor and QProximitySensor. Task-number: QTBUG-30531 Change-Id: I8d97f62d007c886fcc8dd701e23f6a35a3cbd748 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Merge branch 'stable' into devSergio Ahumada2013-08-052-2/+2
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ifed287670b09398ef659b9420c3e513a699a0944
| * add gyroscope for sensorfw backendLorn Potter2013-08-011-0/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-32754 Change-Id: I9037c20953d67584fdfeb4d0fabdfd73f919f14c Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * use 9.80665 as standard gravity for calculations.Lorn Potter2013-08-011-2/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-32751 Change-Id: I65076fa41d5c6a4e716df96bc5156068c1bd0040 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-126-4/+6
|\| | | | | | | Change-Id: Id44a93ddf8dc778f44e9684842a759d585558ee4
| * Initialize active variable in doubletap gestureLorn Potter2013-07-121-0/+1
| | | | | | | | | | | | | | Fixes flakiness. Change-Id: I6e8beaf5106c4dd1e26c3bf038ba9e394d0f080d Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * Merge branch 'release' into stableSergio Ahumada2013-07-031-0/+3
| |\ | | | | | | | | | Change-Id: I08bb0d6a9d4b0dddf76f463c32b3a4efdd632f0d
| | * Freefall gesture needs to be initialized into plugin to be usableLorn Potter2013-07-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the flaky unit test failures. It also adds freefall to unit test. Task-number: QTBUG-32108 Change-Id: Ia1ee852b1e57b937fd7368073e259a139da9a697 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-254-4/+2
| |\| | | | | | | | | | Change-Id: I451682790ba1949c150d4045baf9df0cd467d486
| | * Fix loading of all sensorgesture plugins.v5.1.0-rc2v5.1.0Lorn Potter2013-06-224-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the change in qtbase 732dcfe7, only the first sensorgesture plugin was actually being loaded. Since the FILE argument of Q_PLUGIN_METADATA is optional, removing that and the json file fixes the following bugs: QTBUG-31900 QTBUG-31901 Change-Id: I7c0b67605a8fe680c37639f08926140e137dbe66 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | iOS: change magnetometer implementation to use Timer base pollingRichard Moe Gustavsen2013-06-122-83/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ref change: 102bdf3 We need to change the implementation to use polling rather than callback to achieve full performance together with fine-grained QTimers. Change-Id: Ic3bf978633c56175eeca90cad8ed764a0b1c9b0c Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | | iOS: change gyro implementation to use Timer base pollingRichard Moe Gustavsen2013-06-102-35/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ref change: 102bdf3 We need to change the implementation to use polling rather than callback to achieve full performance together with fine-grained QTimers. Change-Id: I895418996b53432642d37279855167d815261d92 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | | Merge branch 'stable' into devSergio Ahumada2013-06-0723-25/+45
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sync.profile Change-Id: I0eaa022110b99fc5bc7cdf6304b5cda3ad3e8f8c
| * | Merge branch 'release' into stableSergio Ahumada2013-06-0622-23/+44
| |\| | | | | | | | | | Change-Id: I589d4840a0f0cc16656033ab34fcce10b9a499cd
| | * fix build in OBS, as well as fixes for API changes.Lorn Potter2013-06-0622-23/+44
| | | | | | | | | | | | | | | | | | | | | Change-Id: I27eabe7c8b79e03d814deb541db5e7f0b5449099 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * | Fix warning by the compiler, probably caused by a bad conflict resolutionThiago Macieira2013-06-041-1/+0
| |/ | | | | | | | | | | | | | | | | | | qshakerecognizer.cpp:161:28: error: expression result unused [-Werror,-Wunused-value] The statement was unused, the last branch of an || that was removed in fb06538f. Change-Id: I4badb3e5f4272086d44004b9beaca330f8ed7ab6 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * Fix pkgconfig dependsLorn Potter2013-05-231-1/+1
| | | | | | | | | | | | | | We call it sensord-qt5 now. Use this instead of the qt4 sensord Change-Id: I54f9de52e572f0afbfef742cf0c84fc64f1469f0 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | iOS: change accelerometer to use QTimer for pollingRichard Moe Gustavsen2013-06-052-37/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the docs (CMMotionManager class reference) there are two ways of interacting with the accelerometer; Either through the callback API (NSOperationQueue), or peridic sampling (polling). Our first implementation of IOSAcceleometer used the former technique, which turns out to have bad performance when using the sensor together with a fine-grained QTimer. And this case is pretty common when using sensors together with e.g QML. Reading through the docs more carefully, they recommend using the polling technique when creating games instead since the NSOperationQueue introduces some overhead. So this patch does that, change the implementation to use QTimer based polling. And this solves the performance issues found. Change-Id: Ifde0d2292302467afb8db90a954ef45f3238350e Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-237-18/+21
|\| | | | | | | Change-Id: I497c153fe555fbfbbd5fbb40f65f614ee33b065d
| * Remove debug output.Friedemann Kleint2013-05-132-2/+0
| | | | | | | | | | | | | | Task-number: QTBUG-31074 Change-Id: I7cb66ccbe74203e87e3bcc60400a8f7b2b2be0ed Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * BlackBerry: Fix for GeoValues supportBernd Weimer2013-05-061-3/+1
| | | | | | | | | | | | | | | | Generic QSensor("QMagnetometer") crashed, because of a null pointer access. Fixed by disabling geo values support for generic magnetometer sensors. Change-Id: Ie3e654df10f325ff42cd3a08c3108e9b7a84604f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Make it possible to bundle Android buildsEskil Abrahamsen Blomfeldt2013-05-064-13/+20
| | | | | | | | | | | | | | | | | | Add the bundled jar file and information about required plugins. Task-number: QTBUG-30751 Change-Id: I41918e8f04449439703ef1ae91c78636e9475f36 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-298-3/+428
|\| | | | | | | Change-Id: I4cfd0e2a2f108f5ecf79c56418c02928b041856e
| * iOS: enable generic sensorsRichard Moe Gustavsen2013-04-231-0/+4
| | | | | | | | | | Change-Id: I400661cabd4839f8a4e0c2b648a8a62a161dc955 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Generic: set PLUGIN_CLASS_NAME to help static builds (iOS)Richard Moe Gustavsen2013-04-231-0/+1
| | | | | | | | | | | | | | | | | | | | qmake will parse QTPLUGIN when building static apps, and create a stand-alone cpp file that adds the needed Q_IMPORT_PLUGIN lines. But for this to work, PLUGIN_CLASS_NAME needs to be set. Change-Id: Id92d78f3d77c3ce0d59fd27eec1df3271a947d51 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: implement proximity sensorRichard Moe Gustavsen2013-04-164-2/+215
| | | | | | | | | | Change-Id: Ia4c2dbe4f81ceda1600f9f642effbc3377cfa94d Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * iOS: implement compassRichard Moe Gustavsen2013-04-164-3/+210
| | | | | | | | | | Change-Id: I639a472cd2dfca177282cb4961d589f11f924e36 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-166-5/+6
|\| | | | | | | Change-Id: Ia02497aafc94feba0381ffe8733cbc89f29fb412
| * iOS: implement magnetometerRichard Moe Gustavsen2013-04-145-2/+238
| | | | | | | | | | Change-Id: I611e1ccafb0362b78737785e9cc7f4f48278063a Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: remove unneeded void pointer casting in private headersRichard Moe Gustavsen2013-04-142-4/+5
| | | | | | | | | | | | | | | | | | | | The headers in use for the sensor backend are private, and should never be directly included in any .cpp files. As such, we don't need to be careful using obj-c features in the header files. Change-Id: If16a84c88a7e7afc45afe00e668e4582337e4907 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: add QPointer guard to accelerometer and gyroRichard Moe Gustavsen2013-04-142-20/+34
| | | | | | | | | | | | | | | | | | | | Since we process data from the sensors using a callback queued to the application operation queue, we need to check that the qt sensor is still alive before accessing it. Change-Id: I697d72f94aedec34b125006d6405428e282bfc0d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: refactor and simplify IOSAccelerometer codeRichard Moe Gustavsen2013-04-142-74/+22
| | | | | | | | | | | | | | | | | | | | | | | | The code as it stood made use of an extra obj-c class to listen for sensor readings. This is not needed with the block (lambda) API used by CMMotionManager. This will also make IOSGyroscope and (soon) IOSMagnetometer follow the same code pattern. Change-Id: If945f8616f4cdde98b31382fcd9c555c2b490c4a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: remove unnecessary test for accelerometer availableRichard Moe Gustavsen2013-04-101-17/+14
| | | | | | | | | | | | | | | | | | The accelerometer is always available, so no need to check for this. Change-Id: I79411ff023c4350c5b31d4fad048484db2b2fe43 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>