-rw-r--r-- | core/settings/light-and-power/light.cpp | 4 | ||||
-rw-r--r-- | libopie/odevice.cpp | 8 | ||||
-rw-r--r-- | libopie/odevice.h | 5 |
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 @@ -69,9 +69,9 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) contrast->hide(); contrast_ac->hide(); } - QStrList freq = ODevice::inst()->cpuFrequencies(); + QStrList freq = ODevice::inst()->allowedCpuFrequencies(); if ( freq.count() ) { frequency->insertStrList( freq ); frequency_ac->insertStrList( freq ); } else { @@ -209,9 +209,9 @@ 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 @@ -774,22 +774,22 @@ int ODevice::lightSensorResolution ( ) const return 0; } /** - * @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 @@ -197,11 +197,10 @@ public: virtual bool hasLightSensor ( ) const; 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 * of buttons will vary depending on the device. Button numbers will be assigned |