Blame bluedevil-5.3-adapt-to-bluez-qt-5-11-API-changes.patch

Dan Vrátil f88c13
diff --git a/src/applet/package/contents/ui/BluetoothApplet.qml b/src/applet/package/contents/ui/BluetoothApplet.qml
Dan Vrátil f88c13
index 834d034..d685cb2 100644
Dan Vrátil f88c13
--- a/src/applet/package/contents/ui/BluetoothApplet.qml
Dan Vrátil f88c13
+++ b/src/applet/package/contents/ui/BluetoothApplet.qml
Dan Vrátil f88c13
@@ -31,6 +31,7 @@ Item {
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     property bool deviceConnected : false
Dan Vrátil f88c13
     property int runningActions : 0
Dan Vrátil f88c13
+    property QtObject btManager : BluezQt.Manager
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     Plasmoid.toolTipMainText: i18n("Bluetooth")
Dan Vrátil f88c13
     Plasmoid.icon: Logic.icon()
Dan Vrátil f88c13
@@ -44,11 +45,7 @@ Item {
Dan Vrátil f88c13
         focus: true
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    BluezQt.Manager {
Dan Vrátil f88c13
-        id: btManager
Dan Vrátil f88c13
-
Dan Vrátil f88c13
-        onInitFinished: {
Dan Vrátil f88c13
-            Logic.init();
Dan Vrátil f88c13
-        }
Dan Vrátil f88c13
+    Component.onCompleted: {
Dan Vrátil f88c13
+        Logic.init();
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
 }
Dan Vrátil f88c13
diff --git a/src/applet/package/contents/ui/DeviceItem.qml b/src/applet/package/contents/ui/DeviceItem.qml
Dan Vrátil f88c13
index 19b55cf..b0fc9ce 100644
Dan Vrátil f88c13
--- a/src/applet/package/contents/ui/DeviceItem.qml
Dan Vrátil f88c13
+++ b/src/applet/package/contents/ui/DeviceItem.qml
Dan Vrátil f88c13
@@ -378,10 +378,10 @@ PlasmaComponents.ListItem {
Dan Vrátil f88c13
             return i18n("Connecting");
Dan Vrátil f88c13
         }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-        switch (DeviceType) {
Dan Vrátil f88c13
+        switch (Type) {
Dan Vrátil f88c13
         case BluezQt.Device.Headset:
Dan Vrátil f88c13
         case BluezQt.Device.Headphones:
Dan Vrátil f88c13
-        case BluezQt.Device.OtherAudio:
Dan Vrátil f88c13
+        case BluezQt.Device.AudioVideo:
Dan Vrátil f88c13
             return i18n("Audio device");
Dan Vrátil f88c13
 
Dan Vrátil f88c13
         case BluezQt.Device.Keyboard:
Dan Vrátil f88c13
@@ -422,7 +422,7 @@ PlasmaComponents.ListItem {
Dan Vrátil f88c13
     function connectToDevice()
Dan Vrátil f88c13
     {
Dan Vrátil f88c13
         if (Connected) {
Dan Vrátil f88c13
-            Device.disconnectDevice();
Dan Vrátil f88c13
+            Device.disconnectFromDevice();
Dan Vrátil f88c13
             return;
Dan Vrátil f88c13
         }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
@@ -433,7 +433,7 @@ PlasmaComponents.ListItem {
Dan Vrátil f88c13
         connecting = true;
Dan Vrátil f88c13
         runningActions++;
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-        var call = Device.connectDevice();
Dan Vrátil f88c13
+        var call = Device.connectToDevice();
Dan Vrátil f88c13
         call.userData = Device;
Dan Vrátil f88c13
 
Dan Vrátil f88c13
         call.finished.connect(function(call) {
Dan Vrátil f88c13
diff --git a/src/applet/package/contents/ui/FullRepresentation.qml b/src/applet/package/contents/ui/FullRepresentation.qml
Dan Vrátil f88c13
index 849ae4e..94df8b4 100644
Dan Vrátil f88c13
--- a/src/applet/package/contents/ui/FullRepresentation.qml
Dan Vrátil f88c13
+++ b/src/applet/package/contents/ui/FullRepresentation.qml
Dan Vrátil f88c13
@@ -28,9 +28,7 @@ import org.kde.plasma.private.bluetooth 1.0 as PlasmaBt
Dan Vrátil f88c13
 FocusScope {
Dan Vrátil f88c13
     PlasmaBt.DevicesProxyModel {
Dan Vrátil f88c13
         id: devicesModel
Dan Vrátil f88c13
-        sourceModel: BluezQt.DevicesModel {
Dan Vrátil f88c13
-            manager: btManager
Dan Vrátil f88c13
-        }
Dan Vrátil f88c13
+        sourceModel: BluezQt.DevicesModel { }
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     PlasmaExtras.Heading {
Dan Vrátil f88c13
diff --git a/src/daemon/kded/devicemonitor.cpp b/src/daemon/kded/devicemonitor.cpp
Dan Vrátil f88c13
index 29ac2f3..22c8020 100644
Dan Vrátil f88c13
--- a/src/daemon/kded/devicemonitor.cpp
Dan Vrátil f88c13
+++ b/src/daemon/kded/devicemonitor.cpp
Dan Vrátil f88c13
@@ -147,7 +147,7 @@ void DeviceMonitor::restoreState()
Dan Vrátil f88c13
     Q_FOREACH (const QString &addr, connectedDevices) {
Dan Vrátil f88c13
         BluezQt::DevicePtr device = m_manager->deviceForAddress(addr);
Dan Vrátil f88c13
         if (device) {
Dan Vrátil f88c13
-            device->connectDevice();
Dan Vrátil f88c13
+            device->connectToDevice();
Dan Vrátil f88c13
         }
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
 }
Dan Vrátil f88c13
diff --git a/src/daemon/kded/filereceiver/obexagent.cpp b/src/daemon/kded/filereceiver/obexagent.cpp
Dan Vrátil f88c13
index 9cd98ff..6ffd620 100644
Dan Vrátil f88c13
--- a/src/daemon/kded/filereceiver/obexagent.cpp
Dan Vrátil f88c13
+++ b/src/daemon/kded/filereceiver/obexagent.cpp
Dan Vrátil f88c13
@@ -49,11 +49,11 @@ QDBusObjectPath ObexAgent::objectPath() const
Dan Vrátil f88c13
     return QDBusObjectPath(QStringLiteral("/BlueDevilObexAgent"));
Dan Vrátil f88c13
 }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-void ObexAgent::authorizePush(BluezQt::ObexTransferPtr transfer, const BluezQt::Request<QString> &request)
Dan Vrátil f88c13
+void ObexAgent::authorizePush(BluezQt::ObexTransferPtr transfer, BluezQt::ObexSessionPtr session, const BluezQt::Request<QString> &request)
Dan Vrátil f88c13
 {
Dan Vrátil f88c13
     qCDebug(BLUEDAEMON) << "Agent-AuthorizePush";
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    ReceiveFileJob *job = new ReceiveFileJob(request, transfer, this);
Dan Vrátil f88c13
+    ReceiveFileJob *job = new ReceiveFileJob(request, transfer, session, this);
Dan Vrátil f88c13
     connect(job, &ReceiveFileJob::finished, this, &ObexAgent::receiveFileJobFinished);
Dan Vrátil f88c13
     job->start();
Dan Vrátil f88c13
 }
Dan Vrátil f88c13
diff --git a/src/daemon/kded/filereceiver/obexagent.h b/src/daemon/kded/filereceiver/obexagent.h
Dan Vrátil f88c13
index 0f5adc5..e32f1fe 100644
Dan Vrátil f88c13
--- a/src/daemon/kded/filereceiver/obexagent.h
Dan Vrátil f88c13
+++ b/src/daemon/kded/filereceiver/obexagent.h
Dan Vrátil f88c13
@@ -40,7 +40,7 @@ public:
Dan Vrátil f88c13
     bool shouldAutoAcceptTransfer(const QString &address) const;
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     QDBusObjectPath objectPath() const Q_DECL_OVERRIDE;
Dan Vrátil f88c13
-    void authorizePush(BluezQt::ObexTransferPtr transfer, const BluezQt::Request<QString> &request) Q_DECL_OVERRIDE;
Dan Vrátil f88c13
+    void authorizePush(BluezQt::ObexTransferPtr transfer, BluezQt::ObexSessionPtr session, const BluezQt::Request<QString> &request) Q_DECL_OVERRIDE;
Dan Vrátil f88c13
 
Dan Vrátil f88c13
 private Q_SLOTS:
Dan Vrátil f88c13
     void receiveFileJobFinished(KJob *job);
Dan Vrátil f88c13
diff --git a/src/daemon/kded/filereceiver/receivefilejob.cpp b/src/daemon/kded/filereceiver/receivefilejob.cpp
Dan Vrátil f88c13
index 1569163..fbb04b5 100644
Dan Vrátil f88c13
--- a/src/daemon/kded/filereceiver/receivefilejob.cpp
Dan Vrátil f88c13
+++ b/src/daemon/kded/filereceiver/receivefilejob.cpp
Dan Vrátil f88c13
@@ -36,11 +36,12 @@
Dan Vrátil f88c13
 #include <BluezQt/Device>
Dan Vrátil f88c13
 #include <BluezQt/ObexSession>
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-ReceiveFileJob::ReceiveFileJob(const BluezQt::Request<QString> &req, BluezQt::ObexTransferPtr transfer, ObexAgent *parent)
Dan Vrátil f88c13
+ReceiveFileJob::ReceiveFileJob(const BluezQt::Request<QString> &req, BluezQt::ObexTransferPtr transfer, BluezQt::ObexSessionPtr session, ObexAgent *parent)
Dan Vrátil f88c13
     : KJob(parent)
Dan Vrátil f88c13
     , m_speedBytes(0)
Dan Vrátil f88c13
     , m_agent(parent)
Dan Vrátil f88c13
     , m_transfer(transfer)
Dan Vrátil f88c13
+    , m_session(session)
Dan Vrátil f88c13
     , m_request(req)
Dan Vrátil f88c13
 {
Dan Vrátil f88c13
     setCapabilities(Killable);
Dan Vrátil f88c13
@@ -74,24 +75,24 @@ void ReceiveFileJob::init()
Dan Vrátil f88c13
     qCDebug(BLUEDAEMON) << "\tTransferred:" << m_transfer->transferred();
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     qCDebug(BLUEDAEMON) << "ObexSession:";
Dan Vrátil f88c13
-    qCDebug(BLUEDAEMON) << "\tSource:" << m_transfer->session()->source();
Dan Vrátil f88c13
-    qCDebug(BLUEDAEMON) << "\tDestination:" << m_transfer->session()->destination();
Dan Vrátil f88c13
+    qCDebug(BLUEDAEMON) << "\tSource:" << m_session->source();
Dan Vrátil f88c13
+    qCDebug(BLUEDAEMON) << "\tDestination:" << m_session->destination();
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     connect(m_transfer.data(), &BluezQt::ObexTransfer::statusChanged, this, &ReceiveFileJob::statusChanged);
Dan Vrátil f88c13
     connect(m_transfer.data(), &BluezQt::ObexTransfer::transferredChanged, this, &ReceiveFileJob::transferredChanged);
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    m_deviceName = m_transfer->session()->destination();
Dan Vrátil f88c13
+    m_deviceName = m_session->destination();
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    BluezQt::AdapterPtr adapter = m_agent->manager()->adapterForAddress(m_transfer->session()->source());
Dan Vrátil f88c13
+    BluezQt::AdapterPtr adapter = m_agent->manager()->adapterForAddress(m_session->source());
Dan Vrátil f88c13
     if (!adapter) {
Dan Vrátil f88c13
-        qCDebug(BLUEDAEMON) << "No adapter for" << m_transfer->session()->source();
Dan Vrátil f88c13
+        qCDebug(BLUEDAEMON) << "No adapter for" << m_session->source();
Dan Vrátil f88c13
         showNotification();
Dan Vrátil f88c13
         return;
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    BluezQt::DevicePtr device = adapter->deviceForAddress(m_transfer->session()->destination());
Dan Vrátil f88c13
+    BluezQt::DevicePtr device = adapter->deviceForAddress(m_session->destination());
Dan Vrátil f88c13
     if (!device) {
Dan Vrátil f88c13
-        qCDebug(BLUEDAEMON) << "No device for" << m_transfer->session()->destination();
Dan Vrátil f88c13
+        qCDebug(BLUEDAEMON) << "No device for" << m_session->destination();
Dan Vrátil f88c13
         showNotification();
Dan Vrátil f88c13
         return;
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
diff --git a/src/daemon/kded/filereceiver/receivefilejob.h b/src/daemon/kded/filereceiver/receivefilejob.h
Dan Vrátil f88c13
index 461d453..801bb45 100644
Dan Vrátil f88c13
--- a/src/daemon/kded/filereceiver/receivefilejob.h
Dan Vrátil f88c13
+++ b/src/daemon/kded/filereceiver/receivefilejob.h
Dan Vrátil f88c13
@@ -34,7 +34,7 @@ class ReceiveFileJob : public KJob
Dan Vrátil f88c13
     Q_OBJECT
Dan Vrátil f88c13
 
Dan Vrátil f88c13
 public:
Dan Vrátil f88c13
-    explicit ReceiveFileJob(const BluezQt::Request<QString> &req, BluezQt::ObexTransferPtr transfer, ObexAgent *parent);
Dan Vrátil f88c13
+    explicit ReceiveFileJob(const BluezQt::Request<QString> &req, BluezQt::ObexTransferPtr transfer, BluezQt::ObexSessionPtr session, ObexAgent *parent);
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     QString deviceAddress() const;
Dan Vrátil f88c13
 
Dan Vrátil f88c13
@@ -63,6 +63,7 @@ private:
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     ObexAgent *m_agent;
Dan Vrátil f88c13
     BluezQt::ObexTransferPtr m_transfer;
Dan Vrátil f88c13
+    BluezQt::ObexSessionPtr m_session;
Dan Vrátil f88c13
     BluezQt::Request<QString> m_request;
Dan Vrátil f88c13
 };
Dan Vrátil f88c13
 
Dan Vrátil f88c13
diff --git a/src/kcmodule/bluedevildevices.cpp b/src/kcmodule/bluedevildevices.cpp
Dan Vrátil f88c13
index b1b6b0e..deafecc 100644
Dan Vrátil f88c13
--- a/src/kcmodule/bluedevildevices.cpp
Dan Vrátil f88c13
+++ b/src/kcmodule/bluedevildevices.cpp
Dan Vrátil f88c13
@@ -113,7 +113,7 @@ void BluetoothDevicesDelegate::paint(QPainter *painter, const QStyleOptionViewIt
Dan Vrátil f88c13
     painter->setFont(f);
Dan Vrátil f88c13
     painter->drawText(r, Qt::AlignLeft | Qt::AlignTop, index.data(BluezQt::DevicesModel::FriendlyNameRole).toString());
Dan Vrátil f88c13
     painter->restore();
Dan Vrátil f88c13
-    painter->drawText(r, Qt::AlignLeft | Qt::AlignBottom, deviceTypeString(index.data(BluezQt::DevicesModel::DeviceTypeRole).toInt()));
Dan Vrátil f88c13
+    painter->drawText(r, Qt::AlignLeft | Qt::AlignBottom, deviceTypeString(index.data(BluezQt::DevicesModel::TypeRole).toInt()));
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     // Draw state
Dan Vrátil f88c13
     r = option.rect;
Dan Vrátil f88c13
@@ -166,7 +166,7 @@ QString BluetoothDevicesDelegate::deviceTypeString(int type) const
Dan Vrátil f88c13
             return i18nc("This device is a Headset", "Headset");
Dan Vrátil f88c13
         case BluezQt::Device::Headphones:
Dan Vrátil f88c13
             return i18nc("This device are Headphones", "Headphones");
Dan Vrátil f88c13
-        case BluezQt::Device::OtherAudio:
Dan Vrátil f88c13
+        case BluezQt::Device::AudioVideo:
Dan Vrátil f88c13
             return i18nc("This device is of type Audio", "Audio");
Dan Vrátil f88c13
         case BluezQt::Device::Keyboard:
Dan Vrátil f88c13
             return i18nc("This device is a Keyboard", "Keyboard");
Dan Vrátil f88c13
@@ -349,14 +349,14 @@ void KCMBlueDevilDevices::removeDevice()
Dan Vrátil f88c13
 void KCMBlueDevilDevices::connectDevice()
Dan Vrátil f88c13
 {
Dan Vrátil f88c13
     BluezQt::DevicePtr device = m_devicesModel->device(m_devices->currentIndex());
Dan Vrátil f88c13
-    device->connectDevice();
Dan Vrátil f88c13
+    device->connectToDevice();
Dan Vrátil f88c13
 }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
 void KCMBlueDevilDevices::disconnectDevice()
Dan Vrátil f88c13
 {
Dan Vrátil f88c13
     m_disconnectDevice->setEnabled(false);
Dan Vrátil f88c13
     BluezQt::DevicePtr device = m_devicesModel->device(m_devices->currentIndex());
Dan Vrátil f88c13
-    device->disconnectDevice();
Dan Vrátil f88c13
+    device->disconnectFromDevice();
Dan Vrátil f88c13
 }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
 void KCMBlueDevilDevices::launchWizard()
Dan Vrátil f88c13
diff --git a/src/kio/obexftp/daemon/obexftpdaemon.cpp b/src/kio/obexftp/daemon/obexftpdaemon.cpp
Dan Vrátil f88c13
index a2cdac4..45a1f75 100644
Dan Vrátil f88c13
--- a/src/kio/obexftp/daemon/obexftpdaemon.cpp
Dan Vrátil f88c13
+++ b/src/kio/obexftp/daemon/obexftpdaemon.cpp
Dan Vrátil f88c13
@@ -34,6 +34,7 @@
Dan Vrátil f88c13
 #include <BluezQt/InitObexManagerJob>
Dan Vrátil f88c13
 #include <BluezQt/ObexFileTransfer>
Dan Vrátil f88c13
 #include <BluezQt/PendingCall>
Dan Vrátil f88c13
+#include <BluezQt/ObexSession>
Dan Vrátil f88c13
 
Dan Vrátil f88c13
 K_PLUGIN_FACTORY_WITH_JSON(ObexFtpFactory,
Dan Vrátil f88c13
                            "obexftpdaemon.json",
Dan Vrátil f88c13
@@ -208,9 +209,9 @@ void ObexFtpDaemon::operationalChanged(bool operational)
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
 }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-void ObexFtpDaemon::sessionRemoved(const QDBusObjectPath &session)
Dan Vrátil f88c13
+void ObexFtpDaemon::sessionRemoved(BluezQt::ObexSessionPtr session)
Dan Vrátil f88c13
 {
Dan Vrátil f88c13
-    const QString &path = session.path();
Dan Vrátil f88c13
+    const QString &path = session->objectPath().path();
Dan Vrátil f88c13
     const QString &key = d->m_sessionMap.key(path);
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     if (!d->m_sessionMap.contains(key)) {
Dan Vrátil f88c13
diff --git a/src/kio/obexftp/daemon/obexftpdaemon.h b/src/kio/obexftp/daemon/obexftpdaemon.h
Dan Vrátil f88c13
index c42d720..a902333 100644
Dan Vrátil f88c13
--- a/src/kio/obexftp/daemon/obexftpdaemon.h
Dan Vrátil f88c13
+++ b/src/kio/obexftp/daemon/obexftpdaemon.h
Dan Vrátil f88c13
@@ -23,6 +23,8 @@
Dan Vrátil f88c13
 
Dan Vrátil f88c13
 #include <KDEDModule>
Dan Vrátil f88c13
 
Dan Vrátil f88c13
+#include <BluezQt/Types>
Dan Vrátil f88c13
+
Dan Vrátil f88c13
 namespace BluezQt
Dan Vrátil f88c13
 {
Dan Vrátil f88c13
     class InitObexManagerJob;
Dan Vrátil f88c13
@@ -52,7 +54,7 @@ private Q_SLOTS:
Dan Vrátil f88c13
     void cancelTransferFinished(QDBusPendingCallWatcher *watcher);
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     void operationalChanged(bool operational);
Dan Vrátil f88c13
-    void sessionRemoved(const QDBusObjectPath &session);
Dan Vrátil f88c13
+    void sessionRemoved(BluezQt::ObexSessionPtr session);
Dan Vrátil f88c13
 
Dan Vrátil f88c13
 private:
Dan Vrátil f88c13
     struct Private;
Dan Vrátil f88c13
diff --git a/src/kio/obexftp/kioobexftp.cpp b/src/kio/obexftp/kioobexftp.cpp
Dan Vrátil f88c13
index cb8d3b1..47910b4 100644
Dan Vrátil f88c13
--- a/src/kio/obexftp/kioobexftp.cpp
Dan Vrátil f88c13
+++ b/src/kio/obexftp/kioobexftp.cpp
Dan Vrátil f88c13
@@ -442,24 +442,24 @@ QList<KIO::UDSEntry> KioFtp::listFolder(const QUrl &url, bool *ok)
Dan Vrátil f88c13
         return list;
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    const QList<BluezQt::ObexFileTransfer::Item> &items = call->value().value<QList<BluezQt::ObexFileTransfer::Item> >();
Dan Vrátil f88c13
+    const QList<BluezQt::ObexFileTransferEntry> &items = call->value().value<QList<BluezQt::ObexFileTransferEntry> >();
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    Q_FOREACH (const BluezQt::ObexFileTransfer::Item &item, items) {
Dan Vrátil f88c13
+    Q_FOREACH (const BluezQt::ObexFileTransferEntry &item, items) {
Dan Vrátil f88c13
         KIO::UDSEntry entry;
Dan Vrátil f88c13
-        entry.insert(KIO::UDSEntry::UDS_NAME, item.name);
Dan Vrátil f88c13
-        entry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME, item.label);
Dan Vrátil f88c13
+        entry.insert(KIO::UDSEntry::UDS_NAME, item.name());
Dan Vrátil f88c13
+        entry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME, item.label());
Dan Vrátil f88c13
         entry.insert(KIO::UDSEntry::UDS_ACCESS, 0700);
Dan Vrátil f88c13
-        entry.insert(KIO::UDSEntry::UDS_MODIFICATION_TIME, item.modified.toTime_t());
Dan Vrátil f88c13
-        entry.insert(KIO::UDSEntry::UDS_SIZE, item.size);
Dan Vrátil f88c13
+        entry.insert(KIO::UDSEntry::UDS_MODIFICATION_TIME, item.modificationTime().toTime_t());
Dan Vrátil f88c13
+        entry.insert(KIO::UDSEntry::UDS_SIZE, item.size());
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-        if (item.type == BluezQt::ObexFileTransfer::Item::Folder) {
Dan Vrátil f88c13
+        if (item.type() == BluezQt::ObexFileTransferEntry::Folder) {
Dan Vrátil f88c13
             entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
Dan Vrátil f88c13
         } else {
Dan Vrátil f88c13
             entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFREG);
Dan Vrátil f88c13
         }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
         if (urlIsRoot(url)) {
Dan Vrátil f88c13
-            updateRootEntryIcon(entry, item.memoryType);
Dan Vrátil f88c13
+            updateRootEntryIcon(entry, item.memoryType());
Dan Vrátil f88c13
         }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
         list.append(entry);
Dan Vrátil f88c13
@@ -467,7 +467,7 @@ QList<KIO::UDSEntry> KioFtp::listFolder(const QUrl &url, bool *ok)
Dan Vrátil f88c13
         // Most probably the client of the kio will stat each file
Dan Vrátil f88c13
         // so since we are on it, let's cache all of them.
Dan Vrátil f88c13
         QUrl statUrl = url;
Dan Vrátil f88c13
-        statUrl.setPath(statUrl.path() + QLatin1Char('/') + item.name);
Dan Vrátil f88c13
+        statUrl.setPath(statUrl.path() + QLatin1Char('/') + item.name());
Dan Vrátil f88c13
 
Dan Vrátil f88c13
         if (!m_statMap.contains(statUrl.toDisplayString())) {
Dan Vrátil f88c13
             qCDebug(OBEXFTP) << "Stat:"
Dan Vrátil f88c13
diff --git a/src/wizard/pages/connect.cpp b/src/wizard/pages/connect.cpp
Dan Vrátil f88c13
index 1880c08..082cb10 100644
Dan Vrátil f88c13
--- a/src/wizard/pages/connect.cpp
Dan Vrátil f88c13
+++ b/src/wizard/pages/connect.cpp
Dan Vrátil f88c13
@@ -54,7 +54,7 @@ void ConnectPage::initializePage()
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     m_wizard->device()->setTrusted(true);
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    BluezQt::PendingCall *call = m_wizard->device()->connectDevice();
Dan Vrátil f88c13
+    BluezQt::PendingCall *call = m_wizard->device()->connectToDevice();
Dan Vrátil f88c13
     connect(call, &BluezQt::PendingCall::finished, this, &ConnectPage::connectFinished);
Dan Vrátil f88c13
 }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
diff --git a/src/wizard/pages/discover.cpp b/src/wizard/pages/discover.cpp
Dan Vrátil f88c13
index 9810f7c..862cf8a 100644
Dan Vrátil f88c13
--- a/src/wizard/pages/discover.cpp
Dan Vrátil f88c13
+++ b/src/wizard/pages/discover.cpp
Dan Vrátil f88c13
@@ -215,13 +215,13 @@ int DiscoverPage::nextId() const
Dan Vrátil f88c13
         pin = m_wizard->agent()->getPin(device);
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    qCDebug(WIZARD) << "Class: " << device->deviceType();
Dan Vrátil f88c13
+    qCDebug(WIZARD) << "Class: " << device->type();
Dan Vrátil f88c13
     qCDebug(WIZARD) << "Legacy: " << device->hasLegacyPairing();
Dan Vrátil f88c13
     qCDebug(WIZARD) << "From DB: " << m_wizard->agent()->isFromDatabase();
Dan Vrátil f88c13
     qCDebug(WIZARD) << "PIN: " << m_wizard->agent()->pin();
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     // If keyboard no matter what, we go to the keyboard page
Dan Vrátil f88c13
-    if (device->deviceType() == BluezQt::Device::Keyboard) {
Dan Vrátil f88c13
+    if (device->type() == BluezQt::Device::Keyboard) {
Dan Vrátil f88c13
         qCDebug(WIZARD) << "Keyboard Pairing";
Dan Vrátil f88c13
         return BlueWizard::KeyboardPairing;
Dan Vrátil f88c13
     }
Dan Vrátil f88c13
diff --git a/src/wizard/wizardagent.cpp b/src/wizard/wizardagent.cpp
Dan Vrátil f88c13
index a0b4b04..a263e28 100644
Dan Vrátil f88c13
--- a/src/wizard/wizardagent.cpp
Dan Vrátil f88c13
+++ b/src/wizard/wizardagent.cpp
Dan Vrátil f88c13
@@ -72,8 +72,10 @@ QString WizardAgent::getPin(BluezQt::DevicePtr device)
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     QXmlStreamReader xml(&file;;
Dan Vrátil f88c13
 
Dan Vrátil f88c13
-    int deviceType = device->deviceType();
Dan Vrátil f88c13
-    int xmlType = 0;
Dan Vrátil f88c13
+    QString deviceType = BluezQt::Device::typeToString(device->type());
Dan Vrátil f88c13
+    if (deviceType == QLatin1String("audiovideo")) {
Dan Vrátil f88c13
+        deviceType = QStringLiteral("audio");
Dan Vrátil f88c13
+    }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
     while (!xml.atEnd()) {
Dan Vrátil f88c13
         xml.readNext();
Dan Vrátil f88c13
@@ -87,9 +89,7 @@ QString WizardAgent::getPin(BluezQt::DevicePtr device)
Dan Vrátil f88c13
         }
Dan Vrátil f88c13
 
Dan Vrátil f88c13
         if (attr.hasAttribute(QLatin1String("type")) && attr.value(QLatin1String("type")) != QLatin1String("any")) {
Dan Vrátil f88c13
-            xmlType = BluezQt::Device::stringToType(attr.value(QLatin1String("type")).toString());
Dan Vrátil f88c13
-            if (deviceType != xmlType) {
Dan Vrátil f88c13
-                xmlType = 0;
Dan Vrátil f88c13
+            if (deviceType != attr.value(QLatin1String("type")).toString()) {
Dan Vrátil f88c13
                 continue;
Dan Vrátil f88c13
             }
Dan Vrátil f88c13
         }