diff options
-rw-r--r-- | src/hardware.cpp | 9 | ||||
-rw-r--r-- | src/hardware.h | 5 |
2 files changed, 13 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); diff --git a/src/hardware.h b/src/hardware.h index b46578d..4d64314 100644 --- a/src/hardware.h +++ b/src/hardware.h @@ -157,6 +157,11 @@ private: */ TQStringList allUDIs; + /*! + * This TQStringList contains the unmonitored UDIs we alread know + */ + TQStringList unknownUDIs; + //! hold information if suspend/standby/pm actions are supported and allowed /*! * This dictionary contains information about the available pm capabilities and |