r14540 by jghali - #8730: Add caching for low resolution images (forgotten file)

scribus-commit scribus-commit at lists.scribus.net
Tue Jan 19 22:35:15 CET 2010


Revision: 14540
Author: jghali
Date: 2010-01-19T21:32:01.288349Z
Commit message: #8730: Add caching for low resolution images (forgotten file)

Changeset: 
A  /trunk/Scribus/scribus/scdebug.h

Diffs:
Index: scribus/scdebug.h
===================================================================
--- scribus/scdebug.h	(revision 0)
+++ scribus/scdebug.h	(revision 14540)
@@ -0,0 +1,51 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+/***************************************************************************
+	copyright            : (C) 2010 by Marcus Holland-Moritz
+	email                : scribus at mhxnet.de
+***************************************************************************/
+
+/***************************************************************************
+*                                                                         *
+*   This program is free software; you can redistribute it and/or modify  *
+*   it under the terms of the GNU General Public License as published by  *
+*   the Free Software Foundation; either version 2 of the License, or     *
+*   (at your option) any later version.                                   *
+*                                                                         *
+***************************************************************************/
+
+/**
+  * @brief A per-file debug stream based on qDebug()
+  *
+  * Define SC_DEBUG_FILE to zero (debugging disabled) or non-zero
+  * (debugging enabled) before including this file. Not defining it
+  * means enabling debug support unless QT_NO_DEBUG_OUTPUT is defined.
+  * Debugging will be disabled at compile time, so there's no need to
+  * comment all lines that generate debug output.
+  *
+  * @author Marcus Holland-Moritz
+  */
+
+#if defined(QT_NO_DEBUG_OUTPUT) || (defined(SC_DEBUG_FILE) && SC_DEBUG_FILE == 0)
+
+class ScNoDebug
+{
+public:
+	inline ScNoDebug() {}
+	inline ~ScNoDebug() {}
+};
+template<typename T>
+inline ScNoDebug operator<<(ScNoDebug debug, const T &) { return debug; }
+inline ScNoDebug scDebug() { return ScNoDebug(); }
+
+#else
+
+#include <QDebug>
+#include <QTime>
+inline QDebug scDebug() { return QDebug(QtDebugMsg) << QTime::currentTime().toString("[hh:mm:ss.zzz]"); }
+
+#endif




More information about the scribus-commit mailing list