annotate src/debug.h @ 727:bd9a54f9aca8

Fix typo
author Chris Cannam
date Mon, 17 Dec 2018 09:35:14 +0000
parents af295de6a59b
children
rev   line source
Chris@57 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@57 2
Chris@57 3 /*
Chris@57 4 EasyMercurial
Chris@57 5
Chris@57 6 Based on HgExplorer by Jari Korhonen
Chris@57 7 Copyright (c) 2010 Jari Korhonen
Chris@644 8 Copyright (c) 2013 Chris Cannam
Chris@644 9 Copyright (c) 2013 Queen Mary, University of London
Chris@57 10
Chris@57 11 This program is free software; you can redistribute it and/or
Chris@57 12 modify it under the terms of the GNU General Public License as
Chris@57 13 published by the Free Software Foundation; either version 2 of the
Chris@57 14 License, or (at your option) any later version. See the file
Chris@57 15 COPYING included with this distribution for more information.
Chris@57 16 */
Chris@57 17
Chris@689 18 #ifndef EASYHG_DEBUG_H
Chris@689 19 #define EASYHG_DEBUG_H
Chris@57 20
Chris@57 21 #include <QDebug>
Chris@57 22 #include <QTextStream>
Chris@57 23 #include <string>
Chris@57 24 #include <iostream>
Chris@57 25
Chris@57 26 class QString;
Chris@57 27 class QUrl;
Chris@57 28
Chris@57 29 QDebug &operator<<(QDebug &, const std::string &);
Chris@57 30 std::ostream &operator<<(std::ostream &, const QString &);
Chris@57 31 std::ostream &operator<<(std::ostream &, const QUrl &);
Chris@57 32
Chris@57 33 extern QDebug &getEasyHgDebug();
Chris@57 34
Chris@57 35 #define DEBUG getEasyHgDebug()
Chris@57 36
Chris@57 37 template <typename T>
Chris@57 38 inline QDebug &operator<<(QDebug &d, const T &t) {
Chris@57 39 QString s;
Chris@57 40 QTextStream ts(&s);
Chris@57 41 ts << t;
Chris@57 42 d << s;
Chris@57 43 return d;
Chris@57 44 }
Chris@57 45
Chris@57 46 #endif /* !_DEBUG_H_ */
Chris@57 47