Scribus
Open source desktop publishing at your fingertips
scdebug.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8  copyright : (C) 2010 by Marcus Holland-Moritz
9  email : scribus@mhxnet.de
10 ***************************************************************************/
11 
12 /***************************************************************************
13 * *
14 * This program is free software; you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation; either version 2 of the License, or *
17 * (at your option) any later version. *
18 * *
19 ***************************************************************************/
20 
33 #if defined(QT_NO_DEBUG_OUTPUT) || (defined(SC_DEBUG_FILE) && SC_DEBUG_FILE == 0)
34 
35 class ScNoDebug
36 {
37 public:
38  inline ScNoDebug() {}
39  inline ~ScNoDebug() {}
40 };
41 template<typename T>
42 inline ScNoDebug operator<<(ScNoDebug debug, const T &) { return debug; }
43 inline ScNoDebug scDebug() { return ScNoDebug(); }
44 
45 #else
46 
47 #include <QDebug>
48 #include <QTime>
49 inline QDebug scDebug() { return QDebug(QtDebugMsg) << QTime::currentTime().toString("[hh:mm:ss.zzz]"); }
50 
51 #endif
std::ostream & operator<<(std::ostream &out_file, const Geom::Matrix &m)
Definition: matrix.h:109