author | zecke <zecke> | 2004-10-17 18:35:57 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-17 18:35:57 (UTC) |
commit | 7e28835e246e06e157d760a40754b6257f2ad6b3 (patch) (unidiff) | |
tree | 1a4a844b17fcc6d60b4e1a35af533bf5f000b187 | |
parent | ca65f8eba5cd7e3a2e3096b545527ced8b76e5cd (diff) | |
download | opie-7e28835e246e06e157d760a40754b6257f2ad6b3.zip opie-7e28835e246e06e157d760a40754b6257f2ad6b3.tar.gz opie-7e28835e246e06e157d760a40754b6257f2ad6b3.tar.bz2 |
Remove unused variable
-rw-r--r-- | libopie2/opiecore/odebug.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/odebug.h b/libopie2/opiecore/odebug.h index 18dc09e..87d9741 100644 --- a/libopie2/opiecore/odebug.h +++ b/libopie2/opiecore/odebug.h | |||
@@ -1,491 +1,491 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | (C) 2003 Michael 'Mickey' Lauer (mickey@tm.informatik.uni-frankfurt.de) | 3 | (C) 2003 Michael 'Mickey' Lauer (mickey@tm.informatik.uni-frankfurt.de) |
4 | Inspired by the KDE debug classes, which are | 4 | Inspired by the KDE debug classes, which are |
5 | (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org) | 5 | (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org) |
6 | (C) 2002 Holger Freyther (freyther@kde.org) | 6 | (C) 2002 Holger Freyther (freyther@kde.org) |
7 | =. | 7 | =. |
8 | .=l. | 8 | .=l. |
9 | .>+-= | 9 | .>+-= |
10 | _;:, .> :=|. This program is free software; you can | 10 | _;:, .> :=|. This program is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 11 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 13 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 14 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 17 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 22 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifndef ODEBUG_H | 33 | #ifndef ODEBUG_H |
34 | #define ODEBUG_H | 34 | #define ODEBUG_H |
35 | 35 | ||
36 | #include <qstring.h> | 36 | #include <qstring.h> |
37 | 37 | ||
38 | class QWidget; | 38 | class QWidget; |
39 | class QDateTime; | 39 | class QDateTime; |
40 | class QDate; | 40 | class QDate; |
41 | class QTime; | 41 | class QTime; |
42 | class QPoint; | 42 | class QPoint; |
43 | class QSize; | 43 | class QSize; |
44 | class QRect; | 44 | class QRect; |
45 | class QRegion; | 45 | class QRegion; |
46 | class QStringList; | 46 | class QStringList; |
47 | class QColor; | 47 | class QColor; |
48 | class QBrush; | 48 | class QBrush; |
49 | 49 | ||
50 | namespace Opie { | 50 | namespace Opie { |
51 | namespace Core { | 51 | namespace Core { |
52 | 52 | ||
53 | class odbgstream; | 53 | class odbgstream; |
54 | class ondbgstream; | 54 | class ondbgstream; |
55 | 55 | ||
56 | #ifdef __GNUC__ | 56 | #ifdef __GNUC__ |
57 | #define o_funcinfo "[" << __PRETTY_FUNCTION__ << "] " | 57 | #define o_funcinfo "[" << __PRETTY_FUNCTION__ << "] " |
58 | #else | 58 | #else |
59 | #define o_funcinfo "[" << __FILE__ << ":" << __LINE__ << "] " | 59 | #define o_funcinfo "[" << __FILE__ << ":" << __LINE__ << "] " |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | #define o_lineinfo "[" << __FILE__ << ":" << __LINE__ << "] " | 62 | #define o_lineinfo "[" << __FILE__ << ":" << __LINE__ << "] " |
63 | 63 | ||
64 | #define owarn Opie::Core::odWarning() | 64 | #define owarn Opie::Core::odWarning() |
65 | #define oerr Opie::Core::odError() | 65 | #define oerr Opie::Core::odError() |
66 | #define odebug Opie::Core::odDebug() | 66 | #define odebug Opie::Core::odDebug() |
67 | #define ofatal Opie::Core::odFatal() | 67 | #define ofatal Opie::Core::odFatal() |
68 | #define oendl "\n" | 68 | #define oendl "\n" |
69 | 69 | ||
70 | const int ODEBUG_IGNORE = -1; | 70 | const int ODEBUG_IGNORE = -1; |
71 | const int ODEBUG_FILE = 0; | 71 | const int ODEBUG_FILE = 0; |
72 | const int ODEBUG_MSGBOX = 1; | 72 | const int ODEBUG_MSGBOX = 1; |
73 | const int ODEBUG_STDERR = 2; | 73 | const int ODEBUG_STDERR = 2; |
74 | const int ODEBUG_SYSLOG = 3; | 74 | const int ODEBUG_SYSLOG = 3; |
75 | const int ODEBUG_SOCKET = 4; | 75 | const int ODEBUG_SOCKET = 4; |
76 | 76 | ||
77 | class odbgstreamprivate; | 77 | class odbgstreamprivate; |
78 | /** | 78 | /** |
79 | * odbgstream is a text stream that allows you to print debug messages. | 79 | * odbgstream is a text stream that allows you to print debug messages. |
80 | * Using the overloaded "<<" operator you can send messages. Usually | 80 | * Using the overloaded "<<" operator you can send messages. Usually |
81 | * you do not create the odbgstream yourself, but use @ref odDebug() (odebug) | 81 | * you do not create the odbgstream yourself, but use @ref odDebug() (odebug) |
82 | * @ref odWarning() (owarn), @ref odError() (oerr) or @ref odFatal (ofatal) to obtain one. | 82 | * @ref odWarning() (owarn), @ref odError() (oerr) or @ref odFatal (ofatal) to obtain one. |
83 | * | 83 | * |
84 | * Example: | 84 | * Example: |
85 | * <pre> | 85 | * <pre> |
86 | * int i = 5; | 86 | * int i = 5; |
87 | * odebug << "The value of i is " << i << oendl; | 87 | * odebug << "The value of i is " << i << oendl; |
88 | * </pre> | 88 | * </pre> |
89 | * @see odbgstream | 89 | * @see odbgstream |
90 | */ | 90 | */ |
91 | 91 | ||
92 | /*====================================================================================== | 92 | /*====================================================================================== |
93 | * odbgstream | 93 | * odbgstream |
94 | *======================================================================================*/ | 94 | *======================================================================================*/ |
95 | 95 | ||
96 | class odbgstream | 96 | class odbgstream |
97 | { | 97 | { |
98 | public: | 98 | public: |
99 | /** | 99 | /** |
100 | * @internal | 100 | * @internal |
101 | */ | 101 | */ |
102 | odbgstream(unsigned int _area, unsigned int _level, bool _print = true); | 102 | odbgstream(unsigned int _area, unsigned int _level, bool _print = true); |
103 | odbgstream(const char * initialString, unsigned int _area, unsigned int _level, bool _print = true); | 103 | odbgstream(const char * initialString, unsigned int _area, unsigned int _level, bool _print = true); |
104 | odbgstream(odbgstream &str); | 104 | odbgstream(odbgstream &str); |
105 | odbgstream(const odbgstream &str); | 105 | odbgstream(const odbgstream &str); |
106 | virtual ~odbgstream(); | 106 | virtual ~odbgstream(); |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * Prints the given value. | 109 | * Prints the given value. |
110 | * @param i the boolean to print (as "true" or "false") | 110 | * @param i the boolean to print (as "true" or "false") |
111 | * @return this stream | 111 | * @return this stream |
112 | */ | 112 | */ |
113 | odbgstream &operator<<(bool i); | 113 | odbgstream &operator<<(bool i); |
114 | /** | 114 | /** |
115 | * Prints the given value. | 115 | * Prints the given value. |
116 | * @param i the short to print | 116 | * @param i the short to print |
117 | * @return this stream | 117 | * @return this stream |
118 | */ | 118 | */ |
119 | odbgstream &operator<<(short i); | 119 | odbgstream &operator<<(short i); |
120 | /** | 120 | /** |
121 | * Prints the given value. | 121 | * Prints the given value. |
122 | * @param i the unsigned short to print | 122 | * @param i the unsigned short to print |
123 | * @return this stream | 123 | * @return this stream |
124 | */ | 124 | */ |
125 | odbgstream &operator<<(unsigned short i); | 125 | odbgstream &operator<<(unsigned short i); |
126 | /** | 126 | /** |
127 | * Prints the given value. | 127 | * Prints the given value. |
128 | * @param i the char to print | 128 | * @param i the char to print |
129 | * @return this stream | 129 | * @return this stream |
130 | */ | 130 | */ |
131 | odbgstream &operator<<(char i); | 131 | odbgstream &operator<<(char i); |
132 | /** | 132 | /** |
133 | * Prints the given value. | 133 | * Prints the given value. |
134 | * @param i the unsigned char to print | 134 | * @param i the unsigned char to print |
135 | * @return this stream | 135 | * @return this stream |
136 | */ | 136 | */ |
137 | odbgstream &operator<<(unsigned char i); | 137 | odbgstream &operator<<(unsigned char i); |
138 | /** | 138 | /** |
139 | * Prints the given value. | 139 | * Prints the given value. |
140 | * @param i the int to print | 140 | * @param i the int to print |
141 | * @return this stream | 141 | * @return this stream |
142 | */ | 142 | */ |
143 | odbgstream &operator<<(int i); | 143 | odbgstream &operator<<(int i); |
144 | /** | 144 | /** |
145 | * Prints the given value. | 145 | * Prints the given value. |
146 | * @param i the unsigned int to print | 146 | * @param i the unsigned int to print |
147 | * @return this stream | 147 | * @return this stream |
148 | */ | 148 | */ |
149 | odbgstream &operator<<(unsigned int i); | 149 | odbgstream &operator<<(unsigned int i); |
150 | /** | 150 | /** |
151 | * Prints the given value. | 151 | * Prints the given value. |
152 | * @param i the long to print | 152 | * @param i the long to print |
153 | * @return this stream | 153 | * @return this stream |
154 | */ | 154 | */ |
155 | odbgstream &operator<<(long i); | 155 | odbgstream &operator<<(long i); |
156 | /** | 156 | /** |
157 | * Prints the given value. | 157 | * Prints the given value. |
158 | * @param i the unsigned long to print | 158 | * @param i the unsigned long to print |
159 | * @return this stream | 159 | * @return this stream |
160 | */ | 160 | */ |
161 | odbgstream &operator<<(unsigned long i); | 161 | odbgstream &operator<<(unsigned long i); |
162 | /** | 162 | /** |
163 | * Flushes the output. | 163 | * Flushes the output. |
164 | */ | 164 | */ |
165 | virtual void flush(); | 165 | virtual void flush(); |
166 | /** | 166 | /** |
167 | * Prints the given value. | 167 | * Prints the given value. |
168 | * @param string the string to print | 168 | * @param string the string to print |
169 | * @return this stream | 169 | * @return this stream |
170 | */ | 170 | */ |
171 | odbgstream &operator<<(const QString& string); | 171 | odbgstream &operator<<(const QString& string); |
172 | /** | 172 | /** |
173 | * Prints the given value. | 173 | * Prints the given value. |
174 | * @param string the string to print | 174 | * @param string the string to print |
175 | * @return this stream | 175 | * @return this stream |
176 | */ | 176 | */ |
177 | odbgstream &operator<<(const char *string); | 177 | odbgstream &operator<<(const char *string); |
178 | /** | 178 | /** |
179 | * Prints the given value. | 179 | * Prints the given value. |
180 | * @param string the string to print | 180 | * @param string the string to print |
181 | * @return this stream | 181 | * @return this stream |
182 | */ | 182 | */ |
183 | odbgstream &operator<<(const QCString& string); | 183 | odbgstream &operator<<(const QCString& string); |
184 | /** | 184 | /** |
185 | * Prints the given value. | 185 | * Prints the given value. |
186 | * @param p a pointer to print (in number form) | 186 | * @param p a pointer to print (in number form) |
187 | * @return this stream | 187 | * @return this stream |
188 | */ | 188 | */ |
189 | odbgstream& operator<<(const void * p); | 189 | odbgstream& operator<<(const void * p); |
190 | /** | 190 | /** |
191 | * Prints the given value. | 191 | * Prints the given value. |
192 | * @param d the double to print | 192 | * @param d the double to print |
193 | * @return this stream | 193 | * @return this stream |
194 | */ | 194 | */ |
195 | odbgstream& operator<<(double d); | 195 | odbgstream& operator<<(double d); |
196 | /** | 196 | /** |
197 | * Prints the string @p format which can contain | 197 | * Prints the string @p format which can contain |
198 | * printf-style formatted values. | 198 | * printf-style formatted values. |
199 | * @param format the printf-style format | 199 | * @param format the printf-style format |
200 | * @return this stream | 200 | * @return this stream |
201 | */ | 201 | */ |
202 | odbgstream &form(const char *format, ...); | 202 | odbgstream &form(const char *format, ...); |
203 | /** Operator to print out basic information about a QWidget. | 203 | /** Operator to print out basic information about a QWidget. |
204 | * Output of class names only works if the class is moc'ified. | 204 | * Output of class names only works if the class is moc'ified. |
205 | * @param widget the widget to print | 205 | * @param widget the widget to print |
206 | * @return this stream | 206 | * @return this stream |
207 | */ | 207 | */ |
208 | odbgstream& operator<< (QWidget* widget); | 208 | odbgstream& operator<< (QWidget* widget); |
209 | 209 | ||
210 | /** | 210 | /** |
211 | * Prints the given value. | 211 | * Prints the given value. |
212 | * @param dateTime the datetime to print | 212 | * @param dateTime the datetime to print |
213 | * @return this stream | 213 | * @return this stream |
214 | */ | 214 | */ |
215 | odbgstream& operator<< ( const QDateTime& dateTime ); | 215 | odbgstream& operator<< ( const QDateTime& dateTime ); |
216 | 216 | ||
217 | /** | 217 | /** |
218 | * Prints the given value. | 218 | * Prints the given value. |
219 | * @param date the date to print | 219 | * @param date the date to print |
220 | * @return this stream | 220 | * @return this stream |
221 | */ | 221 | */ |
222 | odbgstream& operator<< ( const QDate& date ); | 222 | odbgstream& operator<< ( const QDate& date ); |
223 | 223 | ||
224 | /** | 224 | /** |
225 | * Prints the given value. | 225 | * Prints the given value. |
226 | * @param time the time to print | 226 | * @param time the time to print |
227 | * @return this stream | 227 | * @return this stream |
228 | */ | 228 | */ |
229 | odbgstream& operator<< ( const QTime& time ); | 229 | odbgstream& operator<< ( const QTime& time ); |
230 | 230 | ||
231 | /** | 231 | /** |
232 | * Prints the given value. | 232 | * Prints the given value. |
233 | * @param point the point to print | 233 | * @param point the point to print |
234 | * @return this stream | 234 | * @return this stream |
235 | */ | 235 | */ |
236 | odbgstream& operator<< ( const QPoint& point ); | 236 | odbgstream& operator<< ( const QPoint& point ); |
237 | 237 | ||
238 | /** | 238 | /** |
239 | * Prints the given value. | 239 | * Prints the given value. |
240 | * @param size the QSize to print | 240 | * @param size the QSize to print |
241 | * @return this stream | 241 | * @return this stream |
242 | */ | 242 | */ |
243 | odbgstream& operator<< ( const QSize& size ); | 243 | odbgstream& operator<< ( const QSize& size ); |
244 | 244 | ||
245 | /** | 245 | /** |
246 | * Prints the given value. | 246 | * Prints the given value. |
247 | * @param rect the QRect to print | 247 | * @param rect the QRect to print |
248 | * @return this stream | 248 | * @return this stream |
249 | */ | 249 | */ |
250 | odbgstream& operator<< ( const QRect& rect); | 250 | odbgstream& operator<< ( const QRect& rect); |
251 | 251 | ||
252 | /** | 252 | /** |
253 | * Prints the given value. | 253 | * Prints the given value. |
254 | * @param region the QRegion to print | 254 | * @param region the QRegion to print |
255 | * @return this stream | 255 | * @return this stream |
256 | */ | 256 | */ |
257 | odbgstream& operator<< ( const QRegion& region); | 257 | odbgstream& operator<< ( const QRegion& region); |
258 | 258 | ||
259 | /** | 259 | /** |
260 | * Prints the given value. | 260 | * Prints the given value. |
261 | * @param list the stringlist to print | 261 | * @param list the stringlist to print |
262 | * @return this stream | 262 | * @return this stream |
263 | */ | 263 | */ |
264 | odbgstream& operator<< ( const QStringList& list); | 264 | odbgstream& operator<< ( const QStringList& list); |
265 | 265 | ||
266 | /** | 266 | /** |
267 | * Prints the given value. | 267 | * Prints the given value. |
268 | * @param color the color to print | 268 | * @param color the color to print |
269 | * @return this stream | 269 | * @return this stream |
270 | */ | 270 | */ |
271 | odbgstream& operator<< ( const QColor& color); | 271 | odbgstream& operator<< ( const QColor& color); |
272 | 272 | ||
273 | /** | 273 | /** |
274 | * Prints the given value. | 274 | * Prints the given value. |
275 | * @param brush the brush to print | 275 | * @param brush the brush to print |
276 | * @return this stream | 276 | * @return this stream |
277 | */ | 277 | */ |
278 | odbgstream& operator<< ( const QBrush& brush ); | 278 | odbgstream& operator<< ( const QBrush& brush ); |
279 | 279 | ||
280 | private: | 280 | private: |
281 | QString output; | 281 | QString output; |
282 | unsigned int area, level; | 282 | unsigned int area, level; |
283 | bool print; | 283 | bool print; |
284 | odbgstreamprivate* d; | 284 | odbgstreamprivate* d; |
285 | }; | 285 | }; |
286 | 286 | ||
287 | /** | 287 | /** |
288 | * Prints an "\n". | 288 | * Prints an "\n". |
289 | * @param s the debug stream to write to | 289 | * @param s the debug stream to write to |
290 | * @return the debug stream (@p s) | 290 | * @return the debug stream (@p s) |
291 | */ | 291 | */ |
292 | inline odbgstream& endl( odbgstream &s) { s << "\n"; return s; } | 292 | inline odbgstream& endl( odbgstream &s) { s << "\n"; return s; } |
293 | /** | 293 | /** |
294 | * Flushes the stream. | 294 | * Flushes the stream. |
295 | * @param s the debug stream to write to | 295 | * @param s the debug stream to write to |
296 | * @return the debug stream (@p s) | 296 | * @return the debug stream (@p s) |
297 | */ | 297 | */ |
298 | inline odbgstream& flush( odbgstream &s) { s.flush(); return s; } | 298 | inline odbgstream& flush( odbgstream &s) { s.flush(); return s; } |
299 | 299 | ||
300 | odbgstream &perror( odbgstream &s); | 300 | odbgstream &perror( odbgstream &s); |
301 | 301 | ||
302 | /** | 302 | /** |
303 | * ondbgstream is a dummy variant of @ref odbgstream. All functions do | 303 | * ondbgstream is a dummy variant of @ref odbgstream. All functions do |
304 | * nothing. | 304 | * nothing. |
305 | * @see ondDebug() | 305 | * @see ondDebug() |
306 | */ | 306 | */ |
307 | class ondbgstream { | 307 | class ondbgstream { |
308 | public: | 308 | public: |
309 | /// Empty constructor. | 309 | /// Empty constructor. |
310 | ondbgstream() {} | 310 | ondbgstream() {} |
311 | ~ondbgstream() {} | 311 | ~ondbgstream() {} |
312 | /** | 312 | /** |
313 | * Does nothing. | 313 | * Does nothing. |
314 | * @return this stream | 314 | * @return this stream |
315 | */ | 315 | */ |
316 | ondbgstream &operator<<(short int ) { return *this; } | 316 | ondbgstream &operator<<(short int ) { return *this; } |
317 | /** | 317 | /** |
318 | * Does nothing. | 318 | * Does nothing. |
319 | * @return this stream | 319 | * @return this stream |
320 | */ | 320 | */ |
321 | ondbgstream &operator<<(unsigned short int ) { return *this; } | 321 | ondbgstream &operator<<(unsigned short int ) { return *this; } |
322 | /** | 322 | /** |
323 | * Does nothing. | 323 | * Does nothing. |
324 | * @return this stream | 324 | * @return this stream |
325 | */ | 325 | */ |
326 | ondbgstream &operator<<(char ) { return *this; } | 326 | ondbgstream &operator<<(char ) { return *this; } |
327 | /** | 327 | /** |
328 | * Does nothing. | 328 | * Does nothing. |
329 | * @return this stream | 329 | * @return this stream |
330 | */ | 330 | */ |
331 | ondbgstream &operator<<(unsigned char ) { return *this; } | 331 | ondbgstream &operator<<(unsigned char ) { return *this; } |
332 | /** | 332 | /** |
333 | * Does nothing. | 333 | * Does nothing. |
334 | * @return this stream | 334 | * @return this stream |
335 | */ | 335 | */ |
336 | ondbgstream &operator<<(int ) { return *this; } | 336 | ondbgstream &operator<<(int ) { return *this; } |
337 | /** | 337 | /** |
338 | * Does nothing. | 338 | * Does nothing. |
339 | * @return this stream | 339 | * @return this stream |
340 | */ | 340 | */ |
341 | ondbgstream &operator<<(unsigned int ) { return *this; } | 341 | ondbgstream &operator<<(unsigned int ) { return *this; } |
342 | /** | 342 | /** |
343 | * Does nothing. | 343 | * Does nothing. |
344 | */ | 344 | */ |
345 | void flush() {} | 345 | void flush() {} |
346 | /** | 346 | /** |
347 | * Does nothing. | 347 | * Does nothing. |
348 | * @return this stream | 348 | * @return this stream |
349 | */ | 349 | */ |
350 | ondbgstream &operator<<(const QString& ) { return *this; } | 350 | ondbgstream &operator<<(const QString& ) { return *this; } |
351 | /** | 351 | /** |
352 | * Does nothing. | 352 | * Does nothing. |
353 | * @return this stream | 353 | * @return this stream |
354 | */ | 354 | */ |
355 | ondbgstream &operator<<(const QCString& ) { return *this; } | 355 | ondbgstream &operator<<(const QCString& ) { return *this; } |
356 | /** | 356 | /** |
357 | * Does nothing. | 357 | * Does nothing. |
358 | * @return this stream | 358 | * @return this stream |
359 | */ | 359 | */ |
360 | ondbgstream &operator<<(const char *) { return *this; } | 360 | ondbgstream &operator<<(const char *) { return *this; } |
361 | /** | 361 | /** |
362 | * Does nothing. | 362 | * Does nothing. |
363 | * @return this stream | 363 | * @return this stream |
364 | */ | 364 | */ |
365 | ondbgstream& operator<<(const void *) { return *this; } | 365 | ondbgstream& operator<<(const void *) { return *this; } |
366 | /** | 366 | /** |
367 | * Does nothing. | 367 | * Does nothing. |
368 | * @return this stream | 368 | * @return this stream |
369 | */ | 369 | */ |
370 | ondbgstream& operator<<(void *) { return *this; } | 370 | ondbgstream& operator<<(void *) { return *this; } |
371 | /** | 371 | /** |
372 | * Does nothing. | 372 | * Does nothing. |
373 | * @return this stream | 373 | * @return this stream |
374 | */ | 374 | */ |
375 | ondbgstream& operator<<(double) { return *this; } | 375 | ondbgstream& operator<<(double) { return *this; } |
376 | /** | 376 | /** |
377 | * Does nothing. | 377 | * Does nothing. |
378 | * @return this stream | 378 | * @return this stream |
379 | */ | 379 | */ |
380 | ondbgstream& operator<<(long) { return *this; } | 380 | ondbgstream& operator<<(long) { return *this; } |
381 | /** | 381 | /** |
382 | * Does nothing. | 382 | * Does nothing. |
383 | * @return this stream | 383 | * @return this stream |
384 | */ | 384 | */ |
385 | ondbgstream& operator<<(unsigned long) { return *this; } | 385 | ondbgstream& operator<<(unsigned long) { return *this; } |
386 | /** | 386 | /** |
387 | * Does nothing. | 387 | * Does nothing. |
388 | * @return this stream | 388 | * @return this stream |
389 | */ | 389 | */ |
390 | ondbgstream& operator << (QWidget*) { return *this; } | 390 | ondbgstream& operator << (QWidget*) { return *this; } |
391 | /** | 391 | /** |
392 | * Does nothing. | 392 | * Does nothing. |
393 | * @return this stream | 393 | * @return this stream |
394 | */ | 394 | */ |
395 | ondbgstream &form(const char *, ...) { return *this; } | 395 | ondbgstream &form(const char *, ...) { return *this; } |
396 | 396 | ||
397 | ondbgstream& operator<<( const QDateTime& ) { return *this; } | 397 | ondbgstream& operator<<( const QDateTime& ) { return *this; } |
398 | ondbgstream& operator<<( const QDate& ) { return *this; } | 398 | ondbgstream& operator<<( const QDate& ) { return *this; } |
399 | ondbgstream& operator<<( const QTime& ) { return *this; } | 399 | ondbgstream& operator<<( const QTime& ) { return *this; } |
400 | ondbgstream& operator<<( const QPoint & ) { return *this; } | 400 | ondbgstream& operator<<( const QPoint & ) { return *this; } |
401 | ondbgstream& operator<<( const QSize & ) { return *this; } | 401 | ondbgstream& operator<<( const QSize & ) { return *this; } |
402 | ondbgstream& operator<<( const QRect & ) { return *this; } | 402 | ondbgstream& operator<<( const QRect & ) { return *this; } |
403 | ondbgstream& operator<<( const QRegion & ) { return *this; } | 403 | ondbgstream& operator<<( const QRegion & ) { return *this; } |
404 | ondbgstream& operator<<( const QStringList & ) { return *this; } | 404 | ondbgstream& operator<<( const QStringList & ) { return *this; } |
405 | ondbgstream& operator<<( const QColor & ) { return *this; } | 405 | ondbgstream& operator<<( const QColor & ) { return *this; } |
406 | ondbgstream& operator<<( const QBrush & ) { return *this; } | 406 | ondbgstream& operator<<( const QBrush & ) { return *this; } |
407 | 407 | ||
408 | private: | 408 | private: |
409 | class Private; | 409 | class Private; |
410 | Private *d; | 410 | Private *d; |
411 | }; | 411 | }; |
412 | 412 | ||
413 | /*====================================================================================== | 413 | /*====================================================================================== |
414 | * related functions | 414 | * related functions |
415 | *======================================================================================*/ | 415 | *======================================================================================*/ |
416 | 416 | ||
417 | /** | 417 | /** |
418 | * Does nothing. | 418 | * Does nothing. |
419 | * @param s stream | 419 | * @param s stream |
420 | * @return the given @p s | 420 | * @return the given @p s |
421 | */ | 421 | */ |
422 | inline ondbgstream& endl( ondbgstream & s) { return s; } | 422 | inline ondbgstream& endl( ondbgstream & s) { return s; } |
423 | /** | 423 | /** |
424 | * Does nothing. | 424 | * Does nothing. |
425 | * @param s stream | 425 | * @param s stream |
426 | * @return the given @p s | 426 | * @return the given @p s |
427 | */ | 427 | */ |
428 | inline ondbgstream& flush( ondbgstream & s) { return s; } | 428 | inline ondbgstream& flush( ondbgstream & s) { return s; } |
429 | inline ondbgstream& perror( ondbgstream & s) { return s; } | 429 | inline ondbgstream& perror( ondbgstream & s) { return s; } |
430 | 430 | ||
431 | /** | 431 | /** |
432 | * Returns a debug stream. You can use it to print debug | 432 | * Returns a debug stream. You can use it to print debug |
433 | * information. | 433 | * information. |
434 | * @param area an id to identify the output, 0 for default | 434 | * @param area an id to identify the output, 0 for default |
435 | */ | 435 | */ |
436 | odbgstream odDebug(int area = 0); | 436 | odbgstream odDebug(int area = 0); |
437 | odbgstream odDebug(bool cond, int area = 0); | 437 | odbgstream odDebug(bool cond, int area = 0); |
438 | /** | 438 | /** |
439 | * Returns a backtrace. | 439 | * Returns a backtrace. |
440 | * @param levels the number of levels (-1 for unlimited) of the backtrace | 440 | * @param levels the number of levels (-1 for unlimited) of the backtrace |
441 | * @return a backtrace | 441 | * @return a backtrace |
442 | */ | 442 | */ |
443 | QString odBacktrace(int levels = -1); | 443 | QString odBacktrace(int levels = -1); |
444 | /** | 444 | /** |
445 | * Returns a dummy debug stream. The stream does not print anything. | 445 | * Returns a dummy debug stream. The stream does not print anything. |
446 | * @param area an id to identify the output, 0 for default | 446 | * @param area an id to identify the output, 0 for default |
447 | * @see odDebug() | 447 | * @see odDebug() |
448 | */ | 448 | */ |
449 | inline ondbgstream ondDebug(int area = 0) { return ondbgstream(); } | 449 | inline ondbgstream ondDebug(int = 0) { return ondbgstream(); } |
450 | inline ondbgstream ondDebug(bool , int = 0) { return ondbgstream(); } | 450 | inline ondbgstream ondDebug(bool , int = 0) { return ondbgstream(); } |
451 | inline QString ondBacktrace() { return QString::null; } | 451 | inline QString ondBacktrace() { return QString::null; } |
452 | inline QString ondBacktrace(int) { return QString::null; } | 452 | inline QString ondBacktrace(int) { return QString::null; } |
453 | 453 | ||
454 | /** | 454 | /** |
455 | * Returns a warning stream. You can use it to print warning | 455 | * Returns a warning stream. You can use it to print warning |
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 | */ |
459 | odbgstream odWarning(int area = 0); | 459 | odbgstream odWarning(int area = 0); |
460 | odbgstream odWarning(bool cond, int area = 0); | 460 | odbgstream odWarning(bool cond, int area = 0); |
461 | /** | 461 | /** |
462 | * Returns an error stream. You can use it to print error | 462 | * Returns an error stream. You can use it to print 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 | */ |
466 | odbgstream odError(int area = 0); | 466 | odbgstream odError(int area = 0); |
467 | odbgstream odError(bool cond, int area = 0); | 467 | odbgstream odError(bool cond, int area = 0); |
468 | /** | 468 | /** |
469 | * Returns a fatal error stream. You can use it to print fatal error | 469 | * Returns a fatal error stream. You can use it to print fatal error |
470 | * information. | 470 | * information. |
471 | * @param area an id to identify the output, 0 for default | 471 | * @param area an id to identify the output, 0 for default |
472 | */ | 472 | */ |
473 | odbgstream odFatal(int area = 0); | 473 | odbgstream odFatal(int area = 0); |
474 | odbgstream odFatal(bool cond, int area = 0); | 474 | odbgstream odFatal(bool cond, int area = 0); |
475 | 475 | ||
476 | /** | 476 | /** |
477 | * Deletes the odebugrc cache and therefore forces KDebug to reread the | 477 | * Deletes the odebugrc cache and therefore forces KDebug to reread the |
478 | * config file | 478 | * config file |
479 | */ | 479 | */ |
480 | void odClearDebugConfig(); | 480 | void odClearDebugConfig(); |
481 | 481 | ||
482 | #ifdef OPIE_NO_DEBUG | 482 | #ifdef OPIE_NO_DEBUG |
483 | #define odDebug ondDebug | 483 | #define odDebug ondDebug |
484 | #define odBacktrace ondBacktrace | 484 | #define odBacktrace ondBacktrace |
485 | #endif | 485 | #endif |
486 | 486 | ||
487 | } | 487 | } |
488 | } | 488 | } |
489 | 489 | ||
490 | #endif | 490 | #endif |
491 | 491 | ||