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;
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
*/
#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);