hwmanager: simplify code after tdelibs commit 5f795c0b.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/260/head
Michele Calgaro 9 months ago
parent 02549ecc72
commit 3aa097d05d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF
  1. 9
      kcontrol/hwmanager/hwmanager.cpp
  2. 1
      kcontrol/hwmanager/hwmanager.h

@ -97,7 +97,7 @@ TDEHWManager::TDEHWManager(TQWidget *parent, const char *name, const TQStringLis
connect(base->showByConnection, TQT_SIGNAL(clicked()), TQT_SLOT(populateTreeView()));
connect(hwdevices, TQT_SIGNAL(hardwareAdded(TDEGenericDevice*)), this, TQT_SLOT(populateTreeView()));
connect(hwdevices, TQT_SIGNAL(hardwareRemoved(TDEGenericDevice*)), this, TQT_SLOT(delayedPopulateTreeView()));
connect(hwdevices, TQT_SIGNAL(hardwareRemoved(TDEGenericDevice*)), this, TQT_SLOT(populateTreeView()));
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
load();
@ -191,13 +191,6 @@ void TDEHWManager::populateTreeView()
}
}
void TDEHWManager::delayedPopulateTreeView() {
// When hardwareRemoved() is triggered, the list of devices still contains the device which
// is about to be removed. Therefore we need to delay repopulating the device tree after the
// removal of the device.
TQTimer::singleShot(0, this, TQT_SLOT(populateTreeView()));
}
void TDEHWManager::populateTreeViewLeaf(DeviceIconItem *parent, bool show_by_connection, TQString selected_syspath) {
if (show_by_connection) {
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();

@ -59,7 +59,6 @@ k_dcop:
private slots:
void populateTreeView();
void delayedPopulateTreeView();
void populateTreeViewLeaf(DeviceIconItem *parent, bool show_by_connection, TQString selected_syspath);
void deviceChanged(TDEGenericDevice*);
void cryptographicCardPinRequested(TQString prompt, TDECryptographicCardDevice* cdevice);

Loading…
Cancel
Save