From 23688d8942895507f4bc1517dd3c161134f4f9d0 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 10 Feb 2012 15:54:50 +0100 Subject: Reshuffle code between qglobal, qlogging Make the content of the .h, .cpp files match. Change-Id: Ib2506aeff74281ec4bcbf04d21da451038391203 Reviewed-by: David Faure --- src/corelib/global/qlogging.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/corelib/global/qlogging.h') diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h index 5ac6cc090e..4de04bdc33 100644 --- a/src/corelib/global/qlogging.h +++ b/src/corelib/global/qlogging.h @@ -67,7 +67,8 @@ class QMessageLogContext Q_DISABLE_COPY(QMessageLogContext) public: QMessageLogContext() : version(1), line(0), file(0), function(0) {} - Q_DECL_CONSTEXPR QMessageLogContext(const char *fileName, int lineNumber, const char *functionName) + Q_DECL_CONSTEXPR QMessageLogContext(const char *fileName, int lineNumber, + const char *functionName) : version(1), line(lineNumber), file(fileName), function(functionName) {} int version; @@ -126,8 +127,6 @@ private: QMessageLogContext context; }; -Q_CORE_EXPORT void qt_message_output(QtMsgType, const QMessageLogContext &context, const char *buf); - /* qDebug, qWarning, qCritical, qFatal are redefined to automatically include context information */ @@ -139,15 +138,20 @@ Q_CORE_EXPORT void qt_message_output(QtMsgType, const QMessageLogContext &contex #define QT_NO_QDEBUG_MACRO while (false) QMessageLogger().noDebug #define QT_NO_QWARNING_MACRO while (false) QMessageLogger().noDebug -#ifdef QT_NO_DEBUG_OUTPUT +#if defined(QT_NO_DEBUG_OUTPUT) # undef qDebug # define qDebug QT_NO_QDEBUG_MACRO #endif -#ifdef QT_NO_WARNING_OUTPUT +#if defined(QT_NO_WARNING_OUTPUT) # undef qWarning # define qWarning QT_NO_QWARNING_MACRO #endif +Q_CORE_EXPORT void qt_message_output(QtMsgType, const QMessageLogContext &context, const char *buf); + +Q_CORE_EXPORT void qErrnoWarning(int code, const char *msg, ...); +Q_CORE_EXPORT void qErrnoWarning(const char *msg, ...); + // deprecated. Use qInstallMessageHandler instead! typedef void (*QtMsgHandler)(QtMsgType, const char *); Q_CORE_EXPORT QtMsgHandler qInstallMsgHandler(QtMsgHandler); -- cgit v1.2.3