summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-09-03 00:58:07 (UTC)
committer mickeyl <mickeyl>2005-09-03 00:58:07 (UTC)
commited772cdd53070ccc61c87a3b0e96769a9f558f71 (patch) (unidiff)
tree3ffb7fb25c302821fd0ea817b06ce99e1dc64d63
parent5907b0aabc816287db5c7f2b1ec8d8bfce4d9c28 (diff)
downloadopie-ed772cdd53070ccc61c87a3b0e96769a9f558f71.zip
opie-ed772cdd53070ccc61c87a3b0e96769a9f558f71.tar.gz
opie-ed772cdd53070ccc61c87a3b0e96769a9f558f71.tar.bz2
fix compilation when QT_QWS_EBX is defined
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp
index 9fac51b..8a8647e 100644
--- a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp
+++ b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp
@@ -233,129 +233,129 @@ void KeyHelperWidget::doEvent(const QString& key, int isPress)
233 /* check shift_unicode */ 233 /* check shift_unicode */
234 for(m=QWSServer::keyMap(); keycode == 0 && m->key_code != 0; m++){ 234 for(m=QWSServer::keyMap(); keycode == 0 && m->key_code != 0; m++){
235 if(m->shift_unicode == unicode){ 235 if(m->shift_unicode == unicode){
236 keycode = m->key_code; 236 keycode = m->key_code;
237 modifiers |= Qt::ShiftButton; 237 modifiers |= Qt::ShiftButton;
238 break; 238 break;
239 } 239 }
240 } 240 }
241 /* check ctrl_unicode */ 241 /* check ctrl_unicode */
242 for(m=QWSServer::keyMap(); keycode == 0 && m->key_code != 0; m++){ 242 for(m=QWSServer::keyMap(); keycode == 0 && m->key_code != 0; m++){
243 if(m->ctrl_unicode == unicode){ 243 if(m->ctrl_unicode == unicode){
244 keycode = m->key_code; 244 keycode = m->key_code;
245 modifiers |= Qt::ControlButton; 245 modifiers |= Qt::ControlButton;
246 break; 246 break;
247 } 247 }
248 } 248 }
249 } 249 }
250 doEvent(unicode, keycode, modifiers, isPress, 0); 250 doEvent(unicode, keycode, modifiers, isPress, 0);
251} 251}
252 252
253void KeyHelperWidget::sysMessage( 253void KeyHelperWidget::sysMessage(
254 const QCString& msg, const QByteArray& data) 254 const QCString& msg, const QByteArray& data)
255{ 255{
256 QSafeDataStream stream(data, IO_ReadOnly); 256 QSafeDataStream stream(data, IO_ReadOnly);
257 if(msg == "linkChanged(QString)"){ 257 if(msg == "linkChanged(QString)"){
258 ConfigEx& cfg = ConfigEx::getInstance("keyhelper"); 258 ConfigEx& cfg = ConfigEx::getInstance("keyhelper");
259 QString oldgroup = cfg.getGroup(); 259 QString oldgroup = cfg.getGroup();
260 if(cfg.readNumEntry("DetectLinkChange", 1) == 1){ 260 if(cfg.readNumEntry("DetectLinkChange", 1) == 1){
261 AppLnkManager::init(true); 261 AppLnkManager::init(true);
262 reload(); 262 reload();
263 } 263 }
264 cfg.setGroup(oldgroup); 264 cfg.setGroup(oldgroup);
265 } 265 }
266} 266}
267 267
268void MsgHandler(QtMsgType type, const char* msg) 268void MsgHandler(QtMsgType type, const char* msg)
269{ 269{
270 switch(type){ 270 switch(type){
271 case QtDebugMsg: 271 case QtDebugMsg:
272 if(g_level >= 2){ 272 if(g_level >= 2){
273 syslog(LOG_LOCAL5|LOG_DEBUG, 273 syslog(LOG_LOCAL5|LOG_DEBUG,
274 "<2>%s", msg); 274 "<2>%s", msg);
275 } 275 }
276 break; 276 break;
277 case QtWarningMsg: 277 case QtWarningMsg:
278 if(g_level >= 1){ 278 if(g_level >= 1){
279 syslog(LOG_LOCAL5|LOG_DEBUG, 279 syslog(LOG_LOCAL5|LOG_DEBUG,
280 "<1>%s", msg); 280 "<1>%s", msg);
281 } 281 }
282 break; 282 break;
283 default: 283 default:
284 break; 284 break;
285 } 285 }
286} 286}
287 287
288void KeyHelperWidget::initDebugLevel() 288void KeyHelperWidget::initDebugLevel()
289{ 289{
290 ConfigEx& cfg = ConfigEx::getInstance("keyhelper"); 290 ConfigEx& cfg = ConfigEx::getInstance("keyhelper");
291 cfg.setGroup("Global"); 291 cfg.setGroup("Global");
292 292
293 int level = cfg.readNumEntry("DebugLevel", 0); 293 int level = cfg.readNumEntry("DebugLevel", 0);
294 setDebugLevel(level); 294 setDebugLevel(level);
295} 295}
296 296
297void KeyHelperWidget::setDebugLevel(int /*level*/) 297void KeyHelperWidget::setDebugLevel(int level)
298{ 298{
299#ifdef QT_QWS_EBX 299#ifdef QT_QWS_EBX
300 static bool noDebug = true; 300 static bool noDebug = true;
301 g_level = level; 301 g_level = level;
302 if(g_level > 0){ 302 if(g_level > 0){
303 if(noDebug){ 303 if(noDebug){
304 m_defHandler = qInstallMsgHandler(MsgHandler); 304 m_defHandler = qInstallMsgHandler(MsgHandler);
305 noDebug = false; 305 noDebug = false;
306 } 306 }
307 } else { 307 } else {
308 qInstallMsgHandler(m_defHandler); 308 qInstallMsgHandler(m_defHandler);
309 noDebug = true; 309 noDebug = true;
310 } 310 }
311#endif 311#endif
312} 312}
313 313
314void KeyHelperWidget::enable() 314void KeyHelperWidget::enable()
315{ 315{
316 m_enable = true; 316 m_enable = true;
317 m_pHelper->enable(); 317 m_pHelper->enable();
318 //set(); 318 //set();
319 QTimer::singleShot(0, this, SLOT(set())); 319 QTimer::singleShot(0, this, SLOT(set()));
320} 320}
321 321
322void KeyHelperWidget::disable() 322void KeyHelperWidget::disable()
323{ 323{
324 m_enable = false; 324 m_enable = false;
325 m_pHelper->disable(); 325 m_pHelper->disable();
326 unset(); 326 unset();
327} 327}
328 328
329void KeyHelperWidget::pause() 329void KeyHelperWidget::pause()
330{ 330{
331 m_saved = m_enable; 331 m_saved = m_enable;
332 disable(); 332 disable();
333} 333}
334 334
335void KeyHelperWidget::restart() 335void KeyHelperWidget::restart()
336{ 336{
337 if(m_saved){ 337 if(m_saved){
338 enable(); 338 enable();
339 } 339 }
340} 340}
341 341
342void KeyHelperWidget::reload() 342void KeyHelperWidget::reload()
343{ 343{
344 disable(); 344 disable();
345 ConfigEx& cfg = ConfigEx::getInstance("keyhelper"); 345 ConfigEx& cfg = ConfigEx::getInstance("keyhelper");
346 cfg.reload(); 346 cfg.reload();
347 if(m_pHelper->reload(m_xmlfile) == false){ 347 if(m_pHelper->reload(m_xmlfile) == false){
348 if(m_status){ 348 if(m_status){
349 Global::statusMessage("KeyHelper: Load Error"); 349 Global::statusMessage("KeyHelper: Load Error");
350 } 350 }
351 } 351 }
352 init(); 352 init();
353 if(m_status){ 353 if(m_status){
354 QCopEnvelope e("QPE/System", "notBusy(QString)"); 354 QCopEnvelope e("QPE/System", "notBusy(QString)");
355 const QString app = KHUtil::currentApp(); 355 const QString app = KHUtil::currentApp();
356 e << app; 356 e << app;
357 m_status = false; 357 m_status = false;
358 } 358 }
359} 359}
360 360
361void KeyHelperWidget::version() 361void KeyHelperWidget::version()