1 /* 2 Copyright (c) 2010 Kevin Funk <krf@electrostorm.net> 3 Copyright (c) 2011 Casian Andrei <skeletk13@gmail.com> 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef DEBUGPRIVATE_H 20 #define DEBUGPRIVATE_H 21 22 #include "debug.h" 23 24 #include <QtCore/QString> 25 26 class IndentPrivate 27 : public QObject 28 { 29 private: 30 explicit IndentPrivate(QObject* parent = 0); 31 32 public: 33 static IndentPrivate* instance(); 34 35 QString m_string; 36 }; 37 38 /* 39 * From kdelibs/kdecore/io 40 */ 41 class NoDebugStream: public QIODevice 42 { 43 // Q_OBJECT 44 public: NoDebugStream()45 NoDebugStream() { open(WriteOnly); } isSequential()46 bool isSequential() const { return true; } readData(char *,qint64)47 qint64 readData(char *, qint64) { return 0; /* eof */ } readLineData(char *,qint64)48 qint64 readLineData(char *, qint64) { return 0; /* eof */ } writeData(const char *,qint64 len)49 qint64 writeData(const char *, qint64 len) { return len; } 50 } devnull; 51 nullDebug()52QDebug nullDebug() 53 { 54 return QDebug(&devnull); 55 } 56 57 #endif // DEBUGPRIVATE_H 58