From 064a00a7a52d95f38f7a62404494206d4038bff9 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 8 Feb 2017 10:14:32 +0100 Subject: Remove WinPhone leftovers Change-Id: I0bc4da9d8ac17930d509a55c8c5c6494dad4558f Reviewed-by: Maurice Kalinowski --- src/bluetooth/bluetooth.pro | 2 +- src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) (limited to 'src/bluetooth') diff --git a/src/bluetooth/bluetooth.pro b/src/bluetooth/bluetooth.pro index b47e234e..b07ad431 100644 --- a/src/bluetooth/bluetooth.pro +++ b/src/bluetooth/bluetooth.pro @@ -190,7 +190,7 @@ qtConfig(bluez):qtHaveModule(dbus) { SOURCES -= qlowenergycontroller_p.cpp SOURCES -= qlowenergyservice.cpp SOURCES -= qlowenergycontroller.cpp -} else:if(winphone|winrt-*-msvc2015) { +} else:winrt { DEFINES += QT_WINRT_BLUETOOTH QT += core-private diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp index 28d05ec1..5e5364e1 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp @@ -46,18 +46,15 @@ #include #include -#ifndef Q_OS_WINPHONE #include -using namespace ABI::Windows::Devices::Bluetooth::Advertisement; -#endif // !Q_OS_WINPHONE - using namespace Microsoft::WRL; using namespace Microsoft::WRL::Wrappers; using namespace ABI::Windows::Foundation; using namespace ABI::Windows::Foundation::Collections; using namespace ABI::Windows::Devices; using namespace ABI::Windows::Devices::Bluetooth; +using namespace ABI::Windows::Devices::Bluetooth::Advertisement; using namespace ABI::Windows::Devices::Enumeration; QT_BEGIN_NAMESPACE @@ -112,11 +109,9 @@ public: quint8 requestedModes; private: -#ifndef Q_OS_WINPHONE ComPtr m_leWatcher; EventRegistrationToken m_leDeviceAddedToken; QVector m_foundLEDevices; -#endif // !Q_OS_WINPHONE int m_pendingPairedDevices; ComPtr m_deviceStatics; @@ -158,7 +153,6 @@ void QWinRTBluetoothDeviceDiscoveryWorker::start() void QWinRTBluetoothDeviceDiscoveryWorker::stop() { -#ifndef Q_OS_WINPHONE if (m_leWatcher) { HRESULT hr = m_leWatcher->Stop(); Q_ASSERT_SUCCEEDED(hr); @@ -167,7 +161,6 @@ void QWinRTBluetoothDeviceDiscoveryWorker::stop() Q_ASSERT_SUCCEEDED(hr); } } -#endif // !Q_OS_WINPHONE } void QWinRTBluetoothDeviceDiscoveryWorker::startDeviceDiscovery(QBluetoothDeviceDiscoveryAgent::DiscoveryMethod mode) @@ -230,7 +223,6 @@ void QWinRTBluetoothDeviceDiscoveryWorker::gatherMultipleDeviceInformation(IVect void QWinRTBluetoothDeviceDiscoveryWorker::setupLEDeviceWatcher() { -#ifndef Q_OS_WINPHONE HRESULT hr = RoActivateInstance(HString::MakeReference(RuntimeClass_Windows_Devices_Bluetooth_Advertisement_BluetoothLEAdvertisementWatcher).Get(), &m_leWatcher); Q_ASSERT_SUCCEEDED(hr); hr = m_leWatcher->add_Received(Callback>([this](IBluetoothLEAdvertisementWatcher *, IBluetoothLEAdvertisementReceivedEventArgs *args) { @@ -248,7 +240,6 @@ void QWinRTBluetoothDeviceDiscoveryWorker::setupLEDeviceWatcher() Q_ASSERT_SUCCEEDED(hr); hr = m_leWatcher->Start(); Q_ASSERT_SUCCEEDED(hr); -#endif // !Q_OS_WINPHONE } void QWinRTBluetoothDeviceDiscoveryWorker::handleLeTimeout() @@ -429,7 +420,6 @@ HRESULT QWinRTBluetoothDeviceDiscoveryWorker::onBluetoothLEDeviceFound(ComPtr device2; HRESULT hr = device.As(&device2); Q_ASSERT_SUCCEEDED(hr); @@ -477,9 +467,6 @@ HRESULT QWinRTBluetoothDeviceDiscoveryWorker::onBluetoothLEDeviceFound(ComPtr