From daf89d5e30aa582a03ec9475641ff5c213d720c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 16 Sep 2010 14:14:35 +0200 Subject: Fixes makeCurrent() failed messages on several systems. Small but important fix for threaded environments. If a thread exits without releasing the current context, it could cause the resource system to get confused. Particularly on Windows, where a DC can only be used in the thread it is retrieved in. We don't need the EGL specific fix anymore since it will have the same effect as a doneCurrent() call. --- src/opengl/qgl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index deac025..d9b094e 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -107,11 +107,10 @@ extern const QX11Info *qt_x11Info(const QPaintDevice *pd); #endif struct QGLThreadContext { -#ifdef QT_OPENGL_ES ~QGLThreadContext() { - eglReleaseThread(); + if (context) + context->doneCurrent(); } -#endif QGLContext *context; }; -- cgit v0.12 From 4a95b50375fe144856c476f5a0c064f6cea93758 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Fri, 10 Sep 2010 11:01:44 +0200 Subject: fix CRLF --- tests/auto/qlineedit/tst_qlineedit.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index bfa9406..93bd447 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -3747,15 +3747,15 @@ void tst_QLineEdit::QTBUG697_paletteCurrentColorGroup() void tst_QLineEdit::QTBUG13520_textNotVisible() { LineEdit le; - le.setAlignment( Qt::AlignRight | Qt::AlignVCenter); - le.show(); - QTest::qWaitForWindowShown(&le); - le.setText("01-ST16-01SIL-MPL001wfgsdfgsdgsdfgsdfgsdfgsdfgsdfg"); - le.setCursorPosition(0); - QTest::qWait(100); //just make sure we get he lineedit correcly painted - - QVERIFY(le.cursorRect().center().x() < le.width() / 2); - + le.setAlignment( Qt::AlignRight | Qt::AlignVCenter); + le.show(); + QTest::qWaitForWindowShown(&le); + le.setText("01-ST16-01SIL-MPL001wfgsdfgsdgsdfgsdfgsdfgsdfgsdfg"); + le.setCursorPosition(0); + QTest::qWait(100); //just make sure we get he lineedit correcly painted + + QVERIFY(le.cursorRect().center().x() < le.width() / 2); + } -- cgit v0.12