From d9e2eb43adabb6cefd384d57507ba10636fcde7b7b21928d0842d1c97e64c70d Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sun, 9 Aug 2015 08:08:09 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/bluedevil5?expand=0&rev=35 --- bluedevil-5.3.2.tar.xz | 3 - bluedevil-5.3.95.tar.xz | 3 + bluedevil5.spec | 13 +- bluez-qt-5.11.patch | 383 ---------------------------------------- 4 files changed, 8 insertions(+), 394 deletions(-) delete mode 100644 bluedevil-5.3.2.tar.xz create mode 100644 bluedevil-5.3.95.tar.xz delete mode 100644 bluez-qt-5.11.patch diff --git a/bluedevil-5.3.2.tar.xz b/bluedevil-5.3.2.tar.xz deleted file mode 100644 index 06c2cc9..0000000 --- a/bluedevil-5.3.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8721922777f8de95880ebe1935bf2e69315e91ddb2f2b4ac32a5e92af23b55d -size 124584 diff --git a/bluedevil-5.3.95.tar.xz b/bluedevil-5.3.95.tar.xz new file mode 100644 index 0000000..d622b7d --- /dev/null +++ b/bluedevil-5.3.95.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ef8cd4cb168ef6d1a72cf183ba43e66e9da1be345e90d856e72d0b1ac230011 +size 126960 diff --git a/bluedevil5.spec b/bluedevil5.spec index 52c2f96..b45842b 100644 --- a/bluedevil5.spec +++ b/bluedevil5.spec @@ -19,7 +19,7 @@ %bcond_without lang Name: bluedevil5 -Version: 5.3.2 +Version: 5.3.95 Release: 0 Summary: Bluetooth Manager for KDE License: GPL-2.0+ @@ -27,10 +27,8 @@ Group: Hardware/Other Url: http://www.kde.org/ Source: bluedevil-%{version}.tar.xz Source99: %{name}-rpmlintrc -# PATCH-FIX-UPSTREAM bluez-qt-5.11.patch -Patch0: bluez-qt-5.11.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: bluez-qt-devel >= %{version} +BuildRequires: bluez-qt-devel >= %{_plasma5_version} BuildRequires: kcoreaddons-devel BuildRequires: kdbusaddons-devel BuildRequires: kded-devel @@ -40,14 +38,14 @@ BuildRequires: kiconthemes-devel BuildRequires: kio-devel BuildRequires: knotifications-devel BuildRequires: kwidgetsaddons-devel +BuildRequires: kwindowsystem-devel BuildRequires: plasma-framework-devel BuildRequires: shared-mime-info BuildRequires: pkgconfig(Qt5Core) >= 5.4.0 BuildRequires: pkgconfig(Qt5DBus) >= 5.4.0 -BuildRequires: pkgconfig(Qt5Qml) >= 5.4.0 BuildRequires: pkgconfig(Qt5Widgets) >= 5.4.0 -Requires: bluez-qt-imports >= %{version} -Requires: bluez-qt-udev >= %{version} +Requires: bluez-qt-imports >= %{_plasma5_version} +Requires: bluez-qt-udev >= %{_plasma5_version} # atop of the bluez itself, we also need bluez-obexd for kio_obexftp and both send/receive Requires: bluez # for connecting A2DP profile @@ -66,7 +64,6 @@ Bluetooth daemon for KDE, handling connections. %lang_package %prep %setup -q -n bluedevil-%{version} -%patch0 -p1 %build %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5 diff --git a/bluez-qt-5.11.patch b/bluez-qt-5.11.patch deleted file mode 100644 index 8993725..0000000 --- a/bluez-qt-5.11.patch +++ /dev/null @@ -1,383 +0,0 @@ -diff --git a/src/applet/package/contents/ui/BluetoothApplet.qml b/src/applet/package/contents/ui/BluetoothApplet.qml -index 834d034..d685cb2 100644 ---- a/src/applet/package/contents/ui/BluetoothApplet.qml -+++ b/src/applet/package/contents/ui/BluetoothApplet.qml -@@ -31,6 +31,7 @@ Item { - - property bool deviceConnected : false - property int runningActions : 0 -+ property QtObject btManager : BluezQt.Manager - - Plasmoid.toolTipMainText: i18n("Bluetooth") - Plasmoid.icon: Logic.icon() -@@ -44,11 +45,7 @@ Item { - focus: true - } - -- BluezQt.Manager { -- id: btManager -- -- onInitFinished: { -- Logic.init(); -- } -+ Component.onCompleted: { -+ Logic.init(); - } - } -diff --git a/src/applet/package/contents/ui/DeviceItem.qml b/src/applet/package/contents/ui/DeviceItem.qml -index 691e954..0e60d3e 100644 ---- a/src/applet/package/contents/ui/DeviceItem.qml -+++ b/src/applet/package/contents/ui/DeviceItem.qml -@@ -396,10 +396,10 @@ PlasmaComponents.ListItem { - return i18n("Connecting"); - } - -- switch (DeviceType) { -+ switch (Type) { - case BluezQt.Device.Headset: - case BluezQt.Device.Headphones: -- case BluezQt.Device.OtherAudio: -+ case BluezQt.Device.AudioVideo: - return i18n("Audio device"); - - case BluezQt.Device.Keyboard: -@@ -440,7 +440,7 @@ PlasmaComponents.ListItem { - function connectToDevice() - { - if (Connected) { -- Device.disconnectDevice(); -+ Device.disconnectFromDevice(); - return; - } - -@@ -451,7 +451,7 @@ PlasmaComponents.ListItem { - connecting = true; - runningActions++; - -- var call = Device.connectDevice(); -+ var call = Device.connectToDevice(); - call.userData = Device; - - call.finished.connect(function(call) { -diff --git a/src/applet/package/contents/ui/FullRepresentation.qml b/src/applet/package/contents/ui/FullRepresentation.qml -index 849ae4e..94df8b4 100644 ---- a/src/applet/package/contents/ui/FullRepresentation.qml -+++ b/src/applet/package/contents/ui/FullRepresentation.qml -@@ -28,9 +28,7 @@ import org.kde.plasma.private.bluetooth 1.0 as PlasmaBt - FocusScope { - PlasmaBt.DevicesProxyModel { - id: devicesModel -- sourceModel: BluezQt.DevicesModel { -- manager: btManager -- } -+ sourceModel: BluezQt.DevicesModel { } - } - - PlasmaExtras.Heading { -diff --git a/src/daemon/kded/devicemonitor.cpp b/src/daemon/kded/devicemonitor.cpp -index 29ac2f3..22c8020 100644 ---- a/src/daemon/kded/devicemonitor.cpp -+++ b/src/daemon/kded/devicemonitor.cpp -@@ -147,7 +147,7 @@ void DeviceMonitor::restoreState() - Q_FOREACH (const QString &addr, connectedDevices) { - BluezQt::DevicePtr device = m_manager->deviceForAddress(addr); - if (device) { -- device->connectDevice(); -+ device->connectToDevice(); - } - } - } -diff --git a/src/daemon/kded/filereceiver/obexagent.cpp b/src/daemon/kded/filereceiver/obexagent.cpp -index 9cd98ff..6ffd620 100644 ---- a/src/daemon/kded/filereceiver/obexagent.cpp -+++ b/src/daemon/kded/filereceiver/obexagent.cpp -@@ -49,11 +49,11 @@ QDBusObjectPath ObexAgent::objectPath() const - return QDBusObjectPath(QStringLiteral("/BlueDevilObexAgent")); - } - --void ObexAgent::authorizePush(BluezQt::ObexTransferPtr transfer, const BluezQt::Request &request) -+void ObexAgent::authorizePush(BluezQt::ObexTransferPtr transfer, BluezQt::ObexSessionPtr session, const BluezQt::Request &request) - { - qCDebug(BLUEDAEMON) << "Agent-AuthorizePush"; - -- ReceiveFileJob *job = new ReceiveFileJob(request, transfer, this); -+ ReceiveFileJob *job = new ReceiveFileJob(request, transfer, session, this); - connect(job, &ReceiveFileJob::finished, this, &ObexAgent::receiveFileJobFinished); - job->start(); - } -diff --git a/src/daemon/kded/filereceiver/obexagent.h b/src/daemon/kded/filereceiver/obexagent.h -index 0f5adc5..e32f1fe 100644 ---- a/src/daemon/kded/filereceiver/obexagent.h -+++ b/src/daemon/kded/filereceiver/obexagent.h -@@ -40,7 +40,7 @@ public: - bool shouldAutoAcceptTransfer(const QString &address) const; - - QDBusObjectPath objectPath() const Q_DECL_OVERRIDE; -- void authorizePush(BluezQt::ObexTransferPtr transfer, const BluezQt::Request &request) Q_DECL_OVERRIDE; -+ void authorizePush(BluezQt::ObexTransferPtr transfer, BluezQt::ObexSessionPtr session, const BluezQt::Request &request) Q_DECL_OVERRIDE; - - private Q_SLOTS: - void receiveFileJobFinished(KJob *job); -diff --git a/src/daemon/kded/filereceiver/receivefilejob.cpp b/src/daemon/kded/filereceiver/receivefilejob.cpp -index 1569163..fbb04b5 100644 ---- a/src/daemon/kded/filereceiver/receivefilejob.cpp -+++ b/src/daemon/kded/filereceiver/receivefilejob.cpp -@@ -36,11 +36,12 @@ - #include - #include - --ReceiveFileJob::ReceiveFileJob(const BluezQt::Request &req, BluezQt::ObexTransferPtr transfer, ObexAgent *parent) -+ReceiveFileJob::ReceiveFileJob(const BluezQt::Request &req, BluezQt::ObexTransferPtr transfer, BluezQt::ObexSessionPtr session, ObexAgent *parent) - : KJob(parent) - , m_speedBytes(0) - , m_agent(parent) - , m_transfer(transfer) -+ , m_session(session) - , m_request(req) - { - setCapabilities(Killable); -@@ -74,24 +75,24 @@ void ReceiveFileJob::init() - qCDebug(BLUEDAEMON) << "\tTransferred:" << m_transfer->transferred(); - - qCDebug(BLUEDAEMON) << "ObexSession:"; -- qCDebug(BLUEDAEMON) << "\tSource:" << m_transfer->session()->source(); -- qCDebug(BLUEDAEMON) << "\tDestination:" << m_transfer->session()->destination(); -+ qCDebug(BLUEDAEMON) << "\tSource:" << m_session->source(); -+ qCDebug(BLUEDAEMON) << "\tDestination:" << m_session->destination(); - - connect(m_transfer.data(), &BluezQt::ObexTransfer::statusChanged, this, &ReceiveFileJob::statusChanged); - connect(m_transfer.data(), &BluezQt::ObexTransfer::transferredChanged, this, &ReceiveFileJob::transferredChanged); - -- m_deviceName = m_transfer->session()->destination(); -+ m_deviceName = m_session->destination(); - -- BluezQt::AdapterPtr adapter = m_agent->manager()->adapterForAddress(m_transfer->session()->source()); -+ BluezQt::AdapterPtr adapter = m_agent->manager()->adapterForAddress(m_session->source()); - if (!adapter) { -- qCDebug(BLUEDAEMON) << "No adapter for" << m_transfer->session()->source(); -+ qCDebug(BLUEDAEMON) << "No adapter for" << m_session->source(); - showNotification(); - return; - } - -- BluezQt::DevicePtr device = adapter->deviceForAddress(m_transfer->session()->destination()); -+ BluezQt::DevicePtr device = adapter->deviceForAddress(m_session->destination()); - if (!device) { -- qCDebug(BLUEDAEMON) << "No device for" << m_transfer->session()->destination(); -+ qCDebug(BLUEDAEMON) << "No device for" << m_session->destination(); - showNotification(); - return; - } -diff --git a/src/daemon/kded/filereceiver/receivefilejob.h b/src/daemon/kded/filereceiver/receivefilejob.h -index 461d453..801bb45 100644 ---- a/src/daemon/kded/filereceiver/receivefilejob.h -+++ b/src/daemon/kded/filereceiver/receivefilejob.h -@@ -34,7 +34,7 @@ class ReceiveFileJob : public KJob - Q_OBJECT - - public: -- explicit ReceiveFileJob(const BluezQt::Request &req, BluezQt::ObexTransferPtr transfer, ObexAgent *parent); -+ explicit ReceiveFileJob(const BluezQt::Request &req, BluezQt::ObexTransferPtr transfer, BluezQt::ObexSessionPtr session, ObexAgent *parent); - - QString deviceAddress() const; - -@@ -63,6 +63,7 @@ private: - - ObexAgent *m_agent; - BluezQt::ObexTransferPtr m_transfer; -+ BluezQt::ObexSessionPtr m_session; - BluezQt::Request m_request; - }; - -diff --git a/src/kcmodule/bluedevildevices.cpp b/src/kcmodule/bluedevildevices.cpp -index b1b6b0e..deafecc 100644 ---- a/src/kcmodule/bluedevildevices.cpp -+++ b/src/kcmodule/bluedevildevices.cpp -@@ -113,7 +113,7 @@ void BluetoothDevicesDelegate::paint(QPainter *painter, const QStyleOptionViewIt - painter->setFont(f); - painter->drawText(r, Qt::AlignLeft | Qt::AlignTop, index.data(BluezQt::DevicesModel::FriendlyNameRole).toString()); - painter->restore(); -- painter->drawText(r, Qt::AlignLeft | Qt::AlignBottom, deviceTypeString(index.data(BluezQt::DevicesModel::DeviceTypeRole).toInt())); -+ painter->drawText(r, Qt::AlignLeft | Qt::AlignBottom, deviceTypeString(index.data(BluezQt::DevicesModel::TypeRole).toInt())); - - // Draw state - r = option.rect; -@@ -166,7 +166,7 @@ QString BluetoothDevicesDelegate::deviceTypeString(int type) const - return i18nc("This device is a Headset", "Headset"); - case BluezQt::Device::Headphones: - return i18nc("This device are Headphones", "Headphones"); -- case BluezQt::Device::OtherAudio: -+ case BluezQt::Device::AudioVideo: - return i18nc("This device is of type Audio", "Audio"); - case BluezQt::Device::Keyboard: - return i18nc("This device is a Keyboard", "Keyboard"); -@@ -349,14 +349,14 @@ void KCMBlueDevilDevices::removeDevice() - void KCMBlueDevilDevices::connectDevice() - { - BluezQt::DevicePtr device = m_devicesModel->device(m_devices->currentIndex()); -- device->connectDevice(); -+ device->connectToDevice(); - } - - void KCMBlueDevilDevices::disconnectDevice() - { - m_disconnectDevice->setEnabled(false); - BluezQt::DevicePtr device = m_devicesModel->device(m_devices->currentIndex()); -- device->disconnectDevice(); -+ device->disconnectFromDevice(); - } - - void KCMBlueDevilDevices::launchWizard() -diff --git a/src/kio/obexftp/daemon/obexftpdaemon.cpp b/src/kio/obexftp/daemon/obexftpdaemon.cpp -index a2cdac4..45a1f75 100644 ---- a/src/kio/obexftp/daemon/obexftpdaemon.cpp -+++ b/src/kio/obexftp/daemon/obexftpdaemon.cpp -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - - K_PLUGIN_FACTORY_WITH_JSON(ObexFtpFactory, - "obexftpdaemon.json", -@@ -208,9 +209,9 @@ void ObexFtpDaemon::operationalChanged(bool operational) - } - } - --void ObexFtpDaemon::sessionRemoved(const QDBusObjectPath &session) -+void ObexFtpDaemon::sessionRemoved(BluezQt::ObexSessionPtr session) - { -- const QString &path = session.path(); -+ const QString &path = session->objectPath().path(); - const QString &key = d->m_sessionMap.key(path); - - if (!d->m_sessionMap.contains(key)) { -diff --git a/src/kio/obexftp/daemon/obexftpdaemon.h b/src/kio/obexftp/daemon/obexftpdaemon.h -index c42d720..a902333 100644 ---- a/src/kio/obexftp/daemon/obexftpdaemon.h -+++ b/src/kio/obexftp/daemon/obexftpdaemon.h -@@ -23,6 +23,8 @@ - - #include - -+#include -+ - namespace BluezQt - { - class InitObexManagerJob; -@@ -52,7 +54,7 @@ private Q_SLOTS: - void cancelTransferFinished(QDBusPendingCallWatcher *watcher); - - void operationalChanged(bool operational); -- void sessionRemoved(const QDBusObjectPath &session); -+ void sessionRemoved(BluezQt::ObexSessionPtr session); - - private: - struct Private; -diff --git a/src/kio/obexftp/kioobexftp.cpp b/src/kio/obexftp/kioobexftp.cpp -index cb8d3b1..47910b4 100644 ---- a/src/kio/obexftp/kioobexftp.cpp -+++ b/src/kio/obexftp/kioobexftp.cpp -@@ -442,24 +442,24 @@ QList KioFtp::listFolder(const QUrl &url, bool *ok) - return list; - } - -- const QList &items = call->value().value >(); -+ const QList &items = call->value().value >(); - -- Q_FOREACH (const BluezQt::ObexFileTransfer::Item &item, items) { -+ Q_FOREACH (const BluezQt::ObexFileTransferEntry &item, items) { - KIO::UDSEntry entry; -- entry.insert(KIO::UDSEntry::UDS_NAME, item.name); -- entry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME, item.label); -+ entry.insert(KIO::UDSEntry::UDS_NAME, item.name()); -+ entry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME, item.label()); - entry.insert(KIO::UDSEntry::UDS_ACCESS, 0700); -- entry.insert(KIO::UDSEntry::UDS_MODIFICATION_TIME, item.modified.toTime_t()); -- entry.insert(KIO::UDSEntry::UDS_SIZE, item.size); -+ entry.insert(KIO::UDSEntry::UDS_MODIFICATION_TIME, item.modificationTime().toTime_t()); -+ entry.insert(KIO::UDSEntry::UDS_SIZE, item.size()); - -- if (item.type == BluezQt::ObexFileTransfer::Item::Folder) { -+ if (item.type() == BluezQt::ObexFileTransferEntry::Folder) { - entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR); - } else { - entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFREG); - } - - if (urlIsRoot(url)) { -- updateRootEntryIcon(entry, item.memoryType); -+ updateRootEntryIcon(entry, item.memoryType()); - } - - list.append(entry); -@@ -467,7 +467,7 @@ QList KioFtp::listFolder(const QUrl &url, bool *ok) - // Most probably the client of the kio will stat each file - // so since we are on it, let's cache all of them. - QUrl statUrl = url; -- statUrl.setPath(statUrl.path() + QLatin1Char('/') + item.name); -+ statUrl.setPath(statUrl.path() + QLatin1Char('/') + item.name()); - - if (!m_statMap.contains(statUrl.toDisplayString())) { - qCDebug(OBEXFTP) << "Stat:" -diff --git a/src/wizard/pages/connect.cpp b/src/wizard/pages/connect.cpp -index 1880c08..082cb10 100644 ---- a/src/wizard/pages/connect.cpp -+++ b/src/wizard/pages/connect.cpp -@@ -54,7 +54,7 @@ void ConnectPage::initializePage() - - m_wizard->device()->setTrusted(true); - -- BluezQt::PendingCall *call = m_wizard->device()->connectDevice(); -+ BluezQt::PendingCall *call = m_wizard->device()->connectToDevice(); - connect(call, &BluezQt::PendingCall::finished, this, &ConnectPage::connectFinished); - } - -diff --git a/src/wizard/pages/discover.cpp b/src/wizard/pages/discover.cpp -index 9810f7c..862cf8a 100644 ---- a/src/wizard/pages/discover.cpp -+++ b/src/wizard/pages/discover.cpp -@@ -215,13 +215,13 @@ int DiscoverPage::nextId() const - pin = m_wizard->agent()->getPin(device); - } - -- qCDebug(WIZARD) << "Class: " << device->deviceType(); -+ qCDebug(WIZARD) << "Class: " << device->type(); - qCDebug(WIZARD) << "Legacy: " << device->hasLegacyPairing(); - qCDebug(WIZARD) << "From DB: " << m_wizard->agent()->isFromDatabase(); - qCDebug(WIZARD) << "PIN: " << m_wizard->agent()->pin(); - - // If keyboard no matter what, we go to the keyboard page -- if (device->deviceType() == BluezQt::Device::Keyboard) { -+ if (device->type() == BluezQt::Device::Keyboard) { - qCDebug(WIZARD) << "Keyboard Pairing"; - return BlueWizard::KeyboardPairing; - } -diff --git a/src/wizard/wizardagent.cpp b/src/wizard/wizardagent.cpp -index a0b4b04..a263e28 100644 ---- a/src/wizard/wizardagent.cpp -+++ b/src/wizard/wizardagent.cpp -@@ -72,8 +72,10 @@ QString WizardAgent::getPin(BluezQt::DevicePtr device) - - QXmlStreamReader xml(&file); - -- int deviceType = device->deviceType(); -- int xmlType = 0; -+ QString deviceType = BluezQt::Device::typeToString(device->type()); -+ if (deviceType == QLatin1String("audiovideo")) { -+ deviceType = QStringLiteral("audio"); -+ } - - while (!xml.atEnd()) { - xml.readNext(); -@@ -87,9 +89,7 @@ QString WizardAgent::getPin(BluezQt::DevicePtr device) - } - - if (attr.hasAttribute(QLatin1String("type")) && attr.value(QLatin1String("type")) != QLatin1String("any")) { -- xmlType = BluezQt::Device::stringToType(attr.value(QLatin1String("type")).toString()); -- if (deviceType != xmlType) { -- xmlType = 0; -+ if (deviceType != attr.value(QLatin1String("type")).toString()) { - continue; - } - }