summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-16 01:01:29 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-16 01:01:30 +0100
commit11b9c813e6705b0349e4c241f9132a6649977431 (patch)
tree69df65cb06c9617ab305a55be413a6be63677913 /src/corelib/io
parent8cc8eb8f24b9d297a25c9841326c6fa8561cf80e (diff)
parent4554fa7b191566df0a6c07e686c642c78eb88095 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qloggingcategory.h49
-rw-r--r--src/corelib/io/qprocess.h20
2 files changed, 44 insertions, 25 deletions
diff --git a/src/corelib/io/qloggingcategory.h b/src/corelib/io/qloggingcategory.h
index 489e250087..91e3144300 100644
--- a/src/corelib/io/qloggingcategory.h
+++ b/src/corelib/io/qloggingcategory.h
@@ -120,15 +120,30 @@ private:
return category; \
}
-#define qCDebug(category, ...) \
+#if !defined(QT_NO_DEBUG_OUTPUT)
+# define qCDebug(category, ...) \
for (bool qt_category_enabled = category().isDebugEnabled(); qt_category_enabled; qt_category_enabled = false) \
QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC, category().categoryName()).debug(__VA_ARGS__)
-#define qCInfo(category, ...) \
+#else
+# define qCDebug(category, ...) QT_NO_QDEBUG_MACRO()
+#endif
+
+#if !defined(QT_NO_INFO_OUTPUT)
+# define qCInfo(category, ...) \
for (bool qt_category_enabled = category().isInfoEnabled(); qt_category_enabled; qt_category_enabled = false) \
QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC, category().categoryName()).info(__VA_ARGS__)
-#define qCWarning(category, ...) \
+#else
+# define qCInfo(category, ...) QT_NO_QDEBUG_MACRO()
+#endif
+
+#if !defined(QT_NO_WARNING_OUTPUT)
+# define qCWarning(category, ...) \
for (bool qt_category_enabled = category().isWarningEnabled(); qt_category_enabled; qt_category_enabled = false) \
QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC, category().categoryName()).warning(__VA_ARGS__)
+#else
+# define qCWarning(category, ...) QT_NO_QDEBUG_MACRO()
+#endif
+
#define qCCritical(category, ...) \
for (bool qt_category_enabled = category().isCriticalEnabled(); qt_category_enabled; qt_category_enabled = false) \
QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC, category().categoryName()).critical(__VA_ARGS__)
@@ -144,26 +159,28 @@ private:
}
// check for enabled category inside QMessageLogger.
-#define qCDebug qDebug
-#define qCInfo qInfo
-#define qCWarning qWarning
-#define qCCritical qCritical
-
-#endif // Q_COMPILER_VARIADIC_MACROS || defined(Q_MOC_RUN)
-
-#if defined(QT_NO_DEBUG_OUTPUT)
-# undef qCDebug
+#if !defined(QT_NO_DEBUG_OUTPUT)
+# define qCDebug qDebug
+#else
# define qCDebug(category) QT_NO_QDEBUG_MACRO()
#endif
-#if defined(QT_NO_INFO_OUTPUT)
-# undef qCInfo
+
+#if !defined(QT_NO_INFO_OUTPUT)
+# define qCInfo qInfo
+#else
# define qCInfo(category) QT_NO_QDEBUG_MACRO()
#endif
-#if defined(QT_NO_WARNING_OUTPUT)
-# undef qCWarning
+
+#if !defined(QT_NO_WARNING_OUTPUT)
+# define qCWarning qWarning
+#else
# define qCWarning(category) QT_NO_QDEBUG_MACRO()
#endif
+#define qCCritical qCritical
+
+#endif // Q_COMPILER_VARIADIC_MACROS || defined(Q_MOC_RUN)
+
QT_END_NAMESPACE
#endif // QLOGGINGCATEGORY_H
diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h
index 42cf769698..a2e3c01f7c 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -48,22 +48,24 @@
QT_REQUIRE_CONFIG(processenvironment);
-QT_BEGIN_NAMESPACE
-
-class QProcessPrivate;
-
-#if !defined(Q_OS_WIN)
-typedef qint64 Q_PID;
-#else
-QT_END_NAMESPACE
+#ifdef Q_OS_WIN
typedef struct _PROCESS_INFORMATION *Q_PID;
+#endif
+
+#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
typedef struct _SECURITY_ATTRIBUTES Q_SECURITY_ATTRIBUTES;
typedef struct _STARTUPINFOW Q_STARTUPINFO;
-QT_BEGIN_NAMESPACE
#endif
+QT_BEGIN_NAMESPACE
+
+class QProcessPrivate;
class QProcessEnvironmentPrivate;
+#ifndef Q_OS_WIN
+typedef qint64 Q_PID;
+#endif
+
class Q_CORE_EXPORT QProcessEnvironment
{
public: