X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=trace.h;h=870bd87ce03a2d9f7db322e19e30744ed84dc4c0;hb=b72c0798bfde194a8f87ecd15956bbe99b184db8;hp=3fe145844a6f0d1ba3cbcb104e8e5f9a3a3e4a14;hpb=198b9339f119bc261ee0d25a1a66b3b7c73e1226;p=dorian diff --git a/trace.h b/trace.h index 3fe1458..870bd87 100644 --- a/trace.h +++ b/trace.h @@ -1,11 +1,24 @@ #ifndef TRACE_H #define TRACE_H +#include #include #include #include #include +#include +#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 { public: @@ -14,13 +27,16 @@ 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 const char *prefix(); + static QString prefix(); QString name; static int indent; typedef struct {int type; const char *name;} EventName; static EventName eventTab[]; + static QFile file; }; #endif // TRACE_H