aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-20 07:09:07 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-20 07:09:07 -0700
commit947fda14c5d10916572ae1232987684205632c71 (patch)
treeb7787b1014efeb30a18c326af7e978b9d8933d36
parente3a8ff74934c8f5a11ee962650e889464da55522 (diff)
downloadsubsurface-947fda14c5d1.tar.gz
Bluetooth support: quick build fix for Qt5.2
The InvalidBluetoothAdapterError error code wasn't introduced until Qt5.3, so let's not test for it on older versions of Qt. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/btdeviceselectiondialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/btdeviceselectiondialog.cpp b/qt-ui/btdeviceselectiondialog.cpp
index 007fe940e..e883536cd 100644
--- a/qt-ui/btdeviceselectiondialog.cpp
+++ b/qt-ui/btdeviceselectiondialog.cpp
@@ -362,6 +362,7 @@ void BtDeviceSelectionDialog::initializeDeviceDiscoveryAgent()
// Intialize the discovery agent
remoteDeviceDiscoveryAgent = new QBluetoothDeviceDiscoveryAgent(localDevice->address());
+#if QT_VERSION >= 0x050300
// Test if the discovery agent was successfully created
if (remoteDeviceDiscoveryAgent->error() == QBluetoothDeviceDiscoveryAgent::InvalidBluetoothAdapterError) {
ui->dialogStatus->setText(QString("The device discovery agent was not created because the %1 address does not "
@@ -371,6 +372,7 @@ void BtDeviceSelectionDialog::initializeDeviceDiscoveryAgent()
ui->clear->setEnabled(false);
return;
}
+#endif
connect(remoteDeviceDiscoveryAgent, SIGNAL(deviceDiscovered(QBluetoothDeviceInfo)),
this, SLOT(addRemoteDevice(QBluetoothDeviceInfo)));