summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/pingpong
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-09-26 14:14:46 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-09-26 15:16:30 +0200
commitb32a8ffc58ded44c34da6baae63898f1e4f95808 (patch)
tree8409296c44f33ec8943c903591c1552247f9e759 /examples/bluetooth/pingpong
parent69b384803ffe0e6e3329feed5abf5cafdcd7034b (diff)
Fix pingpong example
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>
Diffstat (limited to 'examples/bluetooth/pingpong')
-rw-r--r--examples/bluetooth/pingpong/assets/Menu.qml4
-rw-r--r--examples/bluetooth/pingpong/pingpong.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/bluetooth/pingpong/assets/Menu.qml b/examples/bluetooth/pingpong/assets/Menu.qml
index 719cac3a..b14c7b2d 100644
--- a/examples/bluetooth/pingpong/assets/Menu.qml
+++ b/examples/bluetooth/pingpong/assets/Menu.qml
@@ -77,7 +77,7 @@ Rectangle {
font.bold: true
text: "Start PingPong server"
color: "#E3E3E3"
- elide: Text.ElideMiddle
+ wrapMode: Text.WordWrap
}
MouseArea {
@@ -105,7 +105,7 @@ Rectangle {
font.bold: true
text: "Start PingPong client"
color: "#E3E3E3"
- elide: Text.ElideMiddle
+ wrapMode: Text.WordWrap
}
MouseArea {
diff --git a/examples/bluetooth/pingpong/pingpong.cpp b/examples/bluetooth/pingpong/pingpong.cpp
index 6d9466e9..423eced4 100644
--- a/examples/bluetooth/pingpong/pingpong.cpp
+++ b/examples/bluetooth/pingpong/pingpong.cpp
@@ -320,7 +320,7 @@ void PingPong::addService(const QBluetoothServiceInfo &service)
{
setMessage("Service found. Setting parameters...");
//! [Connecting the socket]
- socket = new QBluetoothSocket(QBluetoothServiceInfo::L2capProtocol);
+ socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol);
socket->connectToService(service);
connect(socket, SIGNAL(readyRead()), this, SLOT(readSocket()));