diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2012-02-10 15:54:50 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-13 12:02:11 +0100 |
commit | 23688d8942895507f4bc1517dd3c161134f4f9d0 (patch) | |
tree | 72832472d5a4cda9782d730429e4c45541d0c4c8 /src/corelib/global/qlogging.h | |
parent | d4441b014803e782abcd9ab598df5035f0ff58ed (diff) |
Reshuffle code between qglobal, qlogging
Make the content of the .h, .cpp files match.
Change-Id: Ib2506aeff74281ec4bcbf04d21da451038391203
Reviewed-by: David Faure <faure@kde.org>
Diffstat (limited to 'src/corelib/global/qlogging.h')
-rw-r--r-- | src/corelib/global/qlogging.h | 14 |
1 files changed, 9 insertions, 5 deletions
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); |