X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=trace.h;h=870bd87ce03a2d9f7db322e19e30744ed84dc4c0;hb=HEAD;hp=74ade808af4593b0686059d831c407a6c7440ba8;hpb=3ddf918a91680bdc490fd12c707f2d4166d68681;p=dorian diff --git a/trace.h b/trace.h index 74ade80..870bd87 100644 --- a/trace.h +++ b/trace.h @@ -6,8 +6,17 @@ #include #include #include +#include -#define TRACE Trace _(Q_FUNC_INFO) +#ifdef Q_OS_SYMBIAN +# ifdef __PRETTY_FUNCTION__ +# define TRACE Trace _(__PRETTY_FUNCTION__) +# else +# define TRACE Trace _(__FUNCTION__) +# endif +#else +# define TRACE Trace _(Q_FUNC_INFO) +#endif /** Trace helper. */ class Trace @@ -18,6 +27,8 @@ public: static QString event(QEvent::Type t); static void messageHandler(QtMsgType type, const char *msg); static QtMsgType level; + static void setFileName(const QString &fileName); + static QString fileName(); protected: static QString prefix(); @@ -25,6 +36,7 @@ protected: static int indent; typedef struct {int type; const char *name;} EventName; static EventName eventTab[]; + static QFile file; }; #endif // TRACE_H