@ -199,7 +199,7 @@ TDEHardwareDevices::TDEHardwareDevices() {
m_deviceWatchTimer = new TQTimer ( this ) ;
m_deviceWatchTimer = new TQTimer ( this ) ;
connect ( m_deviceWatchTimer , SIGNAL ( timeout ( ) ) , this , SLOT ( processStatelessDevices ( ) ) ) ;
connect ( m_deviceWatchTimer , SIGNAL ( timeout ( ) ) , this , SLOT ( processStatelessDevices ( ) ) ) ;
// Special case for battery polling (longer delay, 5 seconds)
// Special case for battery and power supply polling (longer delay, 5 seconds)
m_batteryWatchTimer = new TQTimer ( this ) ;
m_batteryWatchTimer = new TQTimer ( this ) ;
connect ( m_batteryWatchTimer , SIGNAL ( timeout ( ) ) , this , SLOT ( processBatteryDevices ( ) ) ) ;
connect ( m_batteryWatchTimer , SIGNAL ( timeout ( ) ) , this , SLOT ( processBatteryDevices ( ) ) ) ;
@ -906,6 +906,15 @@ void TDEHardwareDevices::processBatteryDevices() {
emit hardwareUpdated ( hwdevice ) ;
emit hardwareUpdated ( hwdevice ) ;
emit hardwareEvent ( TDEHardwareEvent : : HardwareUpdated , hwdevice - > uniqueID ( ) ) ;
emit hardwareEvent ( TDEHardwareEvent : : HardwareUpdated , hwdevice - > uniqueID ( ) ) ;
}
}
else if ( hwdevice - > type ( ) = = TDEGenericDeviceType : : PowerSupply ) {
TDEMainsPowerDevice * pdevice = dynamic_cast < TDEMainsPowerDevice * > ( hwdevice ) ;
int previousOnlineState = pdevice - > online ( ) ;
rescanDeviceInformation ( hwdevice , false ) ;
if ( pdevice - > online ( ) ! = previousOnlineState ) {
emit hardwareUpdated ( hwdevice ) ;
emit hardwareEvent ( TDEHardwareEvent : : HardwareUpdated , hwdevice - > uniqueID ( ) ) ;
}
}
}
}
}
}