summaryrefslogtreecommitdiff
authorerik <erik>2007-02-08 23:11:26 (UTC)
committer erik <erik>2007-02-08 23:11:26 (UTC)
commit98353ac16bb90ee4b5df18945acf4fa7f05f9a85 (patch) (unidiff)
tree67ccd74ecfcc9006bece74089b6739736d78243f
parent497621fb3ba39ea511842a30cddfcdbda090e7ba (diff)
downloadopie-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 (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_htc.cpp10
-rw-r--r--libopie2/opiecore/device/odevice_motorola_ezx.cpp45
-rw-r--r--libopie2/opiecore/device/odevice_palm.cpp4
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp10
4 files changed, 16 insertions, 53 deletions
diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp
index a6ade11..44b33c0 100644
--- a/libopie2/opiecore/device/odevice_htc.cpp
+++ b/libopie2/opiecore/device/odevice_htc.cpp
@@ -104,19 +104,19 @@ struct htc_button htc_buttons_universal [] = {
104 "devicebuttons/z_mail", 104 "devicebuttons/z_mail",
105 "opiemail", "raise()", 105 "opiemail", "raise()",
106 "opiemail", "newMail()" }, 106 "opiemail", "newMail()" },
107 107
108 { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"), 108 { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"),
109 "devicebuttons/z_hinge1", 109 "devicebuttons/z_hinge1",
110 "QPE/Rotation", "rotateDefault()",0}, 110 "QPE/Rotation", "rotateDefault()",0,0},
111 { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"), 111 { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"),
112 "devicebuttons/z_hinge2", 112 "devicebuttons/z_hinge2",
113 "QPE/Rotation", "rotateDefault()",0}, 113 "QPE/Rotation", "rotateDefault()",0,0},
114 { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"), 114 { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"),
115 "devicebuttons/z_hinge3", 115 "devicebuttons/z_hinge3",
116 "QPE/Rotation", "rotateDefault()",0}, 116 "QPE/Rotation", "rotateDefault()",0,0},
117}; 117};
118 118
119 119
120// 120//
121// HTC-Universal (PXA-model w/ 480x640 3.6" lcd) 121// HTC-Universal (PXA-model w/ 480x640 3.6" lcd)
122// HTC-Alpine (PXA-model w/ 240x320 3.5" lcd) 122// HTC-Alpine (PXA-model w/ 240x320 3.5" lcd)
@@ -352,13 +352,13 @@ OLedState HTC::ledState( OLed which ) const
352 if ( which == Led_Mail ) 352 if ( which == Led_Mail )
353 return m_leds [0]; 353 return m_leds [0];
354 else 354 else
355 return Led_Off; 355 return Led_Off;
356} 356}
357 357
358bool HTC::setLedState( OLed which, OLedState st ) 358bool HTC::setLedState( OLed, OLedState )
359{ 359{
360 qDebug( "HTC::setLedState: ODevice handling not yet implemented" ); 360 qDebug( "HTC::setLedState: ODevice handling not yet implemented" );
361 return false; 361 return false;
362} 362}
363 363
364int HTC::displayBrightnessResolution() const 364int HTC::displayBrightnessResolution() const
@@ -428,12 +428,14 @@ Transformation HTC::rotation() const
428 OHingeStatus hs = readHingeSensor(); 428 OHingeStatus hs = readHingeSensor();
429 qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs ); 429 qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs );
430 if ( hs == CASE_PORTRAIT ) rot = Rot0; 430 if ( hs == CASE_PORTRAIT ) rot = Rot0;
431 else if ( hs == CASE_UNKNOWN ) rot = Rot270; 431 else if ( hs == CASE_UNKNOWN ) rot = Rot270;
432 } 432 }
433 break; 433 break;
434 default:
435 break;
434 } 436 }
435 437
436 qDebug( "HTC::rotation() - returning '%d'", rot ); 438 qDebug( "HTC::rotation() - returning '%d'", rot );
437 return rot; 439 return rot;
438} 440}
439ODirection HTC::direction() const 441ODirection HTC::direction() const
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
@@ -124,53 +124,12 @@ 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
174void Motorola_EZX::playAlarmSound() 133void Motorola_EZX::playAlarmSound()
175{ 134{
176#ifndef QT_NO_SOUND 135#ifndef QT_NO_SOUND
@@ -204,13 +163,13 @@ OLedState Motorola_EZX::ledState( OLed which ) const
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
210bool Motorola_EZX::setLedState( OLed which, OLedState st ) 169bool 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
@@ -277,13 +236,13 @@ 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()" );
diff --git a/libopie2/opiecore/device/odevice_palm.cpp b/libopie2/opiecore/device/odevice_palm.cpp
index 76399f8..399c08c 100644
--- a/libopie2/opiecore/device/odevice_palm.cpp
+++ b/libopie2/opiecore/device/odevice_palm.cpp
@@ -86,13 +86,13 @@ struct palm_button palm_buttons [] = {
86 "devicebuttons/palm_voice_memo", 86 "devicebuttons/palm_voice_memo",
87 "QPE/TaskBar", "toggleMenu()", 87 "QPE/TaskBar", "toggleMenu()",
88 "QPE/TaskBar", "toggleStartMenu()" }, 88 "QPE/TaskBar", "toggleStartMenu()" },
89 { Model_Palm_LD, 89 { Model_Palm_LD,
90 Qt::Key_F8, QT_TRANSLATE_NOOP( "Button", "Rotate Button" ), 90 Qt::Key_F8, QT_TRANSLATE_NOOP( "Button", "Rotate Button" ),
91 "devicebuttons/palm_rotate", 91 "devicebuttons/palm_rotate",
92 "QPE/Rotation", "flip()",0}, 92 "QPE/Rotation", "flip()",0,0},
93}; 93};
94 94
95void Palm::init(const QString& cpu_info) 95void Palm::init(const QString& cpu_info)
96{ 96{
97 d->m_vendorstr = "Palm"; 97 d->m_vendorstr = "Palm";
98 d->m_vendor = Vendor_Palm; 98 d->m_vendor = Vendor_Palm;
@@ -215,12 +215,14 @@ bool Palm::suspend()
215 ::sync(); // flush fs caches 215 ::sync(); // flush fs caches
216 res = ( ::system ( "apm --suspend" ) == 0 ); 216 res = ( ::system ( "apm --suspend" ) == 0 );
217 217
218 QCopChannel::send( "QPE/System", "returnFromSuspend()" ); 218 QCopChannel::send( "QPE/System", "returnFromSuspend()" );
219 } 219 }
220 break; 220 break;
221 default:
222 break;
221 } 223 }
222 224
223 return res; 225 return res;
224} 226}
225 227
226 228
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 4963f54..9d2ebbb 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -104,19 +104,19 @@ struct z_button z_buttons_c700 [] = {
104 "devicebuttons/z_mail", 104 "devicebuttons/z_mail",
105 "opiemail", "raise()", 105 "opiemail", "raise()",
106 "opiemail", "newMail()" }, 106 "opiemail", "newMail()" },
107 107
108 { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"), 108 { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"),
109 "devicebuttons/z_hinge1", 109 "devicebuttons/z_hinge1",
110 "QPE/Rotation", "rotateDefault()",0}, 110 "QPE/Rotation", "rotateDefault()",0,0},
111 { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"), 111 { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"),
112 "devicebuttons/z_hinge2", 112 "devicebuttons/z_hinge2",
113 "QPE/Rotation", "rotateDefault()",0}, 113 "QPE/Rotation", "rotateDefault()",0,0},
114 { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"), 114 { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"),
115 "devicebuttons/z_hinge3", 115 "devicebuttons/z_hinge3",
116 "QPE/Rotation", "rotateDefault()",0}, 116 "QPE/Rotation", "rotateDefault()",0,0},
117}; 117};
118 118
119struct z_button z_buttons_6000 [] = { 119struct z_button z_buttons_6000 [] = {
120 { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), 120 { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"),
121 "devicebuttons/z_calendar", 121 "devicebuttons/z_calendar",
122 "datebook", "nextView()", 122 "datebook", "nextView()",
@@ -136,14 +136,14 @@ struct z_button z_buttons_6000 [] = {
136 { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), 136 { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"),
137 "devicebuttons/z_mail", 137 "devicebuttons/z_mail",
138 "opiemail", "raise()", 138 "opiemail", "raise()",
139 "opiemail", "newMail()" }, 139 "opiemail", "newMail()" },
140 { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Rotate Button"), 140 { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Rotate Button"),
141 "devicebuttons/z_rotate", 141 "devicebuttons/z_rotate",
142 0, 142 0, "QPE/Rotation",
143 "QPE/Rotation", "rotateDefault()" }, 143 "rotateDefault()", 0 },
144 { Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), 144 { Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"),
145 "devicebuttons/z_hinge3", 145 "devicebuttons/z_hinge3",
146 "QPE/VMemo", "toggleRecord()", 146 "QPE/VMemo", "toggleRecord()",
147 "sound", "raise()" }, 147 "sound", "raise()" },
148}; 148};
149 149