-rw-r--r-- | microkde/kdebug.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/microkde/kdebug.h b/microkde/kdebug.h index bb9cfe3..534943c 100644 --- a/microkde/kdebug.h +++ b/microkde/kdebug.h | |||
@@ -1,22 +1,24 @@ | |||
1 | #ifndef MINIKDE_KDEBUG_H | 1 | #ifndef MINIKDE_KDEBUG_H |
2 | #define MINIKDE_KDEBUG_H | 2 | #define MINIKDE_KDEBUG_H |
3 | 3 | ||
4 | #include <stdio.h> | 4 | #include <stdio.h> |
5 | 5 | ||
6 | #include <qstring.h> | 6 | #include <qstring.h> |
7 | //Added by qt3to4: | ||
8 | #include <Q3CString> | ||
7 | 9 | ||
8 | 10 | ||
9 | 11 | ||
10 | class kdbgstream; | 12 | class kdbgstream; |
11 | typedef kdbgstream & (*KDBGFUNC)(kdbgstream &); // manipulator function | 13 | typedef kdbgstream & (*KDBGFUNC)(kdbgstream &); // manipulator function |
12 | 14 | ||
13 | class kdbgstream { | 15 | class kdbgstream { |
14 | public: | 16 | public: |
15 | kdbgstream(unsigned int _area, unsigned int _level, bool _print = true) : | 17 | kdbgstream(unsigned int _area, unsigned int _level, bool _print = true) : |
16 | area(_area), level(_level), print( _print ) { print = false; } | 18 | area(_area), level(_level), print( _print ) { print = false; } |
17 | /* kdbgstream(const char * initialString, unsigned int _area, unsigned int _level, bool _print = false) : | 19 | /* kdbgstream(const char * initialString, unsigned int _area, unsigned int _level, bool _print = false) : |
18 | output(QString::fromLatin1(initialString)), area(_area), level(_level), print(_print) { print = false; }*/ | 20 | output(QString::fromLatin1(initialString)), area(_area), level(_level), print(_print) { print = false; }*/ |
19 | ~kdbgstream() | 21 | ~kdbgstream() |
20 | { | 22 | { |
21 | // if (!output.isEmpty()) { | 23 | // if (!output.isEmpty()) { |
22 | // fprintf(stderr,"ASSERT: debug output not ended with \\n\n"); | 24 | // fprintf(stderr,"ASSERT: debug output not ended with \\n\n"); |
@@ -51,33 +53,33 @@ class kdbgstream { | |||
51 | kdbgstream &operator<<(unsigned int) { | 53 | kdbgstream &operator<<(unsigned int) { |
52 | 54 | ||
53 | return *this; | 55 | return *this; |
54 | } | 56 | } |
55 | kdbgstream &operator<<(long) { | 57 | kdbgstream &operator<<(long) { |
56 | return *this; | 58 | return *this; |
57 | } | 59 | } |
58 | kdbgstream &operator<<(unsigned long) { | 60 | kdbgstream &operator<<(unsigned long) { |
59 | return *this; | 61 | return *this; |
60 | } | 62 | } |
61 | kdbgstream &operator<<(const QString&) { | 63 | kdbgstream &operator<<(const QString&) { |
62 | return *this; | 64 | return *this; |
63 | } | 65 | } |
64 | kdbgstream &operator<<(const char*) { | 66 | kdbgstream &operator<<(const char*) { |
65 | return *this; | 67 | return *this; |
66 | } | 68 | } |
67 | kdbgstream &operator<<(const QCString&) { | 69 | kdbgstream &operator<<(const Q3CString&) { |
68 | return *this; | 70 | return *this; |
69 | } | 71 | } |
70 | kdbgstream& operator<<(KDBGFUNC f) { | 72 | kdbgstream& operator<<(KDBGFUNC f) { |
71 | return (*f)(*this); | 73 | return (*f)(*this); |
72 | } | 74 | } |
73 | kdbgstream& operator<<(double) { | 75 | kdbgstream& operator<<(double) { |
74 | if (!print) return *this; | 76 | if (!print) return *this; |
75 | return *this; | 77 | return *this; |
76 | } | 78 | } |
77 | void flush() { | 79 | void flush() { |
78 | return; | 80 | return; |
79 | } | 81 | } |
80 | private: | 82 | private: |
81 | QString output; | 83 | QString output; |
82 | unsigned int area, level; | 84 | unsigned int area, level; |
83 | bool print; | 85 | bool print; |