aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase-git/0006-Revert-eglfs-Print-the-chosen-config-in-debug-mode.patch
blob: 132480248db4ea27be6e8a59f8671a3572411af6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
From 285b31f709a81b7e51b5c3d96061fa731cdfdf7d Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Mon, 21 Apr 2014 19:22:04 +0200
Subject: [PATCH 06/11] Revert "eglfs: Print the chosen config in debug mode"

With this change the build is failing with:
| In file included from /OE/build/oe-core/tmp-glibc/sysroots/qemux86-64/usr/include/EGL/eglplatform.h:118:0,
|                  from /OE/build/oe-core/tmp-glibc/sysroots/qemux86-64/usr/include/EGL/egl.h:36,
|                  from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.3.0+5.4.0-alpha1+gitAUTOINC+8456adf0ee-r0/git/src/platformsupport/eglconvenience/qeglplatformcontext_p.h:51,
|                  from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.3.0+5.4.0-alpha1+gitAUTOINC+8456adf0ee-r0/git/src/platformsupport/eglconvenience/qeglplatformcontext.cpp:34:
| ../../include/QtCore/../../../git/src/corelib/io/qtextstream.h:72:10: error: expected identifier before 'int'
|      enum Status {
|           ^
| In file included from ../../include/QtCore/qtextstream.h:1:0,
|                  from ../../include/QtCore/../../../git/src/corelib/io/qdebug.h:42,
|                  from ../../include/QtCore/qdebug.h:1,
|                  from ../../include/QtCore/QDebug:1,
|                  from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.3.0+5.4.0-alpha1+gitAUTOINC+8456adf0ee-r0/git/src/platformsupport/eglconvenience/qeglplatformcontext.cpp:40:
| ../../include/QtCore/../../../git/src/corelib/io/qtextstream.h:72:17: error: expected unqualified-id before '{' token
|      enum Status {
|                  ^
| Makefile:3896: recipe for target '.obj/qeglplatformcontext.o' failed
| make[2]: *** [.obj/qeglplatformcontext.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.3.0+5.4.0-alpha1+gitAUTOINC+8456adf0ee-r0/git/src/platformsupport/eglconvenience/qeglplatformintegration.cpp:196:5: error: 'Display' redeclared as different kind of symbol
|      Display
|      ^
| In file included from /OE/build/oe-core/tmp-glibc/sysroots/qemux86-64/usr/include/EGL/eglplatform.h:118:0,
|                  from /OE/build/oe-core/tmp-glibc/sysroots/qemux86-64/usr/include/EGL/egl.h:36,
|                  from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.3.0+5.4.0-alpha1+gitAUTOINC+8456adf0ee-r0/git/src/platformsupport/eglconvenience/qeglplatformintegration_p.h:51,
|                  from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.3.0+5.4.0-alpha1+gitAUTOINC+8456adf0ee-r0/git/src/platformsupport/eglconvenience/qeglplatformintegration.cpp:55:
| /OE/build/oe-core/tmp-glibc/sysroots/qemux86-64/usr/include/X11/Xlib.h:499:26: note: previous declaration 'typedef struct _XDisplay Display'
|  typedef struct _XDisplay Display;
|                           ^
| /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.3.0+5.4.0-alpha1+gitAUTOINC+8456adf0ee-r0/git/src/platformsupport/eglconvenience/qeglplatformintegration.cpp: In member function 'virtual void* QEGLPlatformIntegration::nativeResourceForScreen(const QByteArray&, QScreen*)':
| /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.3.0+5.4.0-alpha1+gitAUTOINC+8456adf0ee-r0/git/src/platformsupport/eglconvenience/qeglplatformintegration.cpp:239:17: error: expected primary-expression before ':' token
|      case Display:
|                  ^
| Makefile:5486: recipe for target '.obj/qeglplatformintegration.o' failed

This reverts commit dc685cf6331f5fb46285cf10d6464c2ecf41f73e.

Change-Id: I7a6a926b7525d4f137824c71f2ec8cd089c21f13
---
 src/platformsupport/eglconvenience/qeglconvenience.cpp         | 4 +++-
 src/platformsupport/eglconvenience/qeglplatformcontext.cpp     | 7 -------
 src/platformsupport/eglconvenience/qeglplatformintegration.cpp | 4 ++--
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp
index b7ce6df..e8c1925 100644
--- a/src/platformsupport/eglconvenience/qeglconvenience.cpp
+++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp
@@ -443,9 +443,11 @@ void q_printEglConfig(EGLDisplay display, EGLConfig config)
     for (index = 0; attrs[index].attr != -1; ++index) {
         EGLint value;
         if (eglGetConfigAttrib(display, config, attrs[index].attr, &value)) {
-            qDebug("\t%s: %d", attrs[index].name, (int)value);
+            qWarning("\t%s: %d\n", attrs[index].name, (int)value);
         }
     }
+
+    qWarning("\n");
 }
 
 #ifdef Q_OS_LINUX
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 7cc3300..ccbd974 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -37,7 +37,6 @@
 #include <qpa/qplatformwindow.h>
 #include <QOpenGLContext>
 #include <QtPlatformHeaders/QEGLNativeContext>
-#include <QDebug>
 
 QT_BEGIN_NAMESPACE
 
@@ -181,12 +180,6 @@ void QEGLPlatformContext::init(const QSurfaceFormat &format, QPlatformOpenGLCont
         return;
     }
 
-    static const bool printConfig = qgetenv("QT_QPA_EGLFS_DEBUG").toInt();
-    if (printConfig) {
-        qDebug() << "Created context for format" << format << "with config:";
-        q_printEglConfig(m_eglDisplay, m_eglConfig);
-    }
-
     updateFormatFromGL();
 }
 
diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
index b8205dc..6005684 100644
--- a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
@@ -193,7 +193,7 @@ enum ResourceType {
     EglContext,
     EglConfig,
     NativeDisplay,
-    Display
+    XDisplay
 };
 
 static int resourceType(const QByteArray &key)
@@ -236,7 +236,7 @@ void *QEGLPlatformIntegration::nativeResourceForScreen(const QByteArray &resourc
     void *result = 0;
 
     switch (resourceType(resource)) {
-    case Display:
+    case XDisplay:
         // Play nice when using the x11 hooks: Be compatible with xcb that allows querying
         // the X Display pointer, which is nothing but our native display.
         result = reinterpret_cast<void*>(nativeDisplay());
-- 
2.1.1