Home · All Namespaces · All Classes · Main Classes

src/dcpdebug.h File Reference

#include <QtDebug>
Include dependency graph for dcpdebug.h:

Go to the source code of this file.

Namespaces

namespace  DcpDebug

Defines

#define WARNING
#define CRITICAL
#define DCP_DEBUG(...)   { /* Nothing... */ }
#define DCP_WARNING(...)
#define DCP_CRITICAL(...)
#define DCP_STR(qstring)   qstring.toLatin1().constData()
#define DCP_FUNC_START   DcpDebug::start(Q_FUNC_INFO);
 convenience macros for debugging how long time a function takes.
#define DCP_FUNC_END   DcpDebug::end(Q_FUNC_INFO);
#define dcp_failfunc_unless(x, return_value...)

Functions

void DcpDebug::time (const QString &msg="")
 Prints out a message with the current time.
void DcpDebug::start (const QString &msg="")
 Marks the start of msg. Can be used with DcpDebug::end to easily debug how long time it took between start and end.
void DcpDebug::end (const QString &msg="")
 Marks the end of msg.
void DcpDebug::dcpMsg (QtMsgType type, const char *msg)
 message handler for qDebug
void DcpDebug::dcpPrintMsg (QtMsgType type, const char *function, const char *formatstring,...)

Define Documentation

#define CRITICAL
#define DCP_CRITICAL ( ...   ) 
Value:
DcpDebug::dcpPrintMsg (\
        QtCriticalMsg, \
        __PRETTY_FUNCTION__, \
        __VA_ARGS__)
#define DCP_DEBUG ( ...   )     { /* Nothing... */ }
#define dcp_failfunc_unless ( x,
return_value...   ) 
Value:
if (!(x)) { \
        qWarning (#x " is false at %s", Q_FUNC_INFO); \
        return return_value; \
    }
#define DCP_FUNC_END   DcpDebug::end(Q_FUNC_INFO);
#define DCP_FUNC_START   DcpDebug::start(Q_FUNC_INFO);

convenience macros for debugging how long time a function takes.

The start and the end of the function should be marked with it.

#define DCP_STR ( qstring   )     qstring.toLatin1().constData()
#define DCP_WARNING ( ...   ) 
Value:
DcpDebug::dcpPrintMsg (\
        QtWarningMsg, \
        __PRETTY_FUNCTION__, \
        __VA_ARGS__)
#define WARNING

Copyright © 2009 Nokia Corporation Generated on Thu Feb 24 06:03:39 2011
Doxygen 1.6.1
Meego control panel