author | erik <erik> | 2007-02-08 23:11:26 (UTC) |
---|---|---|
committer | erik <erik> | 2007-02-08 23:11:26 (UTC) |
commit | 98353ac16bb90ee4b5df18945acf4fa7f05f9a85 (patch) (unidiff) | |
tree | 67ccd74ecfcc9006bece74089b6739736d78243f /libopie2/opiecore/device/odevice_motorola_ezx.cpp | |
parent | 497621fb3ba39ea511842a30cddfcdbda090e7ba (diff) | |
download | opie-98353ac16bb90ee4b5df18945acf4fa7f05f9a85.zip opie-98353ac16bb90ee4b5df18945acf4fa7f05f9a85.tar.gz opie-98353ac16bb90ee4b5df18945acf4fa7f05f9a85.tar.bz2 |
This commit provides fixes that quiet warnings associated to device
information. It should cause no change in behavior.
Diffstat (limited to 'libopie2/opiecore/device/odevice_motorola_ezx.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_motorola_ezx.cpp | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/libopie2/opiecore/device/odevice_motorola_ezx.cpp b/libopie2/opiecore/device/odevice_motorola_ezx.cpp index eed81ac..67a2b9b 100644 --- a/libopie2/opiecore/device/odevice_motorola_ezx.cpp +++ b/libopie2/opiecore/device/odevice_motorola_ezx.cpp | |||
@@ -122,57 +122,16 @@ void Motorola_EZX::init(const QString& cpu_info) | |||
122 | 122 | ||
123 | void Motorola_EZX::initButtons() | 123 | void Motorola_EZX::initButtons() |
124 | { | 124 | { |
125 | qDebug( "Motorola_EZX::initButtons()" ); | 125 | qDebug( "Motorola_EZX::initButtons()" ); |
126 | if ( d->m_buttons ) | 126 | if ( d->m_buttons ) |
127 | return; | 127 | return; |
128 | 128 | ||
129 | d->m_buttons = new QValueList <ODeviceButton>; | 129 | d->m_buttons = new QValueList <ODeviceButton>; |
130 | |||
131 | struct ezx_button * ezx_buttons; | ||
132 | int buttoncount; | ||
133 | |||
134 | /* | ||
135 | |||
136 | switch ( d->m_model ) | ||
137 | { | ||
138 | case Model_Motorola_EZX_SL6000: | ||
139 | pezx_buttons = ezx_buttons_6000; | ||
140 | buttoncount = ARRAY_SIZE(ezx_buttons_6000); | ||
141 | break; | ||
142 | case Model_Motorola_EZX_SLC3100: // fallthrough | ||
143 | case Model_Motorola_EZX_SLC3000: // fallthrough | ||
144 | case Model_Motorola_EZX_SLC1000: // fallthrough | ||
145 | case Model_Motorola_EZX_SLC7x0: | ||
146 | if ( isQWS( ) ) | ||
147 | { | ||
148 | addPreHandler(this); | ||
149 | } | ||
150 | pezx_buttons = ezx_buttons_c700; | ||
151 | buttoncount = ARRAY_SIZE(ezx_buttons_c700); | ||
152 | break; | ||
153 | default: | ||
154 | pezx_buttons = ezx_buttons; | ||
155 | buttoncount = ARRAY_SIZE(ezx_buttons); | ||
156 | break; | ||
157 | } | ||
158 | |||
159 | for ( int i = 0; i < buttoncount; i++ ) { | ||
160 | struct ezx_button *zb = pezx_buttons + i; | ||
161 | ODeviceButton b; | ||
162 | |||
163 | b.setKeycode( zb->code ); | ||
164 | b.setUserText( QObject::tr( "Button", zb->utext )); | ||
165 | b.setPixmap( OResource::loadPixmap( zb->pix )); | ||
166 | b.setFactoryPresetPressedAction( OQCopMessage( makeChannel ( zb->fpressedservice ), zb->fpressedaction )); | ||
167 | b.setFactoryPresetHeldAction( OQCopMessage( makeChannel ( zb->fheldservice ), zb->fheldaction )); | ||
168 | d->m_buttons->append( b ); | ||
169 | } | ||
170 | */ | ||
171 | reloadButtonMapping(); | 130 | reloadButtonMapping(); |
172 | } | 131 | } |
173 | 132 | ||
174 | void Motorola_EZX::playAlarmSound() | 133 | void Motorola_EZX::playAlarmSound() |
175 | { | 134 | { |
176 | #ifndef QT_NO_SOUND | 135 | #ifndef QT_NO_SOUND |
177 | static Sound snd ( "alarm" ); | 136 | static Sound snd ( "alarm" ); |
178 | if(!snd.isFinished()) | 137 | if(!snd.isFinished()) |
@@ -202,17 +161,17 @@ QValueList <OLedState> Motorola_EZX::ledStateList( OLed l ) const | |||
202 | OLedState Motorola_EZX::ledState( OLed which ) const | 161 | OLedState Motorola_EZX::ledState( OLed which ) const |
203 | { | 162 | { |
204 | if ( which == Led_Mail ) | 163 | if ( which == Led_Mail ) |
205 | return m_leds [0]; | 164 | return m_leds [0]; |
206 | else | 165 | else |
207 | return Led_Off; | 166 | return Led_Off; |
208 | } | 167 | } |
209 | 168 | ||
210 | bool Motorola_EZX::setLedState( OLed which, OLedState st ) | 169 | bool Motorola_EZX::setLedState( OLed, OLedState ) |
211 | { | 170 | { |
212 | // Currently not supported | 171 | // Currently not supported |
213 | qDebug( "Motorola_EZX::setLedState: ODevice handling not yet implemented" ); | 172 | qDebug( "Motorola_EZX::setLedState: ODevice handling not yet implemented" ); |
214 | return false; | 173 | return false; |
215 | } | 174 | } |
216 | 175 | ||
217 | int Motorola_EZX::displayBrightnessResolution() const | 176 | int Motorola_EZX::displayBrightnessResolution() const |
218 | { | 177 | { |
@@ -275,17 +234,17 @@ void Motorola_EZX::systemMessage( const QCString &msg, const QByteArray & ) | |||
275 | 234 | ||
276 | bool Motorola_EZX::suspend() { | 235 | bool Motorola_EZX::suspend() { |
277 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | 236 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend |
278 | return false; | 237 | return false; |
279 | 238 | ||
280 | bool res = false; | 239 | bool res = false; |
281 | QCopChannel::send( "QPE/System", "aboutToSuspend()" ); | 240 | QCopChannel::send( "QPE/System", "aboutToSuspend()" ); |
282 | 241 | ||
283 | struct timeval tvs, tvn; | 242 | struct timeval tvs; |
284 | ::gettimeofday ( &tvs, 0 ); | 243 | ::gettimeofday ( &tvs, 0 ); |
285 | 244 | ||
286 | ::sync(); // flush fs caches | 245 | ::sync(); // flush fs caches |
287 | res = ( ::system ( "apm --suspend" ) == 0 ); | 246 | res = ( ::system ( "apm --suspend" ) == 0 ); |
288 | 247 | ||
289 | QCopChannel::send( "QPE/System", "returnFromSuspend()" ); | 248 | QCopChannel::send( "QPE/System", "returnFromSuspend()" ); |
290 | 249 | ||
291 | return res; | 250 | return res; |