diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/autodimm.cpp | 4 | ||||
-rw-r--r-- | src/autosuspend.cpp | 4 | ||||
-rw-r--r-- | src/blacklisteditdialog.cpp | 4 | ||||
-rw-r--r-- | src/configuredialog.cpp | 4 | ||||
-rw-r--r-- | src/countdowndialog.cpp | 4 | ||||
-rw-r--r-- | src/dbusInterface.cpp | 4 | ||||
-rw-r--r-- | src/dbusInterface.h | 5 | ||||
-rw-r--r-- | src/detaileddialog.cpp | 4 | ||||
-rw-r--r-- | src/dummy.cpp | 4 | ||||
-rw-r--r-- | src/hardware.cpp | 16 | ||||
-rw-r--r-- | src/hardware.h | 5 | ||||
-rw-r--r-- | src/hardware_battery.cpp | 50 | ||||
-rw-r--r-- | src/hardware_battery.h | 18 | ||||
-rw-r--r-- | src/hardware_batteryCollection.cpp | 4 | ||||
-rw-r--r-- | src/hardware_batteryCollection.h | 6 | ||||
-rw-r--r-- | src/hardware_cpu.cpp | 4 | ||||
-rw-r--r-- | src/hardware_cpu.h | 5 | ||||
-rw-r--r-- | src/inactivity.cpp | 4 | ||||
-rw-r--r-- | src/infodialog.cpp | 4 | ||||
-rw-r--r-- | src/logviewer.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/screen.cpp | 4 | ||||
-rw-r--r-- | src/settings.cpp | 4 | ||||
-rw-r--r-- | src/suspenddialog.cpp | 4 | ||||
-rw-r--r-- | src/tdepowersave.cpp | 6 | ||||
-rw-r--r-- | src/tdepowersave.h | 5 | ||||
-rw-r--r-- | src/tdepowersave_debug.h | 5 |
27 files changed, 94 insertions, 95 deletions
diff --git a/src/autodimm.cpp b/src/autodimm.cpp index e797e61..6ecea42 100644 --- a/src/autodimm.cpp +++ b/src/autodimm.cpp @@ -24,6 +24,10 @@ * \date 2007 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "autodimm.h" /*! The default constructor of the class autodimm */ diff --git a/src/autosuspend.cpp b/src/autosuspend.cpp index 01372ba..ea6515c 100644 --- a/src/autosuspend.cpp +++ b/src/autosuspend.cpp @@ -23,6 +23,10 @@ * \date 2005 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "autosuspend.h" /*! The default constructor of the class autosuspend */ diff --git a/src/blacklisteditdialog.cpp b/src/blacklisteditdialog.cpp index 85526f5..475670a 100644 --- a/src/blacklisteditdialog.cpp +++ b/src/blacklisteditdialog.cpp @@ -24,6 +24,10 @@ * \date 2005 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // own header #include "blacklisteditdialog.h" diff --git a/src/configuredialog.cpp b/src/configuredialog.cpp index a767508..ffc0a2b 100644 --- a/src/configuredialog.cpp +++ b/src/configuredialog.cpp @@ -25,6 +25,10 @@ * \date 2005 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // KDE - Headers #include <kaudioplayer.h> #include <tdeconfig.h> diff --git a/src/countdowndialog.cpp b/src/countdowndialog.cpp index a745035..7cb86ef 100644 --- a/src/countdowndialog.cpp +++ b/src/countdowndialog.cpp @@ -23,6 +23,10 @@ * \date 2007 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // own header #include "countdowndialog.h" #include "tdepowersave_debug.h" diff --git a/src/dbusInterface.cpp b/src/dbusInterface.cpp index 8ad5552..fccafbc 100644 --- a/src/dbusInterface.cpp +++ b/src/dbusInterface.cpp @@ -24,6 +24,10 @@ * \author Danny Kukawka, <[email protected]>, <[email protected]> * \date 2006-2007 */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif // QT - Header #include <tqtimer.h> diff --git a/src/dbusInterface.h b/src/dbusInterface.h index 3fa8071..40dc7bd 100644 --- a/src/dbusInterface.h +++ b/src/dbusInterface.h @@ -35,11 +35,6 @@ #define DBUS_API_SUBJECT_TO_CHANGE #endif -// Global Header -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - // QT - Header #include <tqobject.h> #include <tqstring.h> diff --git a/src/detaileddialog.cpp b/src/detaileddialog.cpp index 851d844..69dc5f0 100644 --- a/src/detaileddialog.cpp +++ b/src/detaileddialog.cpp @@ -27,6 +27,10 @@ * \date 2006-2007 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // KDE headers: #include <kled.h> #include <kiconloader.h> diff --git a/src/dummy.cpp b/src/dummy.cpp index 4243c94..8e842d8 100644 --- a/src/dummy.cpp +++ b/src/dummy.cpp @@ -24,6 +24,10 @@ * \date 2007 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <tqstring.h> #include <tdelocale.h> diff --git a/src/hardware.cpp b/src/hardware.cpp index f4efedd..86098db 100644 --- a/src/hardware.cpp +++ b/src/hardware.cpp @@ -24,6 +24,10 @@ * \date 2006-2007 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // include global header #include <fcntl.h> @@ -193,9 +197,6 @@ void HardwareInfo::processKeyPressEvent(unsigned int keycode, TDEEventDevice* ed // FIXME // How can I get specific button press/release information (instead of just "something happened to the button") from the TDE hardware library? - // TODO: Check if we really need to monitor this events. We get maybe also - // HAL_PROPERTY_CHANGED event for the key -// if (message.startsWith("ButtonPressed")) { kdDebug() << "ButtonPressed event from TDE HW library " << endl; if (((edevice->eventType() == TDEEventDeviceType::ACPIPowerButton) || (edevice->eventType() == TDEEventDeviceType::ACPIOtherInput)) && (keycode == KEY_POWER)) { @@ -212,9 +213,6 @@ void HardwareInfo::processKeyPressEvent(unsigned int keycode, TDEEventDevice* ed // else if (!brightness_in_hardware && value.endsWith("-down")) // TQTimer::singleShot(50, this, TQT_SLOT(brightnessDownPressed())); } -// } else { -// kdDebug() << "Unmonitored HAL_CONDITION: " << message << " : " << value << endl; -// } kdDebugFuncOut(trace); } @@ -1082,9 +1080,9 @@ bool HardwareInfo::setCPUFreqGovernor( const char *governor ) { // --> TDE hardware library method call (trigger actions) section -- END <--- // --> private helper functions/slots to forward/handle events -- START <-- -// need this functions to make events from HAL/D-Bus independent -// from QT event loop and to allow QT3 D-Bus bindings to get not -// blocked by normal KDE/QT (GUI) calls +// need this functions to make events independent +// from TQt event loop and to allow TQt3 D-Bus bindings to get not +// blocked by normal TDE/TQt (GUI) calls /*! * Function to emit the signal for the Power button. */ diff --git a/src/hardware.h b/src/hardware.h index 701df3e..f28f1b4 100644 --- a/src/hardware.h +++ b/src/hardware.h @@ -33,11 +33,6 @@ #ifndef _HARDWARE_H_ #define _HARDWARE_H_ -// Global Header -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - // QT - Header #include <tqstring.h> #include <tqobject.h> diff --git a/src/hardware_battery.cpp b/src/hardware_battery.cpp index 2e60fb7..9d5c1a0 100644 --- a/src/hardware_battery.cpp +++ b/src/hardware_battery.cpp @@ -24,6 +24,10 @@ * \date 2006-2007 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "hardware_battery.h" // FOR REFERENCE @@ -110,20 +114,12 @@ void Battery::initDefault() { kdDebugFuncOut(trace); } -//! initialize this battery object with values from HAL +//! initialize this battery object void Battery::init() { kdDebugFuncIn(trace); - // read battery information from HAL - if (resetUdi(udi)) { - //udi is valid - recheck(); //fills all values - //ready here for now - } else { - //udi is invalid or is no battery - state=BAT_HAL_ERROR; - kdWarning() << "Warning: Battery::init cannot make use of udi " << udi << endl; - } + // read battery information + recheck(); //fills all values initialized = true; kdDebugFuncOut(trace); @@ -201,7 +197,7 @@ void Battery::recheck() { kdDebugFuncOut(trace); } -// ---> query HAL for properties SECTION : START <---- +// ---> query for properties SECTION : START <---- //! to check battery.present /*! @@ -729,11 +725,11 @@ bool Battery::checkChargingState () { return _ret; } -// ---> query HAL for properties SECTION : END <---- +// ---> query for properties SECTION : END <---- -//! to recheck a special value for a HAL event +//! to recheck a special value for an event /*! - * Check for the given property new values from HAL and set them to + * Check for the given property new values and set them to * the battery variables. * \param device TDEGenericDevice */ @@ -747,26 +743,6 @@ void Battery::updateProperty(TDEGenericDevice* device) { kdDebugFuncOut(trace); } -//! Resets the current HAL udi used by the one given -/*! -* The given TQString will be (checked and) used as new HAL udi for the battery. -* But don't forget to do a recheck of the battery afterwards. -* \param _udi TQString with the UDI to reset -* \return boolean with the result of the operation -* \retval true if reset was successfull -* \retval false if reset couldn't be applied -*/ -bool Battery::resetUdi(TQString _udi) { - kdDebugFuncIn(trace); - - // FIXME - // What does this function do outside of HAL!?!? Should it even exist any more? - bool tmp_result=true; - - kdDebugFuncOut(trace); - return tmp_result; -} - // ---> write private members SECTION : START <---- //! sets the chargelevel in percent when battery should go into state warning @@ -815,7 +791,7 @@ void Battery::setCritLevel(int _crit_level) { // ---> write private members SECTION : END <---- // ---> get private members SECTION : START <---- -//! reports the HAL udi of this battery +//! reports the udi of this battery TQString Battery::getUdi() const { return TQString(udi); } @@ -880,7 +856,7 @@ int Battery::getCurrentLevel() const { return charge_level_current; } -//! reports HAL capacity_state value +//! reports capacity_state value TQString Battery::getCapacityState() const { return TQString(capacity_state); } diff --git a/src/hardware_battery.h b/src/hardware_battery.h index 36bf68c..f250700 100644 --- a/src/hardware_battery.h +++ b/src/hardware_battery.h @@ -32,11 +32,6 @@ #ifndef _BATTERY_H_ #define _BATTERY_H_ -// Global Header -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - // QT - Header #include <tqstring.h> #include <tqstringlist.h> @@ -282,16 +277,6 @@ public: //! reports the chargelevel in percent when battery goes to state critical int getCritLevel() const; - //writeable access to internals - //! Resets the current TDE hardware library udi used by the one given - /*! - * The given TQString will be (checked and) used as new TDE hardware library udi for the battery. - * But don't forget to do a recheck of the battery afterwards. - * \li returns TRUE: if reset was successfull - * \li returns FALSE: if reset couldn't be applied - */ - bool resetUdi(TQString); - //! sets the chargelevel in percent when battery should go into state warning void setWarnLevel(int _warn_level); //! sets the chargelevel in percent when battery should go into state low @@ -336,8 +321,7 @@ enum BAT_STATE { BAT_WARN, BAT_LOW, BAT_CRIT, - BAT_NORM, - BAT_HAL_ERROR + BAT_NORM }; #endif diff --git a/src/hardware_batteryCollection.cpp b/src/hardware_batteryCollection.cpp index e331492..0d4f4dd 100644 --- a/src/hardware_batteryCollection.cpp +++ b/src/hardware_batteryCollection.cpp @@ -24,6 +24,10 @@ * \date 2006-2007 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // own headers #include "hardware_batteryCollection.h" diff --git a/src/hardware_batteryCollection.h b/src/hardware_batteryCollection.h index c30717d..4de81e7 100644 --- a/src/hardware_batteryCollection.h +++ b/src/hardware_batteryCollection.h @@ -31,11 +31,6 @@ #ifndef _BATTERYCOLLECTION_H_ #define _BATTERYCOLLECTION_H_ -// Global Header -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - // QT - Header #include <tqstring.h> #include <tqstringlist.h> @@ -85,7 +80,6 @@ private: * \li BAT_LOW: batterylevel is already low * \li BAT_CRIT: batterylevel has become really critical * \li BAT_NONE: battery state not available - * \li BAT_HAL_ERROR: battery state couldn't be retrieved because of a HAL error */ int state; diff --git a/src/hardware_cpu.cpp b/src/hardware_cpu.cpp index e87de1a..5bf25ac 100644 --- a/src/hardware_cpu.cpp +++ b/src/hardware_cpu.cpp @@ -28,6 +28,10 @@ * \date 2006 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // include own header #include "hardware_cpu.h" #include "hardware_cpu.moc" diff --git a/src/hardware_cpu.h b/src/hardware_cpu.h index 62069ac..b0932a5 100644 --- a/src/hardware_cpu.h +++ b/src/hardware_cpu.h @@ -33,11 +33,6 @@ #ifndef _HARDWARE_CPU_H_ #define _HARDWARE_CPU_H_ -// Global Header -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - // QT Headers #include <tqstring.h> #include <tqobject.h> diff --git a/src/inactivity.cpp b/src/inactivity.cpp index 977161e..d22d7f8 100644 --- a/src/inactivity.cpp +++ b/src/inactivity.cpp @@ -23,6 +23,10 @@ * \date 2006-2007 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // own header #include "inactivity.h" diff --git a/src/infodialog.cpp b/src/infodialog.cpp index 9837acb..00a5790 100644 --- a/src/infodialog.cpp +++ b/src/infodialog.cpp @@ -25,6 +25,10 @@ * \date 2005 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // own headers #include "infodialog.h" diff --git a/src/logviewer.cpp b/src/logviewer.cpp index bd2207a..2761e40 100644 --- a/src/logviewer.cpp +++ b/src/logviewer.cpp @@ -23,6 +23,10 @@ * \version 0.0.1 * \date 2007 */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif // QT header #include <tqfile.h> diff --git a/src/main.cpp b/src/main.cpp index 9a7339d..036837c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,6 +19,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "tdepowersave.h" #include <kuniqueapplication.h> #include <tdeaboutdata.h> diff --git a/src/screen.cpp b/src/screen.cpp index ef68a26..ff298f1 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -26,6 +26,10 @@ * \author Danny Kukawka, <[email protected]>, <[email protected]> * \date 2004 - 2006 */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif // own headers #include "screen.h" diff --git a/src/settings.cpp b/src/settings.cpp index 1d167e6..5ed02d9 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -24,6 +24,10 @@ * \date 2005 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // KDE Header #include <tdelocale.h> diff --git a/src/suspenddialog.cpp b/src/suspenddialog.cpp index cdd82c0..3c6a155 100644 --- a/src/suspenddialog.cpp +++ b/src/suspenddialog.cpp @@ -24,6 +24,10 @@ * \date 2005 */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // KDE - Headers #include <tdelocale.h> #include <kiconloader.h> diff --git a/src/tdepowersave.cpp b/src/tdepowersave.cpp index 12f2060..4db6039 100644 --- a/src/tdepowersave.cpp +++ b/src/tdepowersave.cpp @@ -19,6 +19,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + // KDE headers: #include <tdeaboutapplication.h> #include <tdeapplication.h> @@ -2895,7 +2899,7 @@ void tdepowersave::showDetailedDialog( ){ /*! * DCOP Interface funtion to open the configure dialog. * \return boolean with the result of open the dialog - * \retval false if failed (e.g. D-Bus or HAL is not running) + * \retval false if failed * \retval true if correct opend */ bool tdepowersave::openConfigureDialog (){ diff --git a/src/tdepowersave.h b/src/tdepowersave.h index df5214a..8014b46 100644 --- a/src/tdepowersave.h +++ b/src/tdepowersave.h @@ -22,11 +22,6 @@ #ifndef _TDEPOWERSAVE_H_ #define _TDEPOWERSAVE_H_ -// Global Header -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - // KDE - Header #include <kprocess.h> #include <ksystemtray.h> diff --git a/src/tdepowersave_debug.h b/src/tdepowersave_debug.h index e97ade6..c978bfd 100644 --- a/src/tdepowersave_debug.h +++ b/src/tdepowersave_debug.h @@ -21,11 +21,6 @@ #ifndef _TDEPOWERSAVE_DEBUG_H #define _TDEPOWERSAVE_DEBUG_H -// Global Header -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - // Default Header #include <stdio.h> #include <stdlib.h> |