mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 03:53:24 +00:00
Use itemClicked signal instead of itemActivated for BT device selection
On Android platforms the system is configured to raise the itemActivated signal when the user double clicks an item. Since the items are small it is pretty hard to double click them. Therefore use the itemClicked signal instead of the itemActivated signal. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
619e97ee4f
commit
8f8002b8d1
2 changed files with 4 additions and 4 deletions
|
@ -29,8 +29,8 @@ BtDeviceSelectionDialog::BtDeviceSelectionDialog(QWidget *parent) :
|
|||
// Disable the save button because there is no device selected
|
||||
ui->save->setEnabled(false);
|
||||
|
||||
connect(ui->discoveredDevicesList, SIGNAL(itemActivated(QListWidgetItem*)),
|
||||
this, SLOT(itemActivated(QListWidgetItem*)));
|
||||
connect(ui->discoveredDevicesList, SIGNAL(itemClicked(QListWidgetItem*)),
|
||||
this, SLOT(itemClicked(QListWidgetItem*)));
|
||||
|
||||
// Set UI information about the local device
|
||||
ui->deviceAddress->setText(localDevice->address().toString());
|
||||
|
@ -173,7 +173,7 @@ void BtDeviceSelectionDialog::addRemoteDevice(const QBluetoothDeviceInfo &remote
|
|||
}
|
||||
}
|
||||
|
||||
void BtDeviceSelectionDialog::itemActivated(QListWidgetItem *item)
|
||||
void BtDeviceSelectionDialog::itemClicked(QListWidgetItem *item)
|
||||
{
|
||||
QBluetoothDeviceInfo remoteDeviceInfo = item->data(Qt::UserRole).value<QBluetoothDeviceInfo>();
|
||||
QBluetoothLocalDevice::Pairing pairingStatus = localDevice->pairingStatus(remoteDeviceInfo.address());
|
||||
|
|
|
@ -33,7 +33,7 @@ private slots:
|
|||
void remoteDeviceScanFinished();
|
||||
void hostModeStateChanged(QBluetoothLocalDevice::HostMode mode);
|
||||
void addRemoteDevice(const QBluetoothDeviceInfo &remoteDeviceInfo);
|
||||
void itemActivated(QListWidgetItem *item);
|
||||
void itemClicked(QListWidgetItem *item);
|
||||
void displayPairingMenu(const QPoint &pos);
|
||||
void pairingFinished(const QBluetoothAddress &address,QBluetoothLocalDevice::Pairing pairing);
|
||||
void error(QBluetoothLocalDevice::Error error);
|
||||
|
|
Loading…
Add table
Reference in a new issue