summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-02-11 07:44:36 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-02-11 07:44:46 +0100
commit3264db95f965a47f31ffe1ab768467ce827e41e9 (patch)
tree43235b62d755f1961de895e5b121362c54c33683 /examples
parent515ccffb8d56b42c89e9c2c04abe0ef2619ece4e (diff)
parentb398e069ca8bd01ba7ca67781b7ca21402ffdbbe (diff)
Merge remote-tracking branch 'gerrit/5.4' into dev
Diffstat (limited to 'examples')
-rw-r--r--examples/bluetooth/btchat/chatserver.cpp4
-rw-r--r--examples/bluetooth/btchat/main.cpp2
-rw-r--r--examples/bluetooth/btchat/remoteselector.cpp2
3 files changed, 7 insertions, 1 deletions
diff --git a/examples/bluetooth/btchat/chatserver.cpp b/examples/bluetooth/btchat/chatserver.cpp
index 6da4b471..6848e2d7 100644
--- a/examples/bluetooth/btchat/chatserver.cpp
+++ b/examples/bluetooth/btchat/chatserver.cpp
@@ -101,8 +101,10 @@ void ChatServer::startServer(const QBluetoothAddress& localAdapter)
//! [Service UUID set]
//! [Service Discoverability]
+ QBluetoothServiceInfo::Sequence publicBrowse;
+ publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList,
- QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
+ publicBrowse);
//! [Service Discoverability]
//! [Protocol descriptor list]
diff --git a/examples/bluetooth/btchat/main.cpp b/examples/bluetooth/btchat/main.cpp
index ac23a11d..ed362d23 100644
--- a/examples/bluetooth/btchat/main.cpp
+++ b/examples/bluetooth/btchat/main.cpp
@@ -41,9 +41,11 @@
#include "chat.h"
#include <QApplication>
+//#include <QtCore/QLoggingCategory>
int main(int argc, char *argv[])
{
+ //QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
QApplication app(argc, argv);
Chat d;
diff --git a/examples/bluetooth/btchat/remoteselector.cpp b/examples/bluetooth/btchat/remoteselector.cpp
index 79dc0564..913988a2 100644
--- a/examples/bluetooth/btchat/remoteselector.cpp
+++ b/examples/bluetooth/btchat/remoteselector.cpp
@@ -136,6 +136,8 @@ void RemoteSelector::on_remoteDevices_itemActivated(QListWidgetItem *item)
{
qDebug() << "got click" << item->text();
m_service = m_discoveredServices.value(item);
+ if (m_discoveryAgent->isActive())
+ m_discoveryAgent->stop();
accept();
}