summaryrefslogtreecommitdiffstats
path: root/src/settings.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-16 23:01:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-16 23:01:29 +0000
commit4304e8d9dab8e20513e38e71b0debdf6937b630c (patch)
tree76a86f013a811449a5b5bfbbbb962e7db0bbcc6a /src/settings.cpp
parentba24506b3bb46312d998468ad3c1a7f28058b2bd (diff)
downloadtdepowersave-4304e8d9dab8e20513e38e71b0debdf6937b630c.tar.gz
tdepowersave-4304e8d9dab8e20513e38e71b0debdf6937b630c.zip
Finish TQt4 port of kpowersave
This enables both Qt3 and Qt4 builds git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpowersave@1228282 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 342bb81..c756370 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -51,14 +51,14 @@ Settings::~Settings()
/*!
* Loads the scheme settings from kpowersaverc and fills the related variables.
- * \param schemeName QString with the name (realname not i18n() version) of the
+ * \param schemeName TQString with the name (realname not i18n() version) of the
* scheme which setting should be load. If the scheme could not
* be loaded, this function try to load "default-scheme"
* \return the result of the load
* \retval true if the settings could be loaded
* \retval false if there was no group named like schemeName or named "default-scheme"
*/
-bool Settings::load_scheme_settings(QString schemeName){
+bool Settings::load_scheme_settings(TQString schemeName){
kconfig->reparseConfiguration();
bool setToDefault = false;
@@ -149,7 +149,7 @@ bool Settings::load_scheme_settings(QString schemeName){
kconfig->setGroup(schemeName);
}
- QString _autoInactiveAction = kconfig->readEntry("autoInactiveAction", "NULL");
+ TQString _autoInactiveAction = kconfig->readEntry("autoInactiveAction", "NULL");
if( _autoInactiveAction != "NULL") {
autoInactiveAction = _autoInactiveAction;
}
@@ -198,7 +198,7 @@ bool Settings::load_scheme_settings(QString schemeName){
disableNotifications = kconfig->readBoolEntry("disableNotifications",false);
- QString _cpufreqpolicy = kconfig->readEntry("cpuFreqPolicy", "NULL");
+ TQString _cpufreqpolicy = kconfig->readEntry("cpuFreqPolicy", "NULL");
if( _cpufreqpolicy == "NULL") {
kconfig->setGroup("default-scheme");
_cpufreqpolicy = kconfig->readEntry("cpuFreqPolicy", "NULL");
@@ -317,10 +317,10 @@ bool Settings::load_general_settings(){
/*!
* Map the string value from the config file to the type from \ref action
- * \param _action a QString to map
+ * \param _action a TQString to map
* \return a integer value with the result of the mapping as \ref action
*/
-action Settings::mapActionToType (QString _action) {
+action Settings::mapActionToType (TQString _action) {
if (_action.isEmpty()) {
return NONE;
@@ -332,12 +332,12 @@ action Settings::mapActionToType (QString _action) {
return GO_SUSPEND2DISK;
} else if (_action.startsWith("SUSPEND2RAM")) {
return GO_SUSPEND2RAM;
- } else if (_action.startsWith("CPUFREQ_POWERSAVE")) {
- return CPUFREQ_POWERSAVE;
- } else if (_action.startsWith("CPUFREQ_DYNAMIC")) {
- return CPUFREQ_DYNAMIC;
- } else if (_action.startsWith("CPUFREQ_PERFORMANCE")) {
- return CPUFREQ_PERFORMANCE;
+ } else if (_action.startsWith("CPUFRETQ_POWERSAVE")) {
+ return CPUFRETQ_POWERSAVE;
+ } else if (_action.startsWith("CPUFRETQ_DYNAMIC")) {
+ return CPUFRETQ_DYNAMIC;
+ } else if (_action.startsWith("CPUFRETQ_PERFORMANCE")) {
+ return CPUFRETQ_PERFORMANCE;
} else if (_action.startsWith("BRIGHTNESS")) {
return BRIGHTNESS;
} else {
@@ -370,7 +370,7 @@ void Settings::load_kde(){
kde->enabled = _kconfig->readBoolEntry("Enabled", true);
kde->lock = _kconfig->readBoolEntry("Lock", true);
- QString _savername = _kconfig->readEntry("Saver", "KBlankscreen.desktop");
+ TQString _savername = _kconfig->readEntry("Saver", "KBlankscreen.desktop");
if (_savername.startsWith("KBlankscreen.desktop"))
kde->blanked = true;
else