summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp4
-rw-r--r--libopie/odevice.cpp8
-rw-r--r--libopie/odevice.h5
3 files changed, 8 insertions, 9 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 68c2929..eda0c1f 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -70,7 +70,7 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags )
contrast_ac->hide();
}
- QStrList freq = ODevice::inst()->cpuFrequencies();
+ QStrList freq = ODevice::inst()->allowedCpuFrequencies();
if ( freq.count() ) {
frequency->insertStrList( freq );
frequency_ac->insertStrList( freq );
@@ -210,7 +210,7 @@ void LightSettings::setContrast ( int contr )
void LightSettings::setFrequency ( int index )
{
qWarning("LightSettings::setFrequency(%d)", index);
- ODevice::inst ( )-> setCpuFrequency(index);
+ ODevice::inst ( )-> setCurrentCpuFrequency(index);
}
void LightSettings::resetBacklight ( )
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 4c33a0e..d6e6892 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -775,20 +775,20 @@ int ODevice::lightSensorResolution ( ) const
}
/**
- * @return a list with valid CPU frequency
+ * @return a list with CPU frequencies supported by the hardware
*/
-QStrList &ODevice::cpuFrequencies ( ) const
+const QStrList &ODevice::allowedCpuFrequencies ( ) const
{
return *d->m_cpu_frequencies;
}
/**
- * Set desired cpu frequency
+ * Set desired CPU frequency
*
* @param index index into d->m_cpu_frequencies of the frequency to be set
*/
-bool ODevice::setCpuFrequency(uint index)
+bool ODevice::setCurrentCpuFrequency(uint index)
{
if (index >= d->m_cpu_frequencies->count())
return false;
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 18ff5f1..f2f6467 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -198,9 +198,8 @@ public:
virtual int readLightSensor ( );
virtual int lightSensorResolution ( ) const;
- QStrList &cpuFrequencies() const;
- bool setCpuFrequency(uint index);
- int cpuFrequency() const;
+ const QStrList &allowedCpuFrequencies() const;
+ bool setCurrentCpuFrequency(uint index);
/**
* Returns the available buttons on this device. The number and location