From 96c3752a1178680cad7e4c87c2c077e34c377f18 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 28 Sep 2009 12:38:35 +1000 Subject: Make the GL graphics system work under OpenGL/ES 2.0 Very basic port of the graphics system - performance may not be the best just yet. Reviewed-by: Sarah Smith --- src/opengl/qwindowsurface_gl.cpp | 73 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index cddc53f..525c877 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -86,6 +86,10 @@ #include "qgl_cl_p.h" #endif +#ifdef QT_OPENGL_ES +#include +#endif + QT_BEGIN_NAMESPACE // @@ -326,6 +330,10 @@ QGLWindowSurface::~QGLWindowSurface() void QGLWindowSurface::deleted(QObject *object) { + // Make sure that the fbo is destroyed before destroying its context. + delete d_ptr->fbo; + d_ptr->fbo = 0; + QWidget *widget = qobject_cast(object); if (widget) { QWidgetPrivate *widgetPrivate = widget->d_func(); @@ -352,6 +360,17 @@ void QGLWindowSurface::hijackWindow(QWidget *widget) QGLContext *ctx = new QGLContext(surfaceFormat, widget); ctx->create(qt_gl_share_widget()->context()); +#if defined(Q_WS_X11) && defined(QT_OPENGL_ES) + // Create the EGL surface to draw into. QGLContext::chooseContext() + // does not do this for X11/EGL, but does do it for other platforms. + // This probably belongs in qgl_x11egl.cpp. + QGLContextPrivate *ctxpriv = ctx->d_func(); + ctxpriv->eglSurface = ctxpriv->eglContext->createSurface(widget); + if (ctxpriv->eglSurface == EGL_NO_SURFACE) { + qWarning() << "hijackWindow() could not create EGL surface"; + } +#endif + widgetPrivate->extraData()->glContext = ctx; union { QGLContext **ctxPtr; void **voidPtr; }; @@ -584,6 +603,42 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & if (d_ptr->fbo) d_ptr->fbo->bind(); } +#else + // OpenGL/ES 2.0 version of the fbo blit. + else if (d_ptr->fbo) { + GLuint texture = d_ptr->fbo->texture(); + + glDisable(GL_DEPTH_TEST); + + if (d_ptr->fbo->isBound()) + d_ptr->fbo->release(); + + glViewport(0, 0, size.width(), size.height()); + + QGLShaderProgram *blitProgram = + QGLEngineSharedShaders::shadersForContext(ctx)->blitProgram(); + blitProgram->enable(); + blitProgram->setUniformValue("imageTexture", 0 /*QT_IMAGE_TEXTURE_UNIT*/); + + // The shader manager's blit program does not multiply the + // vertices by the pmv matrix, so we need to do the effect + // of the orthographic projection here ourselves. + QRectF r; + qreal w = size.width() ? size.width() : 1.0f; + qreal h = size.height() ? size.height() : 1.0f; + r.setLeft((rect.left() / w) * 2.0f - 1.0f); + if (rect.right() == (size.width() - 1)) + r.setRight(1.0f); + else + r.setRight((rect.right() / w) * 2.0f - 1.0f); + r.setBottom((rect.top() / h) * 2.0f - 1.0f); + if (rect.bottom() == (size.height() - 1)) + r.setTop(1.0f); + else + r.setTop((rect.bottom() / w) * 2.0f - 1.0f); + + drawTexture(r, texture, window()->size(), br); + } #endif if (ctx->format().doubleBuffer()) @@ -635,9 +690,6 @@ void QGLWindowSurface::updateGeometry() { if (d_ptr->destructive_swap_buffers && (QGLExtensions::glExtensions & QGLExtensions::FramebufferObject) -#ifdef QT_OPENGL_ES_2 - && (QGLExtensions::glExtensions & QGLExtensions::FramebufferBlit) -#endif && (d_ptr->fbo || !d_ptr->tried_fbo) && qt_gl_preferGL2Engine()) { @@ -805,10 +857,23 @@ static void drawTexture(const QRectF &rect, GLuint tex_id, const QSize &texSize, glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); -#endif glDisable(target); glBindTexture(target, 0); +#else + glVertexAttribPointer(QT_VERTEX_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, vertexArray); + glVertexAttribPointer(QT_TEXTURE_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, texCoordArray); + + glBindTexture(target, tex_id); + + glEnableVertexAttribArray(QT_VERTEX_COORDS_ATTR); + glEnableVertexAttribArray(QT_TEXTURE_COORDS_ATTR); + glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + glDisableVertexAttribArray(QT_VERTEX_COORDS_ATTR); + glDisableVertexAttribArray(QT_TEXTURE_COORDS_ATTR); + + glBindTexture(target, 0); +#endif } QImage *QGLWindowSurface::buffer(const QWidget *widget) -- cgit v0.12 From c4bdc8d6d7e09ddfd5e59f138c0632f636c09e26 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 28 Sep 2009 13:56:14 +1000 Subject: ifdef out convolution filter for OpenGL/ES 2.0 Convolution filter is not compatible with OpenGL/ES 2.0 in its current form, and we probably don't need it now that we have a special-purpose blur filter. Reviewed-by: trustme --- src/opengl/qglpixmapfilter.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index bb0306c..bb3cb5d 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -79,6 +79,8 @@ protected: bool processGL(QPainter *painter, const QPointF &pos, const QPixmap &pixmap, const QRectF &srcRect) const; }; +#ifndef QT_OPENGL_ES_2 + class QGLPixmapConvolutionFilter: public QGLPixmapFilter { public: @@ -99,6 +101,8 @@ private: mutable int m_kernelHeight; }; +#endif + class QGLPixmapBlurFilter : public QGLCustomShaderStage, public QGLPixmapFilter { public: @@ -143,22 +147,25 @@ QPixmapFilter *QGL2PaintEngineEx::pixmapFilter(int type, const QPixmapFilter *pr return d->blurFilter.data(); } +#ifndef QT_OPENGL_ES_2 case QPixmapFilter::ConvolutionFilter: if (!d->convolutionFilter) d->convolutionFilter.reset(new QGLPixmapConvolutionFilter); return d->convolutionFilter.data(); +#endif default: break; } return QPaintEngineEx::pixmapFilter(type, prototype); } +#ifndef QT_OPENGL_ES_2 // XXX: needs to be ported + extern void qt_add_rect_to_array(const QRectF &r, q_vertexType *array); extern void qt_add_texcoords_to_array(qreal x1, qreal y1, qreal x2, qreal y2, q_vertexType *array); static void qgl_drawTexture(const QRectF &rect, int tx_width, int tx_height, const QRectF & src) { -#ifndef QT_OPENGL_ES_2 // XXX: needs to be ported #ifndef QT_OPENGL_ES glPushAttrib(GL_CURRENT_BIT); #endif @@ -187,9 +194,10 @@ static void qgl_drawTexture(const QRectF &rect, int tx_width, int tx_height, con #ifndef QT_OPENGL_ES glPopAttrib(); #endif -#endif } +#endif // !QT_OPENGL_ES_2 + static const char *qt_gl_colorize_filter = "uniform lowp vec4 colorizeColor;" "uniform lowp float colorizeStrength;" @@ -223,6 +231,8 @@ void QGLPixmapColorizeFilter::setUniforms(QGLShaderProgram *program) program->setUniformValue("colorizeStrength", float(strength())); } +#ifndef QT_OPENGL_ES_2 + // generates convolution filter code for arbitrary sized kernel QByteArray QGLPixmapConvolutionFilter::generateConvolutionShader() const { QByteArray code; @@ -315,6 +325,8 @@ bool QGLPixmapConvolutionFilter::processGL(QPainter *, const QPointF &pos, const return true; } +#endif // !QT_OPENGL_ES_2 + static const char *qt_gl_blur_filter_fast = "const int samples = 9;" "uniform mediump vec2 delta;" -- cgit v0.12 From ba57f5a6d4f1475ce612187702f6a3994abb3ba8 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 28 Sep 2009 14:04:20 +1000 Subject: QGLContext::drawTexture() is not supported under OpenGL/ES 2.0 Reviewed-by: trustme --- src/opengl/qgl.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 89bd7d4..97a4a73 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2514,6 +2514,8 @@ void qt_add_texcoords_to_array(qreal x1, qreal y1, qreal x2, qreal y2, q_vertexT array[7] = f2vt(y2); } +#if !defined(QT_OPENGL_ES_2) + static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint textureHeight, GLenum textureTarget) { q_vertexType tx = f2vt(1); @@ -2542,7 +2544,6 @@ static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint tex q_vertexType vertexArray[4*2]; qt_add_rect_to_array(target, vertexArray); -#if !defined(QT_OPENGL_ES_2) glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray); glTexCoordPointer(2, q_vertexTypeEnum, 0, texCoordArray); @@ -2552,18 +2553,22 @@ static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint tex glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); -#endif } +#endif // !QT_OPENGL_ES_2 + /*! \since 4.4 Draws the given texture, \a textureId, to the given target rectangle, \a target, in OpenGL model space. The \a textureTarget should be a 2D texture target. + + \note This function is not supported under OpenGL/ES 2.0. */ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget) { +#ifndef QT_OPENGL_ES_2 #ifdef QT_OPENGL_ES if (textureTarget != GL_TEXTURE_2D) { qWarning("QGLContext::drawTexture(): texture target must be GL_TEXTURE_2D on OpenGL ES"); @@ -2587,6 +2592,12 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text glDisable(textureTarget); glBindTexture(textureTarget, oldTexture); #endif +#else + Q_UNUSED(target); + Q_UNUSED(textureId); + Q_UNUSED(textureTarget); + qWarning("drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget) not supported with OpenGL ES/2.0"); +#endif } #ifdef Q_MAC_COMPAT_GL_FUNCTIONS @@ -2602,6 +2613,8 @@ void QGLContext::drawTexture(const QRectF &target, QMacCompatGLuint textureId, Q Draws the given texture at the given \a point in OpenGL model space. The \a textureTarget should be a 2D texture target. + + \note This function is not supported under OpenGL/ES. */ void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget) { -- cgit v0.12 From 46eff02e5dc36f26d7f10bbc74e04875a9fb7220 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 28 Sep 2009 14:09:42 +1000 Subject: Suppress some compiler warnings that occur under OpenGL/ES 2.0 Reviewed-by: trustme --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 ++++ src/opengl/qwindowsurface_gl.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index b8a5711..119c89d 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -758,6 +758,8 @@ void QGL2PaintEngineEx::beginNativePainting() glMatrixMode(GL_MODELVIEW); glLoadMatrixf(&mv_matrix[0][0]); +#else + Q_UNUSED(ctx); #endif d->lastTexture = GLuint(-1); @@ -1207,7 +1209,9 @@ void QGL2PaintEngineEx::drawTexture(const QRectF &dest, GLuint textureId, const ensureActive(); d->transferMode(ImageDrawingMode); +#ifndef QT_OPENGL_ES_2 QGLContext *ctx = d->ctx; +#endif glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); glBindTexture(GL_TEXTURE_2D, textureId); diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 525c877..3a348bc 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -606,6 +606,8 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & #else // OpenGL/ES 2.0 version of the fbo blit. else if (d_ptr->fbo) { + Q_UNUSED(target); + GLuint texture = d_ptr->fbo->texture(); glDisable(GL_DEPTH_TEST); -- cgit v0.12 From 3e59128ccb56261c8f66d6f0cbe1032506f81cac Mon Sep 17 00:00:00 2001 From: Bill King Date: Mon, 28 Sep 2009 15:38:17 +1000 Subject: Fixes autotest trying to delete table from wrong DB --- tests/auto/qsqlquery/tst_qsqlquery.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp index eb95d611c..5ed9cfa 100644 --- a/tests/auto/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp @@ -2352,7 +2352,7 @@ void tst_QSqlQuery::sqlite_finish() QString tableName = qTableName( "qtest_lockedtable" ); QSqlQuery q( db ); - tst_Databases::safeDropTable( db2, tableName ); + tst_Databases::safeDropTable( db, tableName ); q.exec( "CREATE TABLE " + tableName + " (pk_id INTEGER PRIMARY KEY, whatever TEXT)" ); q.exec( "INSERT INTO " + tableName + " values(1, 'whatever')" ); q.exec( "INSERT INTO " + tableName + " values(2, 'whatever more')" ); @@ -2371,7 +2371,7 @@ void tst_QSqlQuery::sqlite_finish() QVERIFY_SQL( q2, exec( "DELETE FROM " + tableName + " WHERE pk_id=2" ) ); QCOMPARE( q2.numRowsAffected(), 1 ); - tst_Databases::safeDropTable( db2, tableName ); + tst_Databases::safeDropTable( db, tableName ); } QSqlDatabase::removeDatabase( "sqlite_finish_sqlite" ); -- cgit v0.12 From dbfff9e8edb8353ca5698281dd3937d491fbc593 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 28 Sep 2009 10:25:58 +0300 Subject: Re-enabled tst_QImageReader::readFromDevice for Symbian OS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Symbian OS has working networking support now, so we donät need to skip this test anymore. Reviewed-by: TrustMe --- tests/auto/qimagereader/tst_qimagereader.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index c0d5051..05b506c 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -816,9 +816,7 @@ void tst_QImageReader::readFromDevice() { QFETCH(QString, fileName); QFETCH(QByteArray, format); - #ifdef Q_OS_SYMBIAN - QSKIP("Symbian local sockets are not working", SkipAll); - #endif + QImage expectedImage(prefix + fileName, format); QFile file(prefix + fileName); -- cgit v0.12 From 60bc4d037a6b4b667f08f1d36e868b454723909f Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 28 Sep 2009 10:49:12 +0300 Subject: Fixed qeasingcurve autotest compilation for other than WINCE platforms. Reviewed-by: TrustMe --- tests/auto/qeasingcurve/tst_qeasingcurve.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp index 8e0d37d..52ffcb5 100644 --- a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp @@ -417,18 +417,18 @@ void tst_QEasingCurve::valueForProgress() // the least significant digit it is still subject to rounding errors qreal error = easeConv - ex; + qreal errorbound = 0.00001; #ifdef Q_OS_WINCE // exception values for WINCE(this test should be rewritten, as it only freezes the status quo of QEasingCurve // The failing (2) values are explicitly excepted here: // The source values for the comparison table should remain untruncated double and the // error bound checking function dynamic. Also the source values should come from a "trusted" source and not // from QEasingCurve itself. - qreal errorbound = 0.00001; if ((type == int(QEasingCurve::InOutBounce) && (i == 8 || i == 6) ) || (type == int(QEasingCurve::OutExpo) && i == 2)) - errorbound = 0.0002; -#endif // accept the potential rounding error in the least significant digit - - QVERIFY(error <= errorbound ); + errorbound = 0.0002; +#endif + // accept the potential rounding error in the least significant digit + QVERIFY(error <= errorbound ); } #endif } -- cgit v0.12 From 632462a8d4148c8fad312a08c274d6dc05950d8d Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 28 Sep 2009 11:00:46 +0300 Subject: Enabled WINCE workaround for S60 in QEasingCurve::valueForProgress test. See: 82275b4c03a0. This workaround applies also for Symbian. Reviewed-by: TrustMe --- tests/auto/qeasingcurve/tst_qeasingcurve.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp index 52ffcb5..8cf686e 100644 --- a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp @@ -418,7 +418,7 @@ void tst_QEasingCurve::valueForProgress() // the least significant digit it is still subject to rounding errors qreal error = easeConv - ex; qreal errorbound = 0.00001; -#ifdef Q_OS_WINCE +#if defined( Q_OS_WINCE ) || defined( Q_OS_SYMBIAN ) // exception values for WINCE(this test should be rewritten, as it only freezes the status quo of QEasingCurve // The failing (2) values are explicitly excepted here: // The source values for the comparison table should remain untruncated double and the @@ -427,7 +427,7 @@ void tst_QEasingCurve::valueForProgress() if ((type == int(QEasingCurve::InOutBounce) && (i == 8 || i == 6) ) || (type == int(QEasingCurve::OutExpo) && i == 2)) errorbound = 0.0002; #endif - // accept the potential rounding error in the least significant digit + // accept the potential rounding error in the least significant digit QVERIFY(error <= errorbound ); } #endif -- cgit v0.12 From 8a9b2acacecd4e998944d567c4a5c064c40dc999 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 28 Sep 2009 10:28:34 +0200 Subject: testBatFiles removed from qprocess.pro autotest Reviewed-by: paul --- tests/auto/qprocess/qprocess.pro | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/auto/qprocess/qprocess.pro b/tests/auto/qprocess/qprocess.pro index 892686d..77cfc82 100644 --- a/tests/auto/qprocess/qprocess.pro +++ b/tests/auto/qprocess/qprocess.pro @@ -1,7 +1,6 @@ TEMPLATE = subdirs SUBDIRS = \ - testBatFiles \ testProcessCrash \ testProcessEcho \ testProcessEcho2 \ -- cgit v0.12 From 50764a0609bb9ea7e14e33456e77dd14c447f7e3 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 28 Sep 2009 10:40:47 +0200 Subject: JavaScriptCore compile fix for Windows CE on ARM Reviewed-by: Simon Hausmann --- src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h index cc40336..39cafab 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h @@ -257,7 +257,8 @@ #define WTF_PLATFORM_MIDDLE_ENDIAN 1 #endif #define ARM_ARCH_VERSION 3 -#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) +#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || defined(ARMV4I) \ + || defined(_ARMV4I_) || defined(armv4i) #undef ARM_ARCH_VERSION #define ARM_ARCH_VERSION 4 #endif -- cgit v0.12 From e393fe2c336e7c287892e3d1ba32b505a63e9e3a Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 28 Sep 2009 11:56:59 +0300 Subject: Removed RVCT workarounds for QFileSystemWatcher autotest. The test passes without these workarounds in 5800 XpressMusic and emulator Reviewed-by: TrustMe --- tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 88bf229..7735f30 100644 --- a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -318,9 +318,6 @@ void tst_QFileSystemWatcher::watchDirectory() #ifdef Q_OS_WINCE QEXPECT_FAIL("poller", "Directory does not get updated on file removal(See #137910)", Abort); -#elif defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) - // Since native watcher is always used in real devices, this poller issue is irrelevant - QEXPECT_FAIL("poller", "Poller doesn't detect directory removal in RVCT builds", Abort); #endif QCOMPARE(changedSpy.count(), 2); QCOMPARE(changedSpy.at(0).count(), 1); @@ -490,11 +487,6 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory() #ifdef Q_OS_WINCE QEXPECT_FAIL("poller", "Directory does not get updated on file removal(See #137910)", Abort); #endif -#if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) - // Since native watcher is always used in real devices, this poller issue is irrelevant - // Symbian file system does not change modification time on a directory when a file inside is changed - QEXPECT_FAIL("poller", "Poller doesn't detect directory changes in RVCT builds", Abort); -#endif QCOMPARE(dirChangedSpy.count(), 1); dirChangedSpy.clear(); -- cgit v0.12 From 8f1f29432e274fcad2deae4ff19e2e738672b7cd Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 28 Sep 2009 10:40:47 +0200 Subject: JavaScriptCore compile fix for Windows CE on ARM Reviewed-by: Simon Hausmann --- src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h index e508f77..bd82d8f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h @@ -238,7 +238,8 @@ #define WTF_PLATFORM_MIDDLE_ENDIAN 1 #endif #define ARM_ARCH_VERSION 3 -#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) +#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || defined(ARMV4I) \ + || defined(_ARMV4I_) || defined(armv4i) #undef ARM_ARCH_VERSION #define ARM_ARCH_VERSION 4 #endif -- cgit v0.12 From a49ca92bc343e58ec21dd52a933b23f43ecfc0a6 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 28 Sep 2009 11:24:05 +0200 Subject: Make sure signal handlers are installed on QWS QWS already installs message handlers, and this would cause testlib not to install its own handler, causing lots of extra test failures if there is a crash. The proper way would be to make testlib invoke previous handlers, but the quick and easy fix is just to forget about the old ones. The rationale is that the worst thing that can happen is that it will cause a crash, and that was going to happen anyway. Reviewed-by: Jeremy --- src/testlib/qtestcase.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 3392ed7..7e7bcd1 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1517,10 +1517,14 @@ FatalSignalHandler::FatalSignalHandler() for (int i = 0; fatalSignals[i]; ++i) { sigaction(fatalSignals[i], &act, &oldact); +#ifndef Q_WS_QWS // Don't overwrite any non-default handlers + // however, we need to replace the default QWS handlers if (oldact.sa_flags & SA_SIGINFO || oldact.sa_handler != SIG_DFL) { sigaction(fatalSignals[i], &oldact, 0); - } else { + } else +#endif + { sigaddset(&handledSignals, fatalSignals[i]); } } -- cgit v0.12