summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qmlmanager.cpp11
-rw-r--r--mobile-widgets/qmlmanager.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 8cc2ca940..232b50cfa 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1757,6 +1757,17 @@ void QMLManager::setStatusbarColor(QColor)
#endif
+void QMLManager::retrieveBluetoothName()
+{
+ QString name = DC_devName();
+ QList<BTDiscovery::btVendorProduct> btDCs = BTDiscovery::instance()->getBtDcs();
+ foreach (BTDiscovery::btVendorProduct btDC, btDCs) {
+ qDebug() << "compare" <<name << btDC.btpdi.address;
+ if (name.contains(btDC.btpdi.address))
+ DC_setDevBluetoothName(btDC.btpdi.name);
+ }
+}
+
QString QMLManager::DC_vendor() const
{
return DCDeviceData::instance()->vendor();
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index 7d14b9eb9..2812ae08f 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -62,6 +62,8 @@ public:
QString DC_devName() const;
void DC_setDevName(const QString& devName);
+ Q_INVOKABLE void retrieveBluetoothName();
+
QString DC_devBluetoothName() const;
void DC_setDevBluetoothName(const QString& devBluetoothName);