Commit 83abb46d authored by Jonathan Liu's avatar Jonathan Liu

Update device info on selection change instead of activation

Avoids having to double-click to update device info.
parent 90b53552
......@@ -44,8 +44,8 @@ DeviceListing::DeviceListing(QWidget *parent, InfoPanel *info, DevInfoPlugin *st
// nicSig = new NicSignals();
// connect(nicSig,SIGNAL(nicActivatedOrDisconnected()),this,SLOT(networkingChangedSlot()));
//
// Check if clicked
connect(this, &DeviceListing::itemActivated, this, &DeviceListing::itemActivatedSlot);
// Check if selection changed
connect(this, &DeviceListing::currentItemChanged, this, &DeviceListing::currentItemChangedSlot);
// Check if item is added
connect(Solid::DeviceNotifier::instance(), &Solid::DeviceNotifier::deviceAdded, this,
......@@ -136,9 +136,9 @@ void DeviceListing::populateListing(const show showStatus)
}
}
void DeviceListing::itemActivatedSlot(QTreeWidgetItem *listItemIn, const int columnIn)
void DeviceListing::currentItemChangedSlot(QTreeWidgetItem *listItemIn, QTreeWidgetItem *previous)
{
Q_UNUSED(columnIn);
Q_UNUSED(previous);
SolDevice *listItem = static_cast<SolDevice *>(listItemIn);
if (listItem->isDeviceSet()) {
......
......@@ -80,7 +80,7 @@ private:
//NicSignals *nicSig;
public Q_SLOTS:
void itemActivatedSlot(QTreeWidgetItem *, const int);
void currentItemChangedSlot(QTreeWidgetItem *, QTreeWidgetItem *);
void deviceAddedSlot(const QString &);
void deviceRemovedSlot(const QString &);
void collapseAllDevicesSlot();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment