From 17a0782f2c0886ff19fc2c1a0bfbc96861ff2996 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Mon, 15 Aug 2011 15:51:57 +0200 Subject: Fixed infinite loop when loading certain SVGs. Task-number: QTBUG-16216 Reviewed-by: aavit --- src/svg/qsvgstructure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/svg/qsvgstructure.cpp b/src/svg/qsvgstructure.cpp index cc158ba..4d9fad5 100644 --- a/src/svg/qsvgstructure.cpp +++ b/src/svg/qsvgstructure.cpp @@ -369,7 +369,7 @@ QSvgNode * QSvgStructureNode::previousSiblingNode(QSvgNode *n) const { QSvgNode *prev = 0; QList::const_iterator itr = m_renderers.constBegin(); - while (itr != m_renderers.constEnd()) { + for (; itr != m_renderers.constEnd(); ++itr) { QSvgNode *node = *itr; if (node == n) return prev; -- cgit v0.12 From 2657bfa7c4de9f114331d1714a306b3999ae30d8 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 16 Aug 2011 10:52:29 +0200 Subject: Fix bidi reordering of RTL text with embedded images According to the UBA, the object replacement character should be considered ON. There's no reason to special case its directionality, as the bidi algorithm will already have given it an implicit directionality. Task-number: QTBUG-20910 Reviewed-by: Lars --- src/gui/text/qtextengine.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 9301f16..9f148ee 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1534,8 +1534,6 @@ void QTextEngine::itemize() const while (uc < e) { switch (*uc) { case QChar::ObjectReplacementCharacter: - if (analysis->bidiLevel % 2) - --analysis->bidiLevel; analysis->script = QUnicodeTables::Common; analysis->flags = QScriptAnalysis::Object; break; -- cgit v0.12 From ebe1233c4fa3eb728f7e6b8355cb1b4c0dd65213 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 9 Aug 2011 09:41:16 +0200 Subject: Update uikit README: svg works, warn about thumb --- src/plugins/platforms/uikit/README | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/uikit/README b/src/plugins/platforms/uikit/README index 81ef0bd..f6f3927 100644 --- a/src/plugins/platforms/uikit/README +++ b/src/plugins/platforms/uikit/README @@ -37,11 +37,11 @@ After configuring and building Qt you need to also build src/plugins/platforms/u Simulator: ---------- -configure -qpa -xplatform qpa/macx-iphonesimulator-g++ -arch i386 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qpa/macx-iphonesimulator-g++ -arch i386 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations Device: ------- -configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -no-neon -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -no-neon -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations 2) XCode setup: - there are examples in the examples subdirectory of the platform plugin @@ -58,7 +58,8 @@ configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -no-neon -develo to the include search paths. - add "$(SRCROOT)/../qmltest" to the include search path if you didn't copy but linked to the qmlapplicationviewer - - for device set the architecture to armv7 only + - for device set the architecture to armv7 only and make sure you + don't compile for thumb - to use sound in your application, Q_IMPORT_PLUGIN(phonon_av), #include , and call Phonon::Factory::setBackend(qt_plugin_instance_phonon_av()); -- cgit v0.12 From 6be1b235f7db38146f7080a4bfcfe3051ae54699 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 10 Aug 2011 09:38:37 +0200 Subject: Fix compilation with thumb2. Task-number: QTBUG-16402 Rubber-stamped-by: Thiago Macieira --- src/corelib/arch/qatomic_armv6.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/arch/qatomic_armv6.h b/src/corelib/arch/qatomic_armv6.h index 96b561e..dd465db 100644 --- a/src/corelib/arch/qatomic_armv6.h +++ b/src/corelib/arch/qatomic_armv6.h @@ -152,6 +152,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) asm volatile("0:\n" "ldrex %[result], [%[_q_value]]\n" "eors %[result], %[result], %[expectedValue]\n" + "itt eq\n" "strexeq %[result], %[newValue], [%[_q_value]]\n" "teqeq %[result], #1\n" "beq 0b\n" @@ -210,6 +211,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer::testAndSetRelaxed(T *expectedValu asm volatile("0:\n" "ldrex %[result], [%[_q_value]]\n" "eors %[result], %[result], %[expectedValue]\n" + "itt eq\n" "strexeq %[result], %[newValue], [%[_q_value]]\n" "teqeq %[result], #1\n" "beq 0b\n" -- cgit v0.12 From 6e0dd8c70a467771f4633b8e0c39bc071fffe0b4 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 10 Aug 2011 09:38:57 +0200 Subject: Use thumb instructions for uikit --- mkspecs/qpa/macx-iphonedevice-g++/qmake.conf | 6 +++--- src/plugins/platforms/uikit/README | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf b/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf index d69f58d..faec47d 100644 --- a/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf +++ b/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf @@ -43,10 +43,10 @@ QMAKE_CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/b QMAKE_LINK = $$QMAKE_CXX QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_CFLAGS += -arch armv7 -marm -isysroot $$QMAKE_IOS_SDK -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2 +QMAKE_CFLAGS += -arch armv7 -isysroot $$QMAKE_IOS_SDK -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2 QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden -QMAKE_OBJECTIVE_CFLAGS += -arch armv7 -marm -isysroot $$QMAKE_IOS_SDK -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2 -QMAKE_LFLAGS += -arch armv7 -marm -miphoneos-version-min=4.2 -Wl,-syslibroot,$$QMAKE_IOS_SDK +QMAKE_OBJECTIVE_CFLAGS += -arch armv7 -isysroot $$QMAKE_IOS_SDK -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2 +QMAKE_LFLAGS += -arch armv7 -miphoneos-version-min=4.2 -Wl,-syslibroot,$$QMAKE_IOS_SDK QMAKE_LFLAGS += -framework Foundation -framework UIKit -framework QuartzCore -lz QMAKE_INCDIR_OPENGL = diff --git a/src/plugins/platforms/uikit/README b/src/plugins/platforms/uikit/README index f6f3927..795e72a 100644 --- a/src/plugins/platforms/uikit/README +++ b/src/plugins/platforms/uikit/README @@ -58,8 +58,7 @@ configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -no-neon -develo to the include search paths. - add "$(SRCROOT)/../qmltest" to the include search path if you didn't copy but linked to the qmlapplicationviewer - - for device set the architecture to armv7 only and make sure you - don't compile for thumb + - for device set the architecture to armv7 only - to use sound in your application, Q_IMPORT_PLUGIN(phonon_av), #include , and call Phonon::Factory::setBackend(qt_plugin_instance_phonon_av()); -- cgit v0.12 From d3277f6d32395b373f45a63e462d3a345745e6f4 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 17 Aug 2011 09:02:56 +0200 Subject: uikit: Fix warning. --- src/plugins/platforms/uikit/phonon_av/avmediaobject.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm b/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm index 388866f..9cbddc0 100644 --- a/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm +++ b/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm @@ -60,7 +60,7 @@ - (id)initWithMediaObject:(AVMediaObject *)obj { - if (self = [self init]) { + if ((self = [self init])) { mediaObject = obj; } return self; -- cgit v0.12 From 8cce6c8b2a2fe831d9b20a9c751e35a3bdb8f9b4 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 17 Aug 2011 09:08:13 +0200 Subject: uikit: Fixes for Open GL ES 1 and for pre-3GS devices --- src/imports/imports.pro | 2 +- src/plugins/platforms/uikit/quikitwindow.mm | 31 ++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/imports/imports.pro b/src/imports/imports.pro index c1298e2..d0e24b0 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs SUBDIRS += folderlistmodel particles gestures -contains(QT_CONFIG, opengl): SUBDIRS += shaders +contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1): SUBDIRS += shaders diff --git a/src/plugins/platforms/uikit/quikitwindow.mm b/src/plugins/platforms/uikit/quikitwindow.mm index 6e018fe..640b92e 100644 --- a/src/plugins/platforms/uikit/quikitwindow.mm +++ b/src/plugins/platforms/uikit/quikitwindow.mm @@ -53,6 +53,23 @@ #include +static GLint stencilBits() +{ + static GLint bits; + static bool initialized = false; + if (!initialized) { + glGetIntegerv(GL_STENCIL_BITS, &bits); + initialized = true; + } + return bits; +} + +static GLint depthBits() +{ + // we can choose between GL_DEPTH24_STENCIL8_OES and GL_DEPTH_COMPONENT16 + return stencilBits() > 0 ? 24 : 16; +} + class EAGLPlatformContext : public QPlatformGLContext { public: @@ -60,13 +77,13 @@ public: : mView(view) { mFormat.setWindowApi(QPlatformWindowFormat::OpenGL); - mFormat.setDepthBufferSize(24); + mFormat.setDepthBufferSize(depthBits()); mFormat.setAccumBufferSize(0); mFormat.setRedBufferSize(8); mFormat.setGreenBufferSize(8); mFormat.setBlueBufferSize(8); mFormat.setAlphaBufferSize(8); - mFormat.setStencilBufferSize(8); + mFormat.setStencilBufferSize(stencilBits()); mFormat.setSamples(0); mFormat.setSampleBuffers(false); mFormat.setDoubleBuffer(true); @@ -74,7 +91,7 @@ public: mFormat.setRgba(true); mFormat.setAlpha(true); mFormat.setAccum(false); - mFormat.setStencil(true); + mFormat.setStencil(stencilBits() > 0); mFormat.setStereo(false); mFormat.setDirectRendering(false); @@ -203,9 +220,13 @@ private: glGenRenderbuffers(1, &mDepthRenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, mDepthRenderbuffer); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, mFramebufferWidth, mFramebufferHeight); + if (stencilBits() > 0) { + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, mFramebufferWidth, mFramebufferHeight); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer); + } else { + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, mFramebufferWidth, mFramebufferHeight); + } glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER)); -- cgit v0.12