summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/btdeviceselectiondialog.h
diff options
context:
space:
mode:
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();