@@ -32,8 +32,8 @@ QgsGPSDeviceDialog::QgsGPSDeviceDialog(std::map<QString, QgsGPSDevice*>&
32
32
split.append (340 );
33
33
splitter->setSizes (split);
34
34
35
- QObject::connect (lbDeviceList, SIGNAL (itemSelectionChanged ( )),
36
- this , SLOT (slotSelectionChanged ()));
35
+ QObject::connect (lbDeviceList, SIGNAL (currentItemChanged (QListWidgetItem*, QListWidgetItem* )),
36
+ this , SLOT (slotSelectionChanged (QListWidgetItem* )));
37
37
slotUpdateDeviceList ();
38
38
}
39
39
@@ -103,8 +103,8 @@ void QgsGPSDeviceDialog::slotUpdateDeviceList(const QString& selection) {
103
103
104
104
// We're going to be changing the selected item, so disable our
105
105
// notificaton of that.
106
- QObject::disconnect (lbDeviceList, SIGNAL (itemSelectionChanged ( )),
107
- this , SLOT (slotSelectionChanged ()));
106
+ QObject::disconnect (lbDeviceList, SIGNAL (currentItemChanged (QListWidgetItem*, QListWidgetItem* )),
107
+ this , SLOT (slotSelectionChanged (QListWidgetItem* )));
108
108
109
109
lbDeviceList->clear ();
110
110
std::map<QString, QgsGPSDevice*>::const_iterator iter;
@@ -119,16 +119,16 @@ void QgsGPSDeviceDialog::slotUpdateDeviceList(const QString& selection) {
119
119
lbDeviceList->setCurrentRow (0 );
120
120
121
121
// Update the display and reconnect the selection changed signal
122
- slotSelectionChanged ();
123
- QObject::connect (lbDeviceList, SIGNAL (itemSelectionChanged ( )),
124
- this , SLOT (slotSelectionChanged ()));
122
+ slotSelectionChanged (lbDeviceList-> currentItem () );
123
+ QObject::connect (lbDeviceList, SIGNAL (currentItemChanged (QListWidgetItem*, QListWidgetItem* )),
124
+ this , SLOT (slotSelectionChanged (QListWidgetItem* )));
125
125
}
126
126
127
127
128
- void QgsGPSDeviceDialog::slotSelectionChanged () {
128
+ void QgsGPSDeviceDialog::slotSelectionChanged (QListWidgetItem *current ) {
129
129
if (lbDeviceList->count () > 0 )
130
130
{
131
- QString devName = lbDeviceList-> currentItem () ->text ();
131
+ QString devName = current ->text ();
132
132
leDeviceName->setText (devName);
133
133
QgsGPSDevice* device = mDevices [devName];
134
134
leWptDown->setText (device->
0 commit comments