From cb0a332856bf3065dd662abdd1fe3d9fdbc0e55f Mon Sep 17 00:00:00 2001 From: arcan1s Date: Thu, 18 Jun 2015 00:54:41 +0300 Subject: [PATCH] fix --- pdebug.cpp => pdebug-time.cpp | 6 +----- pdebug-time.h | 28 ++++++++++++++++++++++++++++ pdebug.h | 7 ------- 3 files changed, 29 insertions(+), 12 deletions(-) rename pdebug.cpp => pdebug-time.cpp (96%) create mode 100644 pdebug-time.h diff --git a/pdebug.cpp b/pdebug-time.cpp similarity index 96% rename from pdebug.cpp rename to pdebug-time.cpp index f83ebc6..189b9f4 100644 --- a/pdebug.cpp +++ b/pdebug-time.cpp @@ -16,9 +16,7 @@ ***************************************************************************/ -#include - -#if QT_VERSION >= 0x050000 +#include 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 diff --git a/pdebug-time.h b/pdebug-time.h new file mode 100644 index 0000000..626fe75 --- /dev/null +++ b/pdebug-time.h @@ -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 + + +void debugString(QtMsgType type, const QMessageLogContext &context, const QString &msg); + + +#endif /* PRETTY_DEBUG_TIME_H */ diff --git a/pdebug.h b/pdebug.h index 030cacb..a328ed5 100644 --- a/pdebug.h +++ b/pdebug.h @@ -43,11 +43,4 @@ inline std::string pFuncInfo(const std::string prettyFunction) #define PDEBUG pDebug(pFuncInfo(__PRETTY_FUNCTION__)) - -#if QT_VERSION >= 0x050000 -#include -void debugString(QtMsgType type, const QMessageLogContext &context, const QString &msg); -#endif /* QT_VERSION >= 0x050000 */ - - #endif /* PRETTY_DEBUG_H */