summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qlogging.h')
-rw-r--r--src/corelib/global/qlogging.h14
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);