aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/btdeviceselectiondialog.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-29 22:39:07 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-30 08:09:37 -0700
commit1f59629a76b0acb9cf6a504e7532839b33335f47 (patch)
treec26b18f349300f19d36496bb7c58a1229432346f /desktop-widgets/btdeviceselectiondialog.h
parentd3d06bc580b2a344806396622edd6b7adbdd08cc (diff)
downloadsubsurface-1f59629a76b0acb9cf6a504e7532839b33335f47.tar.gz
Bluetooth: use standard Qt code on Windows
We shouldn't need our hand crafted code anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/btdeviceselectiondialog.h')
-rw-r--r--desktop-widgets/btdeviceselectiondialog.h42
1 files changed, 0 insertions, 42 deletions
diff --git a/desktop-widgets/btdeviceselectiondialog.h b/desktop-widgets/btdeviceselectiondialog.h
index 3e034d73f..ebdc53b7d 100644
--- a/desktop-widgets/btdeviceselectiondialog.h
+++ b/desktop-widgets/btdeviceselectiondialog.h
@@ -8,48 +8,10 @@
#include <QtBluetooth/QBluetoothLocalDevice>
#include <QtBluetooth/QBluetoothDeviceDiscoveryAgent>
-#if defined(Q_OS_WIN)
- #include <QThread>
- #include <winsock2.h>
- #include <ws2bth.h>
-
- #define SUCCESS 0
- #define BTH_ADDR_BUF_LEN 40
- #define BTH_ADDR_PRETTY_STRING_LEN 17 // there are 6 two-digit hex values and 5 colons
-
- #undef ERROR // this is already declared in our headers
- #undef IGNORE // this is already declared in our headers
- #undef DC_VERSION // this is already declared in libdivecomputer header
-#endif
-
namespace Ui {
class BtDeviceSelectionDialog;
}
-#if defined(Q_OS_WIN)
-class WinBluetoothDeviceDiscoveryAgent : public QThread {
- Q_OBJECT
-signals:
- void deviceDiscovered(const QBluetoothDeviceInfo &info);
- void error(QBluetoothDeviceDiscoveryAgent::Error error);
-
-public:
- WinBluetoothDeviceDiscoveryAgent(QObject *parent);
- ~WinBluetoothDeviceDiscoveryAgent();
- bool isActive() const;
- QString errorToString() const;
- QBluetoothDeviceDiscoveryAgent::Error error() const;
- void run() override;
- void stop();
-
-private:
- bool running;
- bool stopped;
- QString lastErrorToString;
- QBluetoothDeviceDiscoveryAgent::Error lastError;
-};
-#endif
-
class BtDeviceSelectionDialog : public QDialog {
Q_OBJECT
@@ -78,12 +40,8 @@ private slots:
private:
Ui::BtDeviceSelectionDialog *ui;
-#if defined(Q_OS_WIN)
- WinBluetoothDeviceDiscoveryAgent *remoteDeviceDiscoveryAgent;
-#else
QBluetoothLocalDevice *localDevice;
QBluetoothDeviceDiscoveryAgent *remoteDeviceDiscoveryAgent;
-#endif
QScopedPointer<QBluetoothDeviceInfo> selectedRemoteDeviceInfo;
void updateLocalDeviceInformation();