Removed unused hardwareEvent code.

Initialization of TDEHardwareDevices() always happens before the signal
was connected. The constructor of TDEHardwareDevices() is the only place
that was triggering the signal emission, so the code was non functional.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/6/head
Michele Calgaro 3 years ago
parent a5d6334b60
commit ea2b20ed7a
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -74,8 +74,6 @@ DeviceTrayComponent::DeviceTrayComponent(TQString device, KSystemTray * parent,
TDEHardwareDevices* hwdevices = TDEGlobal::hardwareDevices();
// Listen for hardware change events
connect(hwdevices, TQT_SIGNAL(hardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString)), this, TQT_SLOT(tdeHardwareEventHandler(TDEHardwareEvent::TDEHardwareEvent, TQString)));
// Trigger an initial hardware information update
tdeHardwareEventHandler(TDEHardwareEvent::HardwareListModified, TQString::null);

@ -963,14 +963,6 @@ void Tray::slotGenericDeviceRemoved(TDEGenericDevice *dev)
}
}
void Tray::slotGenericHardwareEvent(TDEHardwareEvent::TDEHardwareEvent event, TQString)
{
if (event == TDEHardwareEvent::HardwareListModified) {
updateDeviceTrays();
connectTrayDeviceManager();
}
}
void Tray::slotVPNEventHandler(TDENetworkVPNEventType::TDENetworkVPNEventType event, TQString message)
{
if (event == TDENetworkVPNEventType::LoginBanner) {
@ -1094,7 +1086,6 @@ Tray::Tray() : KSystemTray()
// get notified about new/removed devices
connect(hwdevices, TQT_SIGNAL(hardwareAdded(TDEGenericDevice*)), this, TQT_SLOT(slotGenericDeviceAdded(TDEGenericDevice*)));
connect(hwdevices, TQT_SIGNAL(hardwareRemoved(TDEGenericDevice*)), this, TQT_SLOT(slotGenericDeviceRemoved(TDEGenericDevice*)));
connect(hwdevices, TQT_SIGNAL(hardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString)), this, TQT_SLOT(slotGenericHardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString)));
// Notifications
connect(TDEGlobal::networkManager(), TQT_SIGNAL(networkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags)), this, TQT_SLOT(slotStateChangedNotify(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags)));

@ -115,7 +115,6 @@ class Tray : public KSystemTray
private slots:
void slotGenericDeviceAdded(TDEGenericDevice*);
void slotGenericDeviceRemoved(TDEGenericDevice*);
void slotGenericHardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString);
void slotVPNEventHandler(TDENetworkVPNEventType::TDENetworkVPNEventType event, TQString message);
private:

@ -487,9 +487,6 @@ WirelessDeviceTray::WirelessDeviceTray (TQString dev, KSystemTray * parent, cons
setPixmapForState(TDENetworkConnectionStatus::Disconnected, "wireless");
setPixmapForState(TDENetworkConnectionStatus::Connected, "nm_signal_50");
// Listen for hardware change events
connect(hwdevices, TQT_SIGNAL(hardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString)), this, TQT_SLOT(tdeHardwareEventHandler(TDEHardwareEvent::TDEHardwareEvent, TQString)));
// Trigger an initial hardware information update
tdeHardwareEventHandler(TDEHardwareEvent::HardwareListModified, TQString::null);
}

Loading…
Cancel
Save