mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
e3a8ff7493
commit
947fda14c5
1 changed files with 2 additions and 0 deletions
|
@ -362,6 +362,7 @@ void BtDeviceSelectionDialog::initializeDeviceDiscoveryAgent()
|
||||||
// Intialize the discovery agent
|
// Intialize the discovery agent
|
||||||
remoteDeviceDiscoveryAgent = new QBluetoothDeviceDiscoveryAgent(localDevice->address());
|
remoteDeviceDiscoveryAgent = new QBluetoothDeviceDiscoveryAgent(localDevice->address());
|
||||||
|
|
||||||
|
#if QT_VERSION >= 0x050300
|
||||||
// Test if the discovery agent was successfully created
|
// Test if the discovery agent was successfully created
|
||||||
if (remoteDeviceDiscoveryAgent->error() == QBluetoothDeviceDiscoveryAgent::InvalidBluetoothAdapterError) {
|
if (remoteDeviceDiscoveryAgent->error() == QBluetoothDeviceDiscoveryAgent::InvalidBluetoothAdapterError) {
|
||||||
ui->dialogStatus->setText(QString("The device discovery agent was not created because the %1 address does not "
|
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);
|
ui->clear->setEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
connect(remoteDeviceDiscoveryAgent, SIGNAL(deviceDiscovered(QBluetoothDeviceInfo)),
|
connect(remoteDeviceDiscoveryAgent, SIGNAL(deviceDiscovered(QBluetoothDeviceInfo)),
|
||||||
this, SLOT(addRemoteDevice(QBluetoothDeviceInfo)));
|
this, SLOT(addRemoteDevice(QBluetoothDeviceInfo)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue