summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience.cpp2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp8
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformwindow.cpp2
-rw-r--r--src/platformsupport/eglconvenience/qxlibeglintegration.cpp34
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks_x11.cpp2
5 files changed, 22 insertions, 26 deletions
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp
index d7b5527a9f..b7f4c55d3d 100644
--- a/src/platformsupport/eglconvenience/qeglconvenience.cpp
+++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp
@@ -303,7 +303,7 @@ EGLConfig QEglConfigChooser::chooseConfig()
} while (q_reduceConfigAttributes(&configureAttributes));
if (!cfg)
- qWarning("Cant find EGLConfig, returning null config");
+ qWarning("Cannot find EGLConfig, returning null config");
return cfg;
}
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 07ef202195..d7c4fd6764 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -177,7 +177,7 @@ void QEGLPlatformContext::init(const QSurfaceFormat &format, QPlatformOpenGLCont
}
if (m_eglContext == EGL_NO_CONTEXT) {
- qWarning("QEGLPlatformContext::init: eglError: %x, this: %p \n", eglGetError(), this);
+ qWarning("QEGLPlatformContext: Failed to create context: %x", eglGetError());
return;
}
@@ -357,7 +357,7 @@ bool QEGLPlatformContext::makeCurrent(QPlatformSurface *surface)
eglSwapInterval(eglDisplay(), m_swapInterval);
}
} else {
- qWarning("QEGLPlatformContext::makeCurrent: eglError: %x, this: %p \n", eglGetError(), this);
+ qWarning("QEGLPlatformContext: eglMakeCurrent failed: %x", eglGetError());
}
return ok;
@@ -376,7 +376,7 @@ void QEGLPlatformContext::doneCurrent()
eglBindAPI(m_api);
bool ok = eglMakeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (!ok)
- qWarning("QEGLPlatformContext::doneCurrent(): eglError: %d, this: %p \n", eglGetError(), this);
+ qWarning("QEGLPlatformContext: eglMakeCurrent failed: %x", eglGetError());
}
void QEGLPlatformContext::swapBuffers(QPlatformSurface *surface)
@@ -385,7 +385,7 @@ void QEGLPlatformContext::swapBuffers(QPlatformSurface *surface)
EGLSurface eglSurface = eglSurfaceForPlatformSurface(surface);
bool ok = eglSwapBuffers(m_eglDisplay, eglSurface);
if (!ok)
- qWarning("QEGLPlatformContext::swapBuffers(): eglError: %d, this: %p \n", eglGetError(), this);
+ qWarning("QEGLPlatformContext: eglSwapBuffers failed: %x", eglGetError());
}
void (*QEGLPlatformContext::getProcAddress(const QByteArray &procName)) ()
diff --git a/src/platformsupport/eglconvenience/qeglplatformwindow.cpp b/src/platformsupport/eglconvenience/qeglplatformwindow.cpp
index 39edec4811..af4c907e85 100644
--- a/src/platformsupport/eglconvenience/qeglplatformwindow.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformwindow.cpp
@@ -122,7 +122,7 @@ WId QEGLPlatformWindow::winId() const
void QEGLPlatformWindow::setOpacity(qreal)
{
if (!isRaster())
- qWarning("eglfs: Cannot set opacity for non-raster windows");
+ qWarning("QEGLPlatformWindow: Cannot set opacity for non-raster windows");
// Nothing to do here. The opacity is stored in the QWindow.
}
diff --git a/src/platformsupport/eglconvenience/qxlibeglintegration.cpp b/src/platformsupport/eglconvenience/qxlibeglintegration.cpp
index ff7e6ce271..439189d1b4 100644
--- a/src/platformsupport/eglconvenience/qxlibeglintegration.cpp
+++ b/src/platformsupport/eglconvenience/qxlibeglintegration.cpp
@@ -31,8 +31,11 @@
**
****************************************************************************/
+#include <QLoggingCategory>
#include "qxlibeglintegration_p.h"
+Q_LOGGING_CATEGORY(lcXlibEglDebug, "qt.egl.xlib.debug")
+
VisualID QXlibEglIntegration::getCompatibleVisualId(Display *display, EGLDisplay eglDisplay, EGLConfig config)
{
VisualID visualId = 0;
@@ -87,31 +90,26 @@ VisualID QXlibEglIntegration::getCompatibleVisualId(Display *display, EGLDisplay
// configs. In such a case we have to fall back to XGetVisualInfo.
if (!visualMatchesConfig) {
visualId = 0;
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
- qWarning("Warning: EGL suggested using X Visual ID %d (%d %d %d depth %d) for EGL config %d (%d %d %d %d), but this is incompatible",
- (int)visualId, visualRedSize, visualGreenSize, visualBlueSize, chosenVisualInfo->depth,
- configId, configRedSize, configGreenSize, configBlueSize, configAlphaSize);
-#endif
+ qCWarning(lcXlibEglDebug,
+ "EGL suggested using X Visual ID %d (%d %d %d depth %d) for EGL config %d"
+ "(%d %d %d %d), but this is incompatible",
+ (int)visualId, visualRedSize, visualGreenSize, visualBlueSize, chosenVisualInfo->depth,
+ configId, configRedSize, configGreenSize, configBlueSize, configAlphaSize);
}
} else {
- qWarning("Warning: EGL suggested using X Visual ID %d for EGL config %d, but that isn't a valid ID",
- (int)visualId, configId);
+ qCWarning(lcXlibEglDebug, "EGL suggested using X Visual ID %d for EGL config %d, but that isn't a valid ID",
+ (int)visualId, configId);
visualId = 0;
}
XFree(chosenVisualInfo);
}
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
else
- qDebug("EGL did not suggest a VisualID (EGL_NATIVE_VISUAL_ID was zero) for EGLConfig %d", configId);
-#endif
+ qCDebug(lcXlibEglDebug, "EGL did not suggest a VisualID (EGL_NATIVE_VISUAL_ID was zero) for EGLConfig %d", configId);
if (visualId) {
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
- if (configAlphaSize > 0)
- qDebug("Using ARGB Visual ID %d provided by EGL for config %d", (int)visualId, configId);
- else
- qDebug("Using Opaque Visual ID %d provided by EGL for config %d", (int)visualId, configId);
-#endif
+ qCDebug(lcXlibEglDebug, configAlphaSize > 0
+ ? "Using ARGB Visual ID %d provided by EGL for config %d"
+ : "Using Opaque Visual ID %d provided by EGL for config %d", (int)visualId, configId);
return visualId;
}
@@ -143,9 +141,7 @@ VisualID QXlibEglIntegration::getCompatibleVisualId(Display *display, EGLDisplay
}
if (visualId) {
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
- qDebug("Using Visual ID %d provided by XGetVisualInfo for EGL config %d", (int)visualId, configId);
-#endif
+ qCDebug(lcXlibEglDebug, "Using Visual ID %d provided by XGetVisualInfo for EGL config %d", (int)visualId, configId);
return visualId;
}
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp b/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp
index 8880a2a8a9..c026546ced 100644
--- a/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp
+++ b/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp
@@ -265,7 +265,7 @@ QSize QEglFSX11Hooks::screenSize() const
m_screenSize = QSize(env.at(0).toInt(), env.at(1).toInt());
} else {
m_screenSize = QSize(640, 480);
- qDebug("EGLFS_X11_SIZE not set, falling back to 640x480");
+ qWarning("EGLFS_X11_SIZE not set, falling back to 640x480");
}
}
return m_screenSize;