From 7ff5a5bc4b67a807200cae3ac83884d721bad373 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 23 Feb 2010 17:12:30 +0100 Subject: Skip complex FBO tests if combined depth-stencil isn't supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-By: Trond Kjernåsen --- tests/auto/qgl/tst_qgl.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index 2983af3..a0656d0 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -1036,6 +1036,11 @@ void tst_QGL::glFBORendering() // Don't complicate things by using NPOT: QGLFramebufferObject *fbo = new QGLFramebufferObject(256, 128, fboFormat); + if (fbo->attachment() != QGLFramebufferObject::CombinedDepthStencil) { + delete fbo; + QSKIP("FBOs missing combined depth~stencil support", SkipSingle); + } + QPainter fboPainter; bool painterBegun = fboPainter.begin(fbo); QVERIFY(painterBegun); @@ -1098,6 +1103,16 @@ void tst_QGL::multipleFBOInterleavedRendering() QGLFramebufferObject *fbo2 = new QGLFramebufferObject(256, 128, fboFormat); QGLFramebufferObject *fbo3 = new QGLFramebufferObject(256, 128, fboFormat); + if ( (fbo1->attachment() != QGLFramebufferObject::CombinedDepthStencil) || + (fbo2->attachment() != QGLFramebufferObject::CombinedDepthStencil) || + (fbo3->attachment() != QGLFramebufferObject::CombinedDepthStencil) ) + { + delete fbo1; + delete fbo2; + delete fbo3; + QSKIP("FBOs missing combined depth~stencil support", SkipSingle); + } + QPainter fbo1Painter; QPainter fbo2Painter; QPainter fbo3Painter; @@ -1203,7 +1218,7 @@ protected: QPainter widgetPainter; widgetPainterBeginOk = widgetPainter.begin(this); QGLFramebufferObjectFormat fboFormat; - fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil); + fboFormat.setAttachment(QGLFramebufferObject::NoAttachment); QGLFramebufferObject *fbo = new QGLFramebufferObject(128, 128, fboFormat); QPainter fboPainter; -- cgit v0.12 From c815fd0a6426e43aa9efd861888888aa4d5b233b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 26 Feb 2010 10:44:51 +0100 Subject: Fixed qgl autotest failures on Maemo. Changed glFBOSimpleRendering and glFBOUseInGLWidget auto tests to use NPOT sizes. NPOT FBOs are not twiddled, and thus not exposed to the twiddled glReadPixels() bug in the current drivers. Skipped glWidgetRenderPixmap as renderPixmap() is not supported under EGL currently. Reviewed-by: Tom Cooksey --- tests/auto/qgl/qgl.pro | 2 ++ tests/auto/qgl/tst_qgl.cpp | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/auto/qgl/qgl.pro b/tests/auto/qgl/qgl.pro index 9116f39..5f058f9 100644 --- a/tests/auto/qgl/qgl.pro +++ b/tests/auto/qgl/qgl.pro @@ -6,6 +6,8 @@ load(qttest_p4) requires(contains(QT_CONFIG,opengl)) QT += opengl +contains(QT_CONFIG,egl):DEFINES += QGL_EGL + SOURCES += tst_qgl.cpp RESOURCES = qgl.qrc diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index a0656d0..101e361 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -998,8 +998,7 @@ void tst_QGL::glFBOSimpleRendering() QGLFramebufferObjectFormat fboFormat; fboFormat.setAttachment(QGLFramebufferObject::NoAttachment); - // Don't complicate things by using NPOT: - QGLFramebufferObject *fbo = new QGLFramebufferObject(256, 128, fboFormat); + QGLFramebufferObject *fbo = new QGLFramebufferObject(200, 100, fboFormat); fbo->bind(); @@ -1219,7 +1218,7 @@ protected: widgetPainterBeginOk = widgetPainter.begin(this); QGLFramebufferObjectFormat fboFormat; fboFormat.setAttachment(QGLFramebufferObject::NoAttachment); - QGLFramebufferObject *fbo = new QGLFramebufferObject(128, 128, fboFormat); + QGLFramebufferObject *fbo = new QGLFramebufferObject(100, 100, fboFormat); QPainter fboPainter; fboPainterBeginOk = fboPainter.begin(fbo); @@ -1243,7 +1242,7 @@ void tst_QGL::glFBOUseInGLWidget() #ifdef Q_WS_QWS w.setWindowFlags(Qt::FramelessWindowHint); #endif - w.resize(128, 128); + w.resize(100, 100); w.show(); #ifdef Q_WS_X11 @@ -1355,6 +1354,10 @@ void tst_QGL::glWidgetRenderPixmap() QImage reference(fb.size(), QImage::Format_RGB32); reference.fill(0xffff0000); +#ifdef QGL_EGL + QSKIP("renderPixmap() not yet supported under EGL", SkipAll); +#endif + QFUZZY_COMPARE_IMAGES(fb, reference); } -- cgit v0.12 From 13df3749820f3fd1847e4359b302da052eef5137 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 26 Feb 2010 15:08:28 +0100 Subject: QAbstractItemView::setIndexWidget: remove the old widget from the QSet of persistent editors Task-number: QTBUG-8422 Reviewed-by: Thierry --- src/gui/itemviews/qabstractitemview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index adf3ce3..2c4d9b7 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -3014,6 +3014,7 @@ void QAbstractItemView::setIndexWidget(const QModelIndex &index, QWidget *widget if (!d->isIndexValid(index)) return; if (QWidget *oldWidget = indexWidget(index)) { + d->persistent.remove(oldWidget); d->removeEditor(oldWidget); oldWidget->deleteLater(); } -- cgit v0.12 From 30abadd0d0a190889dab6d1c154053a25e060042 Mon Sep 17 00:00:00 2001 From: ninerider Date: Sat, 27 Feb 2010 12:09:28 +0100 Subject: Test modifications for the Windows Mobile platform. Test were changed to run in reasonable time on Windows Mobile. Also some test were skipped for instance those using OpenGL. OpenGL support for Windows Mobile is a forthcoming feature. --- .../corelib/io/qdir/10000/bench_qdir_10000.cpp | 2 +- tests/benchmarks/corelib/io/qfile/main.cpp | 17 +++++++++++++---- .../corelib/tools/containers-sequential/main.cpp | 2 +- tests/benchmarks/corelib/tools/qstringlist/main.cpp | 4 ++++ .../graphicsview/qgraphicsview/tst_qgraphicsview.cpp | 3 +++ .../network/access/qnetworkreply/tst_qnetworkreply.cpp | 4 ++-- .../network/socket/qtcpserver/tst_qtcpserver.cpp | 3 +++ tools/qtestlib/wince/cetest/cetest.pro | 7 ++++++- 8 files changed, 33 insertions(+), 9 deletions(-) diff --git a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp index 1238804..4fe4723 100644 --- a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp +++ b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp @@ -165,7 +165,7 @@ private slots: WIN32_FIND_DATA fd; HANDLE hSearch = FindFirstFileW(appendedPath, &fd); - QVERIFY(hSearch == INVALID_HANDLE_VALUE); + QVERIFY(hSearch != INVALID_HANDLE_VALUE); QBENCHMARK { do { diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp index 103b77c..2dc0e86 100644 --- a/tests/benchmarks/corelib/io/qfile/main.cpp +++ b/tests/benchmarks/corelib/io/qfile/main.cpp @@ -175,7 +175,10 @@ void tst_qfile::cleanupTestCase() void tst_qfile::readBigFile_QFile() { readBigFile(); } void tst_qfile::readBigFile_QFSFileEngine() { readBigFile(); } -void tst_qfile::readBigFile_posix() { readBigFile(); } +void tst_qfile::readBigFile_posix() +{ + readBigFile(); +} void tst_qfile::readBigFile_Win32() { readBigFile(); } void tst_qfile::readBigFile_QFile_data() @@ -476,8 +479,14 @@ void tst_qfile::open() void tst_qfile::readSmallFiles_QFile() { readSmallFiles(); } void tst_qfile::readSmallFiles_QFSFileEngine() { readSmallFiles(); } -void tst_qfile::readSmallFiles_posix() { readSmallFiles(); } -void tst_qfile::readSmallFiles_Win32() { readSmallFiles(); } +void tst_qfile::readSmallFiles_posix() +{ + readSmallFiles(); +} +void tst_qfile::readSmallFiles_Win32() +{ + readSmallFiles(); +} void tst_qfile::readSmallFiles_QFile_data() { @@ -534,7 +543,7 @@ void tst_qfile::createSmallFiles() dir.cd("tst"); tmpDirName = dir.absolutePath(); -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE) for (int i = 0; i < 100; ++i) #else for (int i = 0; i < 1000; ++i) diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp index a6e405c..edf0eff 100644 --- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp +++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp @@ -133,7 +133,7 @@ struct Large { // A "large" item type }; // Symbian devices typically have limited memory -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE) # define LARGE_MAX_SIZE 2000 #else # define LARGE_MAX_SIZE 20000 diff --git a/tests/benchmarks/corelib/tools/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp index 3fac598..81ecd11 100644 --- a/tests/benchmarks/corelib/tools/qstringlist/main.cpp +++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp @@ -147,6 +147,7 @@ void tst_QStringList::split_data() const void tst_QStringList::split_std() const { +#ifndef QT_NO_STL QFETCH(QString, input); const char split_char = ':'; std::string stdinput = input.toStdString(); @@ -159,10 +160,12 @@ void tst_QStringList::split_std() const token.push_back(each)) ; } +#endif } void tst_QStringList::split_stdw() const { +#ifndef QT_NO_STL QFETCH(QString, input); const wchar_t split_char = ':'; std::wstring stdinput = input.toStdWString(); @@ -175,6 +178,7 @@ void tst_QStringList::split_stdw() const token.push_back(each)) ; } +#endif } void tst_QStringList::split_ba() const diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 3c0ae71..ba56d58 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -414,6 +414,9 @@ void tst_QGraphicsView::chipTester_data() void tst_QGraphicsView::chipTester() { +#ifdef Q_WS_WINCE_WM +QSKIP("WinCE WM: Fails on Windows Mobile w/o OpenGL", SkipAll); +#endif QFETCH(bool, antialias); QFETCH(bool, opengl); QFETCH(int, operation); diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp index f173ed1..90ae153 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -555,7 +555,7 @@ void tst_qnetworkreply::uploadPerformance() void tst_qnetworkreply::httpUploadPerformance() { -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE_WM) // SHow some mercy for non-desktop platform/s enum {UploadSize = 4*1024*1024}; // 4 MB #else @@ -626,7 +626,7 @@ void tst_qnetworkreply::httpDownloadPerformance() { QFETCH(bool, serverSendsContentLength); QFETCH(bool, chunkedEncoding); -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE_WM) // Show some mercy to non-desktop platform/s enum {UploadSize = 4*1024*1024}; // 4 MB #else diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp index 022bf3d..c77c619 100644 --- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -175,6 +175,9 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest() QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; +#if defined(Q_WS_WINCE_WM) + QSKIP("WinCE WM: Not yet supported", SkipAll); +#endif #if defined(Q_OS_SYMBIAN) QSKIP("Symbian: IPv6 is not yet supported", SkipAll); diff --git a/tools/qtestlib/wince/cetest/cetest.pro b/tools/qtestlib/wince/cetest/cetest.pro index 6b6b02a..2773fe4 100644 --- a/tools/qtestlib/wince/cetest/cetest.pro +++ b/tools/qtestlib/wince/cetest/cetest.pro @@ -18,10 +18,13 @@ DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED QT_NO_CODECS QT_LITE_UNICODE QT INCLUDEPATH = \ $$QT_SOURCE_TREE/tools/qtestlib/ce/cetest \ $$QT_SOURCE_TREE/qmake \ - $$QT_SOURCE_TREE/tools/shared \ + $$QT_SOURCE_TREE/qmake/generators/symbian \ + $$QT_SOURCE_TREE/tools/shared \ $$QT_BUILD_TREE/include \ $$QT_BUILD_TREE/include/QtCore \ $$QT_BUILD_TREE/src/corelib/global + +VPATH += $$QT_SOURCE_TREE/tools/shared DEPENDPATH += $$QT_BUILD_TREE/src/corelib/tools $$QT_BUILD_TREE/src/corelib/io @@ -33,6 +36,8 @@ HEADERS += \ SOURCES += \ remoteconnection.cpp \ deployment.cpp \ + symbian/epocroot.cpp \ + windows/registry.cpp \ main.cpp LIBS += ole32.lib advapi32.lib -- cgit v0.12 From 6a7b7947e36a2d9440c4eba40dc6d4177fbc0c29 Mon Sep 17 00:00:00 2001 From: ninerider Date: Sat, 27 Feb 2010 12:13:01 +0100 Subject: Preparation to enable OpenGLES 2.0 for Windows Mobile. As there are no SDKs available for our test device (HTC HD2) that support OpenGL, we had to construct the libraries by extracting them from the ROM image. This is still work in progress at this time. --- src/gui/egl/qegl_wince.cpp | 6 ++++-- src/gui/egl/qeglproperties_p.h | 9 +++++++-- src/opengl/qgl_p.h | 12 +++++++++--- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp index c9c9773..dfef39f 100644 --- a/src/gui/egl/qegl_wince.cpp +++ b/src/gui/egl/qegl_wince.cpp @@ -89,8 +89,10 @@ EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties EGLNativeDisplayType QEglContext::nativeDisplay() { - HWND win = (static_cast(device))->winId(); - HDC myDc = GetDC(win); + //HWND win = (static_cast(device))->winId(); + //HDC myDc = GetDC(win); + HDC myDc = GetWindowDC(0); + if (!myDc) { qWarning("QEglContext::nativeDisplay(): WinCE display is not open"); return EGL_DEFAULT_DISPLAY; diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h index feed1d2..43c3393 100644 --- a/src/gui/egl/qeglproperties_p.h +++ b/src/gui/egl/qeglproperties_p.h @@ -58,12 +58,17 @@ QT_BEGIN_INCLUDE_NAMESPACE +#if defined(QT_OPENGL_ES_2) +# include +#endif + #if defined(QT_GLES_EGL) -#include +# include #else -#include +# include #endif + #if defined(Q_WS_X11) // If included , then the global namespace // may have been polluted with X #define's. The following makes sure diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 0d5a54a..80217c0 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -80,13 +80,19 @@ #define q_vertexTypeEnum GL_FIXED #endif //QT_OPENGL_ES_1_CL -#ifdef QT_OPENGL_ES +#if defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2) QT_BEGIN_INCLUDE_NAMESPACE + #if defined(QT_OPENGL_ES_2) -#include +# include +#endif + +#if defined(QT_GLES_EGL) +# include #else -#include +# include #endif + QT_END_INCLUDE_NAMESPACE #endif -- cgit v0.12