summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/pingpong
Commit message (Collapse)AuthorAgeFilesLines
* Avoid multiple client sockets in pingpong bluetooth exampleJuha Vuolle2022-02-121-2/+6
| | | | | | | | | | | | | This commit guards against creating multiple client sockets if multiple services are found. In addition the service scanning is stopped when a service has been found and we start connecting a bluetooth socket. Fixes: QTBUG-100289 Change-Id: Iac2e7eaca17a186ac2d2f62e338be16911f08032 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 788c4980e67386d2407c4c7bc7182430fc9054c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PingPong example: let the parent QObject do the cleanupIvan Solovev2022-01-241-2/+1
| | | | | | | | | | | | | The m_timer and m_serverInfo instances are created using 'this' as a parent, so we do not need to explicitly delete them in the destructor, but let the parent object deal with them. This also prevents a crash at application close. Change-Id: If91f01e1ab6dc8e839a06773464eeb9858d2fd36 Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 4d2df2461f304eb7e1db5030e1c63d17bc2bac85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Store the serviceinfo in pingpong exampleJuha Vuolle2022-01-241-1/+1
| | | | | | | | | | | | | | | The service info returned by the QBluetoothServer::listen() overload that returns it needs to be stored or otherwise it will be destroyed. The consequence was that the SDP "advertisement" didn't properly include the added pingpong service record on Windows. Task-number: QTBUG-100042 Change-Id: I79cbd0f574e35bbc1c9c3123ce8382f3aad296d4 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit debf0fd212b232bcd83c8bb8f51ba2bad2f57a1c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update Bluetooth examples for high-DPI displays and nullptrAndre de la Rocha2019-06-061-0/+1
| | | | | | | | | This change sets the Qt::AA_EnableHighDpiScaling application attribute. It also uses nullptr to initialize pointers and adds a trivial optimization to the low energy scanner example. Change-Id: Ia923573ad78108a2a6a72be4c0948ea97a7ec094 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix outdated BSD license headerKai Koehne2017-10-177-14/+84
| | | | | Change-Id: I28f5936913a6127806325df34af4bf71a142e72e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix outdated FDL license headerKai Koehne2017-10-161-5/+5
| | | | | Change-Id: Ia26b0bf499f8a0b6040e82bc1d460bee688bfbf6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Improve pingpong exampleAlex Blasche2017-06-284-21/+32
| | | | | | | | | | | The following adjustments were done: - Use new Qt connect syntax - Add QLoggingCatergory enablers (easy to enable by uncommenting) - Makes the UI more robust to High vs Low DPI issues Change-Id: Iad99a67ac375de828883b4add99d440f7a6994c6 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Adjust pingpong example to Android UUID SDP discovery bugAlex Blasche2017-06-233-1/+14
| | | | | | | Task-number: QTBUG-61392 Change-Id: Ie2173b57093db9285e8fc90dbec66f81b002f7c6 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Update copyright headersJani Heikkinen2015-02-168-27/+27
| | | | | | | | | 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>
* QtBluetooth : pingpong example on OS XTimur Pocheptsov2014-09-261-12/+12
| | | | | | | Re-order some declarations to make the example work on OS X. Change-Id: I9e74ce7b19a3d749f6ba0f951c1ce013f42729f7 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix pingpong exampleAlex Blasche2014-09-262-3/+3
| | | | | | | | | | | | | | | 1.) ElidedMiddle makes the text disappear on Debian and Ubuntu. Swapping elide mode to wrap mode which serves the same purpose 2.) The server was started as rfcomm channel but the client used L2Cap protocol. It may have worked anyway because rfcomm is based on l2cap. In any case this shouldn't be relied upon especially since some platforms don't support l2cap sockets as part of the public API offering. This way the example becomes more widely usable. Change-Id: Ibbcd7029d5843e86af0313037b6433017eb92c76 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge branch 'stable' into devAlex Blasche2014-05-081-2/+4
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/bluetooth/qbluetoothlocaldevice_bluez.cpp src/bluetooth/qbluetoothserver_p.h src/bluetooth/qbluetoothsocket_qnx.cpp Change-Id: I08792f10155f9b4e6af30066b70e24b48985ddd6
| * Doc: Improved example documentationJerome Pasion2014-04-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | -include a section about running the example (from qtbase/doc/global) -added links to Qt Bluetooth or Qt NFC -updated copyright year -added markup to a string and other small corrections -added \brief Task-number: QTBUG-33597 Change-Id: Ia65821549a0e2e3fbf164188982114b4741be233 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
* | Replace all occurrences of Q_EMIT with emitOleg Shparber2014-04-291-12/+12
|/ | | | | Change-Id: Ieec72048837abe70b0187086b265bcde96c7d6cd Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QML PingPong example addedNedim Hadzic2014-04-0212-0/+1185
Example presents the socket communication between two Bluetooth devices. The basic concept is the ping pong game, where coordinate updates of the ball and pedals are sent via socket. Change-Id: I61d8eb0baaa11c1485a923bb0a6ae6b89cd0e6a9 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>