diff options
author | Emanoil Kotsev <deloptes@gmail.com> | 2025-04-03 20:43:02 +0000 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-06 18:25:34 +0900 |
commit | 59e94436404492a16c255dbb31859715d78907fb (patch) | |
tree | 1c73b4d5ff1898a6208a464bcf90647f902a5d5e /src/hardware.cpp | |
parent | ac0f1e3e1f4399dde091c1e2b89a592accbb3acf (diff) | |
download | tdepowersave-59e94436.tar.gz tdepowersave-59e94436.zip |
keep track of discovered but not handled devices, so that we do not complain over and over
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
(cherry picked from commit a0b8cfaccf4cde767ca5cc3f639cbdf7d4cf13b9)
Diffstat (limited to 'src/hardware.cpp')
-rw-r--r-- | src/hardware.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/hardware.cpp b/src/hardware.cpp index 7def545..9507ae0 100644 --- a/src/hardware.cpp +++ b/src/hardware.cpp @@ -76,6 +76,7 @@ HardwareInfo::HardwareInfo() { primaryBatteriesCriticalLevel = 2; allUDIs = TQStringList(); + unknownUDIs = TQStringList(); consoleKitSession = TQString(); BatteryList.setAutoDelete( true ); // the list owns the objects @@ -128,6 +129,7 @@ bool HardwareInfo::reinitHardwareInfos () { update_info_primBattery_changed = true; allUDIs = TQStringList(); + unknownUDIs = TQStringList(); BatteryList.clear(); primaryBatteries = new BatteryCollection(BAT_PRIMARY); @@ -182,7 +184,12 @@ void HardwareInfo::processHardwareChangedEvent (TDEGenericDevice* device) { } // TODO: add needed code } else { - kdDebug() << "unmonitored device changed: " << device->uniqueID() << endl; + TQString duid = device->uniqueID(); + if (!unknownUDIs.contains(duid)) + { + kdDebug() << "unmonitored device changed: " << duid << endl; + unknownUDIs.append(duid); + } } kdDebugFuncOut(trace); |