diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2017-11-04 15:09:07 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-11-04 09:27:24 -0700 |
commit | 617c6d3564e562df580824280654d9edaf238084 (patch) | |
tree | 4698ded015b6179a92f9ac7dcf06a52ea5990ca5 /desktop-widgets/btdeviceselectiondialog.h | |
parent | a64b70db4a36f11dbd22b4bc6a35f616061e0241 (diff) | |
download | subsurface-617c6d3564e562df580824280654d9edaf238084.tar.gz |
Replace itemClicked() by currentItemChanged() in Bt device selection
This fixes two problems:
1) Using the keybord or clicking below the list and moving the mouse
up while holding the mouse button did not properly update the status
message and the save button. For example, one could save with a non-
paired device selected.
2) The code assumed that a device is selected if the save button is
active, but the save button was not disabled on scan. Thus, one could
provoke a crash by selecting an item, scanning and then pressing save.
This problem is fixed indirectly, because the save button is now always
disabled if the selection is cleared.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/btdeviceselectiondialog.h')
-rw-r--r-- | desktop-widgets/btdeviceselectiondialog.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/btdeviceselectiondialog.h b/desktop-widgets/btdeviceselectiondialog.h index f3cfa3413..448404843 100644 --- a/desktop-widgets/btdeviceselectiondialog.h +++ b/desktop-widgets/btdeviceselectiondialog.h @@ -68,7 +68,7 @@ private slots: void remoteDeviceScanFinished(); void hostModeStateChanged(QBluetoothLocalDevice::HostMode mode); void addRemoteDevice(const QBluetoothDeviceInfo &remoteDeviceInfo); - void itemClicked(QListWidgetItem *item); + void currentItemChanged(QListWidgetItem *item,QListWidgetItem *previous); void displayPairingMenu(const QPoint &pos); void pairingFinished(const QBluetoothAddress &address,QBluetoothLocalDevice::Pairing pairing); void error(QBluetoothLocalDevice::Error error); |