summaryrefslogtreecommitdiff
path: root/libopie2
authoralwin <alwin>2005-03-12 14:16:28 (UTC)
committer alwin <alwin>2005-03-12 14:16:28 (UTC)
commitced8831cd48879e33fa11d45035cc7ff94180897 (patch) (side-by-side diff)
treeeba728c5df05e98e8c381baeea7e13bc1600b15d /libopie2
parentaa7039012cc79c02304e36db16e6f5ff82e19867 (diff)
downloadopie-ced8831cd48879e33fa11d45035cc7ff94180897.zip
opie-ced8831cd48879e33fa11d45035cc7ff94180897.tar.gz
opie-ced8831cd48879e33fa11d45035cc7ff94180897.tar.bz2
this error will get my personal "error of the month":
due different declarations of "readHingeSensors" (const vs. non-const) rotate-applet always got the default-implementation -> CASE_UNKNOWN. (device vs. device_zaurus). Setting it to "const" (which makes sense) let rotateapplet set light of or suspend or whatever user defined when case is closed.
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.cpp2
-rw-r--r--libopie2/opiecore/device/odevice.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp
index ed705a6..cf2061b 100644
--- a/libopie2/opiecore/device/odevice.cpp
+++ b/libopie2/opiecore/device/odevice.cpp
@@ -494,49 +494,49 @@ bool ODevice::hasLightSensor() const
int ODevice::readLightSensor()
{
return -1;
}
/**
* @return the light sensor resolution
*/
int ODevice::lightSensorResolution() const
{
return 0;
}
/**
* @return if the device has a hinge sensor
*/
bool ODevice::hasHingeSensor() const
{
return false;
}
/**
* @return a value from the hinge sensor
*/
-OHingeStatus ODevice::readHingeSensor()
+OHingeStatus ODevice::readHingeSensor()const
{
return CASE_UNKNOWN;
}
/**
* @return a list with CPU frequencies supported by the hardware
*/
const QStrList &ODevice::allowedCpuFrequencies() const
{
return *d->m_cpu_frequencies;
}
/**
* Set desired CPU frequency
*
* @param index index into d->m_cpu_frequencies of the frequency to be set
*/
bool ODevice::setCurrentCpuFrequency(uint index)
{
if (index >= d->m_cpu_frequencies->count())
return false;
char *freq = d->m_cpu_frequencies->at(index);
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h
index c434216..e7cd82a 100644
--- a/libopie2/opiecore/device/odevice.h
+++ b/libopie2/opiecore/device/odevice.h
@@ -264,49 +264,49 @@ public:
virtual bool setDisplayContrast ( int contrast );
virtual int displayContrastResolution() const;
// don't add new virtual methods, use this:
// /*virtual */ void boo(int i ) { return virtual_hook(1,&i); };
// and in your subclass do overwrite
// protected virtual int virtual_hook(int, void *)
// which is defined below
// input / output
virtual void playAlarmSound();
virtual void playKeySound();
virtual void playTouchSound();
virtual QValueList <OLed> ledList() const;
virtual QValueList <OLedState> ledStateList ( OLed led ) const;
virtual OLedState ledState ( OLed led ) const;
virtual bool setLedState ( OLed led, OLedState st );
virtual bool hasLightSensor() const;
virtual int readLightSensor();
virtual int lightSensorResolution() const;
virtual bool hasHingeSensor() const;
- virtual OHingeStatus readHingeSensor();
+ virtual OHingeStatus readHingeSensor()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
* by the device manufacturer and will be from most preferred button to least preffered
* button. Note that this list only contains "user mappable" buttons.
*
* @todo Make method const and take care of calling initButtons or make that const too
*
*/
const QValueList<ODeviceButton> &buttons();
/**
* Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it
* returns 0L
*/
const ODeviceButton *buttonForKeycode ( ushort keyCode );
/**
* Reassigns the pressed action for \a button. To return to the factory
* default pass an empty string as \a qcopMessage.