summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothlocaldevice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Compile-fix (g++ 8): move #include of mocs outside namespaceEdward Welbourne2018-11-301-2/+2
| | | | | Change-Id: I9adaa11043c94e0c4d5530fbafa2ef2f15681cac Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Catch SecurityException during pairing on AndroidAlex Blasche2018-09-261-1/+6
| | | | | | | | | | | | | | | QBluetoothLocalDevice::pairingConfirmation(bool) requires BLUETOOTH_PRIVILEGED permission which cannot be obtained by 3rdparty apps. I believe this used to be different as suggested by https://android.googlesource.com/platform/frameworks/base/+/b1dc1757071ba46ee653d68f331486e86778b8e4 This patch ensures that the thrown SecurityException is caught and displays an appropriate warning. Change-Id: Ib5a0e0fc0c9f3b4f33690493ed74aa4b7cb8864b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* doc: State that QBluetoothLocalDevice is not supported on winrtOliver Wolff2018-03-011-1/+1
| | | | | | | | | | As the winrt backend is the only available Windows backend atm, it probably causes least confusion if we state that the class is not available when using Windows. Change-Id: Ide9a1ad799c1bc19f0d503ac78e9f6b32f44b574 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix qdoc Warning QBluetoothLocalDeviceAlex Blasche2018-02-221-2/+2
| | | | | | | | qbluetoothlocaldevice.cpp:272: (qdoc) warning: Undocumented parameter 'confirmation' in QBluetoothLocalDevice::pairingConfirmation() qbluetoothlocaldevice.cpp:272: (qdoc) warning: No such parameter 'accept' in QBluetoothLocalDevice::pairingConfirmation() Change-Id: Ice53e3a965b2d38a2d81d9b1a77292bd43c93967 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Improve documentation about missing iOS support in QtBluetoothAlex Blasche2018-01-041-0/+3
| | | | | | Task-number: QTBUG-65547 Change-Id: I472b354621db89a921eec01b1459d46dbaa15ac0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-161-9/+9
|\ | | | | | | Change-Id: I3eec9a22565585d4fc40831d609a3083ce99a52c
| * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-161-9/+9
| | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: I97f7a0d6d2ca351395bed518f01d4365b986500a Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-0/+4
|\| | | | | | | | | | | | | Conflicts: examples/nfc/corkboard/corkboard.pro Change-Id: I5d1ea0a8e21a1b55dbf744c2f4b469bc51f05c7a
| * Document changed behavior of QBLD::address() on Android 6.0Alex Blasche2016-04-131-0/+4
| | | | | | | | | | | | | | The address was fixed for privacy reasons. Change-Id: Ifbdcb88d84215601bd202c0835237bb1c3100ca3 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Updated license headersAntti Kokko2016-01-201-14/+20
|/ | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I856c13e2a6d4d12c46e1286b0ca1c092ee4608f8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'gerrit/5.5' into 5.6Alex Blasche2015-12-011-7/+4
|\ | | | | | | Change-Id: I4404df69bfdac335e9c1eb63e4ada3ba89b48b6c
| * Don't register meta types during static init time5.5Alex Blasche2015-11-301-7/+4
| | | | | | | | | | | | | | | | | | | | The QMetaType register my not be up and running by the time we attempt these meta type registration. Change-Id: I1a857a936a24b4b00a49574fac311c08c09b3d5a Task-number: QTBUG-49455 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Remove QNX/BlackBerry implementation for QtBluetoothAlex Blasche2015-06-171-1/+1
|/ | | | | | | | | [ChangeLog][QtBluetooth][Platform Specific Changes] Removed support for Blackberry 10. Change-Id: I431c4f34bb10aa3668542df7a8b3403b61bf4705 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Convert qRegisterMetaType<T>(const char*) to qRegisterMetaType<T>()Alex Blasche2015-01-281-3/+3
| | | | | | | | | | | | | | | This is much safer and cleaner. [ChangeLog][QtBluetooth][Important Behavior Changes] Q_DECLARE_METATYPE added for QBluetoothServiceDiscoveryAgent::Error, QBluetoothSocket::SocketState, QBluetoothSocket::SocketError and QBluetoothDeviceInfo. This breaks source compatibility if application code has defined the above metatypes already. The applications Q_DECLARE_METATYPE must be removed to fix the compile error. Change-Id: I1c7cb1ee25832b7e5337c9aca6f36b21e8caf22e Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge branch '5.4' into btleAlex Blasche2014-10-011-0/+2
|\ | | | | | | Change-Id: I3c00855a33c1015d159a67e5548fd29164668929
| * Add \since to all Qt Bluetooth classes which didn't have the tag yetAlex Blasche2014-09-261-0/+2
| | | | | | | | | | | | Change-Id: I50d818294cb53962bca2b08edbfdc4558890777c Task-number: QTBUG-36775 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
* | Port QBluetoothLocalDevice and QBluetoothDeviceDiscoveryAgent to OS X.Timur Pocheptsov2014-09-161-3/+21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QBluetoothLocalDevice and QBluetoothDeviceDiscoveryAgent for OS X - Bluetooth Classic (the implementation based on IOBluetooth). + a very simple non-gui test (requires QApplication to work though). Update 0: style issues reported by Qt-Bot + fix a test. Update 1: QBluetoothLocalDevice - display confirmation Update 2: Device discovery agent - follow the expected logic and apply suggested fixes. Update 3: started/finished delegate methods seems to be synchronous and immediately follow start/stop calls on an inquiry. Update 4: remove unused function and redundant error message. Update 5: the first attempt to fix pairingStatus/requestPairing on a local device. Update 6: on OS X it's impossible (with a given public API) to request 'Unpaired'. I was only able to find some quite terrible hacks with private APIs or even worse - playing with SystemConfiguration frameworks and changing System Preferencies programmatically (requires authorization and looks like a total hack, since it has nothing to do with Bluetooth framework). Update 7: A very limited support for deviceConnected and connectedDevices. Update 8: Fix an invalid invokeMethod's argument. Update 9: Subject changed. Update 10: fixes in a documentation. Update 11: asserts in a coding convetion/style. Update 12: "fix" asserts + emit errors if a start/stop failed. Update 13: deviceDisconnected implemented. Update 14: use not only paired && connected devices (QBluetoothLocalDevice::connectedDevices), but also devices discovered by the connection monitor. Update 15: remove a test, not required (there are 'auto' tests). Update 16: fix private headers - they MUST have _p suffix :( Update 17: tests are known to fail (at the moment) - IOBluetooth requires adjustment (QApplication instead of QCoreApplication, lack of ability to power on/off a device (not possible on Mac) + other things). Change-Id: Iea1c8a98f1fd719f4560ec8920d00cc07eaa8146 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I7a8b8b787fcae9a178794364efdefe1021d10b1b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge branch '5.3' into devAlex Blasche2014-06-271-1/+9
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/bluetooth/qbluetoothlocaldevice_bluez.cpp src/bluetooth/qbluetoothlocaldevice_p.h src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp Change-Id: Ifb0c01eb8bffbffcd2416ea8d7bf1d36eb1c70f2
| * Bluez4: Ensure QBluetoothLocalDevice becomes invalid if adapter disappearsAlex Blasche2014-05-271-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The DBus object disappears when the dongle is removed. Once a QBluetoothLocalDevice instance is invalid it remains invalid. The patch further ensures that an invalid instance does not initiate pairing activitiy. Last but not least this patch fixes a memory leak in case a DBus error occurs during the adapter initialization. Task-number: QTBUG-38399 Change-Id: I2e13e393060c77fab5f79d5451dd6fe9a2a6e3bb Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* | Fix coding style in QBluetoothOleg Shparber2014-04-231-12/+9
|/ | | | | | | | Affected: QBluetooth, QBluetoothAddress, QBluetoothDeviceDiscoveryAgent, QBluetoothDeviceInfo, QBluetoothHostInfo, QBluetoothLocalDevice Change-Id: Ia5af61f87eafecfba56b75fa61b81014cdd38960 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix a few TODOs around the source code and remove obsolete onesAlex Blasche2014-03-131-5/+9
| | | | | | Change-Id: I01e867cb5efb231e7c85b0d106897b2f31448977 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Port QtBluetooth to AndroidAlex Blasche2014-02-131-7/+32
| | | | | | | | | | | | | | | | | | | | | | This is a feature merge to dev targeting Qt 5.3. Known issues: -QTBUG-36754: QBluetoothServer::close() crashes -QTBUG-36763: QBluetothTransferManager port to Android not possible -QTBUG-36764: Improve QBluetoothLocalDevice::connectedDevices() -QTBUG-36810: Remove direct use of Android action strings The above issues and some other minor TODO's will be addressed until final release time. Task-number: QTBUG-33792 [ChangeLog][QtBluetooth][Android] QtBluetooth has been ported to Android. Change-Id: I31ba83e3b7d6aa68e7258b7e43235de7d1a6e68a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove const modifier from QBluetoothLocalDevice signals.Alex Blasche2014-01-241-3/+3
| | | | | | | | | Those signals were added in 5.3 and therefore it is still possible to change them. At the same time fix the documentation for the signals and its related function Change-Id: Ide0f7b07cf624f9692f830a2534b224212da223a Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-061-1/+0
|\ | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothlocaldevice_qnx.cpp src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp Change-Id: If7dd968047fec5352567e9b67ca5b8e680c7523d
| * Use QLoggingCategory to categorize the various debug output streamsAlex Blasche2013-12-201-1/+0
| | | | | | | | | | | | | | Task-number: QTBUG-32253 Change-Id: I193162407d0fc7eca83689e31f03e1641a494ab0 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Added new API for device "connected" statusOleksandr Matasov2013-11-121-0/+21
|/ | | | | | | | | | The feature allows to know whether QBluetoothLocalDevice is currently connected to any other device using connectedDevices() method. Change-Id: I4d1a19ebb0b42efd1fc5d5f0f9e7816aa956fbf4 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Remove QtBluetooth and QtNfc namespace.Alex Blasche2013-09-091-2/+2
| | | | | | | | This is based on namespace discussions on the Qt project dev mailing list. We continue to use the Qt namespace. Change-Id: I6119d06662f7682c11f42d759f3218be1f5a7d6c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Clarify the docs for QBluetoothLocalDevice(QBluetoothAddress(),0)Alex Blasche2013-08-071-1/+2
| | | | | | Change-Id: I2bdde67f1f0f6b71190d71b5559bbd88bb2db155 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QNX: Emit pairing finished signalFabian Bumberger2013-08-061-0/+1
| | | | | | | | | | Pairing finished signal is emitted after pairing was requested. Also fixes a typo and a bug where the q Pointer was not saved. Task-number: QTBUG-32247 Change-Id: Ia2d32fdafd9510908f278edda927071199326f5d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Improve and fix the qbluetoothlocaldevice testAlex Blasche2013-07-151-2/+4
| | | | | | | | The Bluez code was not passing the test. Task-number: QTBUG-22017 Change-Id: I0bc2fca7ec9d352481eea24c75b902c21b4fc0da Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Fix broken QBluetoothLocalDevice::isValid() behaviorAlex Blasche2013-06-281-10/+12
| | | | | | | | | | | | | | | The Bluez and QNX backend always returned true. They should only return true if the local device is truly available or if the passed QBluetoothAddress is indeed one of the local bluetooth devices. The related unit test was extended to ensure common bahvior of invalid QBluetoothLocalDevice instance on all platforms. Task-number: QTBUG-32068 Change-Id: I40ab4db48dc82ba0d1c0bb5275e96a3ee812b01a Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex <alexander.blasche@digia.com>
* Update Copyright headersAlex Blasche2013-06-251-1/+1
| | | | | | | | | - Update Digia's copyright year - Add copyright to files without it - Convert old BSD to new LGPL license for auto test code Change-Id: I47f5c871c436f9c2731b235026434448719cc671 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Rename NFC and Bluetooth namespace macros.Aaron McCarthy2013-02-141-2/+2
| | | | | | | | Renamed to the namespace macros to follow what syncqt expects. This fixes missing namespace macro warnings printed by syncqt. Change-Id: I7be5a700e8435a559cb4c2e74938851233095887 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Qt Bluetooth: Created \qmlmodule and \module pagesJerome Pasion2012-09-291-3/+2
| | | | | | | | These pages will list the C++ classes and the QML types in Qt Bluetooth. Removed extra groups. Change-Id: I27d7004d804cc0cc29af997f3a11fcc9f9477efb Reviewed-by: Alex <ablasche@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I4f07028d0bf0b3ba4c4649897b80687ea5e51abc Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* clarify Bluetooth power situation in docsMichael Zanetti2012-06-131-0/+6
| | | | | | | add a note to docs that powering Bluetooth on and off might behave differently on different platforms Change-Id: I461aa651c21e07bcd56a7c7e7eca9c73084d81d7 Reviewed-by: Alex <alex.blasche@nokia.com>
* Language edits to the QDoc markupVenugopal Shivashankar2012-02-291-18/+16
| | | | | Change-Id: I13206b25dbd87ce0d066cb21842dfbd516bd2bbc Reviewed-by: Alex <alex.blasche@nokia.com>
* Modified the \brief text for the Bluetooth C++ classes and the QML elements.veshivas2012-02-281-1/+1
| | | | | | Change-Id: I3c455739afe9d63eb822a0462c7e786bd83259ee Reviewed-by: Gary Aish <gary.aish@nokia.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I84f8c423bd7748bbae495fedae696990414cee83 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* added documentation and examplesMichael Zanetti2012-01-231-2/+1
| | | | | | Change-Id: Ia99e5f8f9579c189379bce1a22de3d58b12ce5fc Reviewed-by: Alex <alex.blasche@nokia.com> Sanity-Review: Alex <alex.blasche@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-201-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I1c6ba5c87f0eca30b6f01f4245a032262d30f8ce Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | | Change-Id: I76920b22a5b386a0f85ec28076da20505c022b6f Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* added Connectivity namespaces (QtBluetooth and QtNfc)Michael Zanetti2011-11-111-2/+5
| | | | | | Change-Id: I5f3062c857e657a6d05ab29edfa2f1b48cb173f8 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* Initial commit.Michael Zanetti2011-08-241-0/+239
From qt5connectivity.tar.gz, md5 317c149d6f8c07d09632353188582834