nixpkgs/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0002-qtbase-mac.patch
Milan Pässler d4c607aa71 qt5: 5.12.7 -> 5.14.2
This includes contributions by @ttuegel and @DizFer. Thanks!
2020-07-31 18:50:58 +02:00

117 lines
3.9 KiB
Diff

From ccaa916eab33093704293bc911eedd85fbe5f160 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
Date: Fri, 3 Apr 2020 21:15:27 +0200
Subject: [PATCH 02/10] qtbase-mac
---
src/corelib/kernel/qcore_mac_p.h | 16 ++++++++++++++--
src/testlib/qappletestlogger.cpp | 2 +-
src/testlib/qappletestlogger_p.h | 2 +-
src/testlib/qtestcase.cpp | 2 +-
src/testlib/qtestlog.cpp | 2 +-
src/testlib/qtestlog_p.h | 2 +-
6 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index 535d3579b2..3d70bf39c1 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -225,7 +225,7 @@ private:
// --------------------------------------------------------------------------
-#if !defined(QT_BOOTSTRAPPED)
+#if 0
QT_END_NAMESPACE
#include <os/activity.h>
@@ -303,7 +303,19 @@ QT_MAC_WEAK_IMPORT(_os_activity_current);
#define QT_APPLE_SCOPED_LOG_ACTIVITY(...) QAppleLogActivity scopedLogActivity = QT_APPLE_LOG_ACTIVITY(__VA_ARGS__).enter();
-#endif // !defined(QT_BOOTSTRAPPED)
+#else // !defined(QT_BOOTSTRAPPED)
+
+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT3(...)
+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT2(...)
+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT(...)
+
+#define QT_APPLE_LOG_ACTIVITY2(...)
+#define QT_APPLE_LOG_ACTIVITY1(...)
+#define QT_APPLE_LOG_ACTIVITY(...)
+
+#define QT_APPLE_SCOPED_LOG_ACTIVITY(...)
+
+#endif
// -------------------------------------------------------------------------
diff --git a/src/testlib/qappletestlogger.cpp b/src/testlib/qappletestlogger.cpp
index dfeadebdef..2a74330c1d 100644
--- a/src/testlib/qappletestlogger.cpp
+++ b/src/testlib/qappletestlogger.cpp
@@ -43,7 +43,7 @@
QT_BEGIN_NAMESPACE
-#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0
using namespace QTestPrivate;
diff --git a/src/testlib/qappletestlogger_p.h b/src/testlib/qappletestlogger_p.h
index 62c6d95c5a..f8e0a3b767 100644
--- a/src/testlib/qappletestlogger_p.h
+++ b/src/testlib/qappletestlogger_p.h
@@ -57,7 +57,7 @@
QT_BEGIN_NAMESPACE
-#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0
class QAppleTestLogger : public QAbstractTestLogger
{
public:
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 70733a692a..8bcda17858 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -852,7 +852,7 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool
bool addFallbackLogger = !explicitLoggerRequested;
-#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0
// Any explicitly requested loggers will be added by now, so we can check if they use stdout
const bool safeToAddAppleLogger = !AppleUnifiedLogger::willMirrorToStderr() || !QTestLog::loggerUsingStdout();
if (safeToAddAppleLogger && QAppleTestLogger::debugLoggingEnabled()) {
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index f3ebf343c5..9b4f526b2e 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -465,7 +465,7 @@ void QTestLog::addLogger(LogMode mode, const char *filename)
case QTestLog::TAP:
logger = new QTapTestLogger(filename);
break;
-#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0
case QTestLog::Apple:
logger = new QAppleTestLogger;
break;
diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h
index fff36f290d..f737ccf064 100644
--- a/src/testlib/qtestlog_p.h
+++ b/src/testlib/qtestlog_p.h
@@ -72,7 +72,7 @@ public:
enum LogMode {
Plain = 0, XML, LightXML, XunitXML, CSV, TeamCity, TAP
-#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0
, Apple
#endif
#if defined(HAVE_XCTEST)
--
2.25.1