This commit is contained in:
arcan1s 2015-06-18 00:54:41 +03:00
parent 1a4e071b5b
commit cb0a332856
3 changed files with 29 additions and 12 deletions

View File

@ -16,9 +16,7 @@
***************************************************************************/
#include <pdebug.h>
#if QT_VERSION >= 0x050000
#include <pdebug-time.h>
void debugString(QtMsgType type, const QMessageLogContext &context, const QString &msg)
@ -31,5 +29,3 @@ void debugString(QtMsgType type, const QMessageLogContext &context, const QStrin
fprintf(stderr, "[%s]%s\n", timeNow.constData(), localMsg.constData());
}
#endif

28
pdebug-time.h Normal file
View File

@ -0,0 +1,28 @@
/***************************************************************************
* Copyright (C) 2014 Evgeniy Alekseev *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 3.0 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library. *
***************************************************************************/
#ifndef PRETTY_DEBUG_TIME_H
#define PRETTY_DEBUG_TIME_H
#include <QDateTime>
void debugString(QtMsgType type, const QMessageLogContext &context, const QString &msg);
#endif /* PRETTY_DEBUG_TIME_H */

View File

@ -43,11 +43,4 @@ inline std::string pFuncInfo(const std::string prettyFunction)
#define PDEBUG pDebug(pFuncInfo(__PRETTY_FUNCTION__))
#if QT_VERSION >= 0x050000
#include <QDateTime>
void debugString(QtMsgType type, const QMessageLogContext &context, const QString &msg);
#endif /* QT_VERSION >= 0x050000 */
#endif /* PRETTY_DEBUG_H */