KCM: Use currentChanged signal instead of clicked in deviceList

Using currentChanged signal it is now possible to select devices
with keyboard.
It also no longer refreshes plugin info when clicking on already
selected device.

REVIEW:123308
This commit is contained in:
David Rosca 2015-04-09 17:46:13 +02:00
parent c8eb5e3074
commit b71b39761d

View file

@ -75,7 +75,7 @@ KdeConnectKcm::KdeConnectKcm(QWidget *parent, const QVariantList&)
connect(devicesModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), connect(devicesModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(resetSelection())); this, SLOT(resetSelection()));
connect(kcmUi->deviceList, SIGNAL(pressed(QModelIndex)), connect(kcmUi->deviceList->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(deviceSelected(QModelIndex))); this, SLOT(deviceSelected(QModelIndex)));
connect(kcmUi->pair_button, SIGNAL(clicked()), connect(kcmUi->pair_button, SIGNAL(clicked()),
this, SLOT(requestPair())); this, SLOT(requestPair()));