summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/odebug.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libopie2/opiecore/odebug.h b/libopie2/opiecore/odebug.h
index b040166..3851a41 100644
--- a/libopie2/opiecore/odebug.h
+++ b/libopie2/opiecore/odebug.h
@@ -288,196 +288,197 @@ inline odbgstream& endl( odbgstream &s) { s << "\n"; return s; }
288 * @param s the debug stream to write to 288 * @param s the debug stream to write to
289 * @return the debug stream (@p s) 289 * @return the debug stream (@p s)
290 */ 290 */
291inline odbgstream& flush( odbgstream &s) { s.flush(); return s; } 291inline odbgstream& flush( odbgstream &s) { s.flush(); return s; }
292 292
293odbgstream &perror( odbgstream &s); 293odbgstream &perror( odbgstream &s);
294 294
295/** 295/**
296 * ondbgstream is a dummy variant of @ref odbgstream. All functions do 296 * ondbgstream is a dummy variant of @ref odbgstream. All functions do
297 * nothing. 297 * nothing.
298 * @see ondDebug() 298 * @see ondDebug()
299 */ 299 */
300class ondbgstream { 300class ondbgstream {
301 public: 301 public:
302 /// Empty constructor. 302 /// Empty constructor.
303 ondbgstream() {} 303 ondbgstream() {}
304 ~ondbgstream() {} 304 ~ondbgstream() {}
305 /** 305 /**
306 * Does nothing. 306 * Does nothing.
307 * @return this stream 307 * @return this stream
308 */ 308 */
309 ondbgstream &operator<<(short int ) { return *this; } 309 ondbgstream &operator<<(short int ) { return *this; }
310 /** 310 /**
311 * Does nothing. 311 * Does nothing.
312 * @return this stream 312 * @return this stream
313 */ 313 */
314 ondbgstream &operator<<(unsigned short int ) { return *this; } 314 ondbgstream &operator<<(unsigned short int ) { return *this; }
315 /** 315 /**
316 * Does nothing. 316 * Does nothing.
317 * @return this stream 317 * @return this stream
318 */ 318 */
319 ondbgstream &operator<<(char ) { return *this; } 319 ondbgstream &operator<<(char ) { return *this; }
320 /** 320 /**
321 * Does nothing. 321 * Does nothing.
322 * @return this stream 322 * @return this stream
323 */ 323 */
324 ondbgstream &operator<<(unsigned char ) { return *this; } 324 ondbgstream &operator<<(unsigned char ) { return *this; }
325 /** 325 /**
326 * Does nothing. 326 * Does nothing.
327 * @return this stream 327 * @return this stream
328 */ 328 */
329 ondbgstream &operator<<(int ) { return *this; } 329 ondbgstream &operator<<(int ) { return *this; }
330 /** 330 /**
331 * Does nothing. 331 * Does nothing.
332 * @return this stream 332 * @return this stream
333 */ 333 */
334 ondbgstream &operator<<(unsigned int ) { return *this; } 334 ondbgstream &operator<<(unsigned int ) { return *this; }
335 /** 335 /**
336 * Does nothing. 336 * Does nothing.
337 */ 337 */
338 void flush() {} 338 void flush() {}
339 /** 339 /**
340 * Does nothing. 340 * Does nothing.
341 * @return this stream 341 * @return this stream
342 */ 342 */
343 ondbgstream &operator<<(const QString& ) { return *this; } 343 ondbgstream &operator<<(const QString& ) { return *this; }
344 /** 344 /**
345 * Does nothing. 345 * Does nothing.
346 * @return this stream 346 * @return this stream
347 */ 347 */
348 ondbgstream &operator<<(const QCString& ) { return *this; } 348 ondbgstream &operator<<(const QCString& ) { return *this; }
349 /** 349 /**
350 * Does nothing. 350 * Does nothing.
351 * @return this stream 351 * @return this stream
352 */ 352 */
353 ondbgstream &operator<<(const char *) { return *this; } 353 ondbgstream &operator<<(const char *) { return *this; }
354 /** 354 /**
355 * Does nothing. 355 * Does nothing.
356 * @return this stream 356 * @return this stream
357 */ 357 */
358 ondbgstream& operator<<(const void *) { return *this; } 358 ondbgstream& operator<<(const void *) { return *this; }
359 /** 359 /**
360 * Does nothing. 360 * Does nothing.
361 * @return this stream 361 * @return this stream
362 */ 362 */
363 ondbgstream& operator<<(void *) { return *this; } 363 ondbgstream& operator<<(void *) { return *this; }
364 /** 364 /**
365 * Does nothing. 365 * Does nothing.
366 * @return this stream 366 * @return this stream
367 */ 367 */
368 ondbgstream& operator<<(double) { return *this; } 368 ondbgstream& operator<<(double) { return *this; }
369 /** 369 /**
370 * Does nothing. 370 * Does nothing.
371 * @return this stream 371 * @return this stream
372 */ 372 */
373 ondbgstream& operator<<(long) { return *this; } 373 ondbgstream& operator<<(long) { return *this; }
374 /** 374 /**
375 * Does nothing. 375 * Does nothing.
376 * @return this stream 376 * @return this stream
377 */ 377 */
378 ondbgstream& operator<<(unsigned long) { return *this; } 378 ondbgstream& operator<<(unsigned long) { return *this; }
379 /** 379 /**
380 * Does nothing. 380 * Does nothing.
381 * @return this stream 381 * @return this stream
382 */ 382 */
383 ondbgstream& operator << (QWidget*) { return *this; } 383 ondbgstream& operator << (QWidget*) { return *this; }
384 /** 384 /**
385 * Does nothing. 385 * Does nothing.
386 * @return this stream 386 * @return this stream
387 */ 387 */
388 ondbgstream &form(const char *, ...) { return *this; } 388 ondbgstream &form(const char *, ...) { return *this; }
389 389
390 ondbgstream& operator<<( const QDateTime& ) { return *this; } 390 ondbgstream& operator<<( const QDateTime& ) { return *this; }
391 ondbgstream& operator<<( const QDate& ) { return *this; } 391 ondbgstream& operator<<( const QDate& ) { return *this; }
392 ondbgstream& operator<<( const QTime& ) { return *this; } 392 ondbgstream& operator<<( const QTime& ) { return *this; }
393 ondbgstream& operator<<( const QPoint & ) { return *this; } 393 ondbgstream& operator<<( const QPoint & ) { return *this; }
394 ondbgstream& operator<<( const QSize & ) { return *this; } 394 ondbgstream& operator<<( const QSize & ) { return *this; }
395 ondbgstream& operator<<( const QRect & ) { return *this; } 395 ondbgstream& operator<<( const QRect & ) { return *this; }
396 ondbgstream& operator<<( const QRegion & ) { return *this; } 396 ondbgstream& operator<<( const QRegion & ) { return *this; }
397 ondbgstream& operator<<( const QStringList & ) { return *this; } 397 ondbgstream& operator<<( const QStringList & ) { return *this; }
398 ondbgstream& operator<<( const QColor & ) { return *this; } 398 ondbgstream& operator<<( const QColor & ) { return *this; }
399 ondbgstream& operator<<( const QBrush & ) { return *this; } 399 ondbgstream& operator<<( const QBrush & ) { return *this; }
400 400
401private: 401private:
402 class Private; 402 class Private;
403 Private *d; 403 Private *d;
404}; 404};
405 405
406/*====================================================================================== 406/*======================================================================================
407 * related functions 407 * related functions
408 *======================================================================================*/ 408 *======================================================================================*/
409 409
410/** 410/**
411 * Does nothing. 411 * Does nothing.
412 * @param a stream 412 * @param a stream
413 * @return the given @p s 413 * @return the given @p s
414 */ 414 */
415inline ondbgstream& endl( ondbgstream & s) { return s; } 415inline ondbgstream& endl( ondbgstream & s) { return s; }
416/** 416/**
417 * Does nothing. 417 * Does nothing.
418 * @param a stream 418 * @param a stream
419 * @return the given @p s 419 * @return the given @p s
420 */ 420 */
421inline ondbgstream& flush( ondbgstream & s) { return s; } 421inline ondbgstream& flush( ondbgstream & s) { return s; }
422inline ondbgstream& perror( ondbgstream & s) { return s; } 422inline ondbgstream& perror( ondbgstream & s) { return s; }
423 423
424/** 424/**
425 * Returns a debug stream. You can use it to print debug 425 * Returns a debug stream. You can use it to print debug
426 * information. 426 * information.
427 * @param area an id to identify the output, 0 for default 427 * @param area an id to identify the output, 0 for default
428 */ 428 */
429odbgstream odDebug(int area = 0); 429odbgstream odDebug(int area = 0);
430odbgstream odDebug(bool cond, int area = 0); 430odbgstream odDebug(bool cond, int area = 0);
431/** 431/**
432 * Returns a backtrace. 432 * Returns a backtrace.
433 * @param levels the number of levels (-1 for unlimited) of the backtrace 433 * @param levels the number of levels (-1 for unlimited) of the backtrace
434 * @return a backtrace 434 * @return a backtrace
435 */ 435 */
436QString odBacktrace(int levels = -1); 436QString odBacktrace(int levels = -1);
437/** 437/**
438 * Returns a dummy debug stream. The stream does not print anything. 438 * Returns a dummy debug stream. The stream does not print anything.
439 * @param area an id to identify the output, 0 for default 439 * @param area an id to identify the output, 0 for default
440 * @see odDebug() 440 * @see odDebug()
441 */ 441 */
442inline ondbgstream ondDebug(int = 0) { return ondbgstream(); } 442inline ondbgstream ondDebug(int = 0) { return ondbgstream(); }
443inline ondbgstream ondDebug(bool , int = 0) { return ondbgstream(); } 443inline ondbgstream ondDebug(bool , int = 0) { return ondbgstream(); }
444inline QString ondBacktrace() { return QString::null; } 444inline QString ondBacktrace() { return QString::null; }
445inline QString ondBacktrace(int) { return QString::null; } 445inline QString ondBacktrace(int) { return QString::null; }
446 446
447/** 447/**
448 * Returns a warning stream. You can use it to print warning 448 * Returns a warning stream. You can use it to print warning
449 * information. 449 * information.
450 * @param area an id to identify the output, 0 for default 450 * @param area an id to identify the output, 0 for default
451 */ 451 */
452odbgstream odWarning(int area = 0); 452odbgstream odWarning(int area = 0);
453odbgstream odWarning(bool cond, int area = 0); 453odbgstream odWarning(bool cond, int area = 0);
454/** 454/**
455 * Returns an error stream. You can use it to print error 455 * Returns an error stream. You can use it to print error
456 * information. 456 * information.
457 * @param area an id to identify the output, 0 for default 457 * @param area an id to identify the output, 0 for default
458 */ 458 */
459odbgstream odError(int area = 0); 459odbgstream odError(int area = 0);
460odbgstream odError(bool cond, int area = 0); 460odbgstream odError(bool cond, int area = 0);
461/** 461/**
462 * Returns a fatal error stream. You can use it to print fatal error 462 * Returns a fatal error stream. You can use it to print fatal error
463 * information. 463 * information.
464 * @param area an id to identify the output, 0 for default 464 * @param area an id to identify the output, 0 for default
465 */ 465 */
466odbgstream odFatal(int area = 0); 466odbgstream odFatal(int area = 0);
467odbgstream odFatal(bool cond, int area = 0); 467odbgstream odFatal(bool cond, int area = 0);
468 468
469/** 469/**
470 * Deletes the odebugrc cache and therefore forces KDebug to reread the 470 * Deletes the odebugrc cache and therefore forces KDebug to reread the
471 * config file 471 * config file
472 */ 472 */
473void odClearDebugConfig(); 473void odClearDebugConfig();
474 474
475#ifdef OPIE_NO_DEBUG 475#ifdef OPIE_NO_DEBUG
476#define odDebug ondDebug 476#define odDebug ondDebug
477#define odBacktrace ondBacktrace 477#define odBacktrace ondBacktrace
478#endif 478#endif
479 479
480#endif
481
482} 480}
483} 481}
482
483#endif
484