From 6f9642572c392536c07a52037e4c1de587489c49 Mon Sep 17 00:00:00 2001
From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Date: Thu, 16 Dec 2010 13:21:22 +0100
Subject: Add work around for bug when painting w/glTexSubImage into large
 texture

It seems that copying small rectangles from glTexSubImage2D into a
texture which is 2048x2048 is busted on some SGX drivers, even though
the driver reports 2048 as the maximum texture size. This caused text to
turn into flickering garbage once the texture glyph cache had grown to
its max size (e.g. when painting very many Chinese glyphs.) To work
around the problem, we hardcore the maximum texture height to 1024 on
this driver so that the texture glyph cache is reset whenever that
size is exceeded.

Task-number: QT-3971
Done-with: Samuel
---
 src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 5 ++++-
 src/opengl/qgl.cpp                                    | 1 +
 src/opengl/qgl_egl.cpp                                | 2 ++
 src/opengl/qgl_p.h                                    | 1 +
 4 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 1b879c3..ba311c3 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -323,6 +323,9 @@ int QGLTextureGlyphCache::maxTextureWidth() const
 
 int QGLTextureGlyphCache::maxTextureHeight() const
 {
-    return ctx->d_ptr->maxTextureSize();
+    if (ctx->d_ptr->workaround_brokenTexSubImage)
+        return qMin(1024, ctx->d_ptr->maxTextureSize());
+    else
+        return ctx->d_ptr->maxTextureSize();
 }
 QT_END_NAMESPACE
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 18f1203..9bf879a 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1706,6 +1706,7 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
     active_engine = 0;
     workaround_needsFullClearOnEveryFrame = false;
     workaround_brokenFBOReadBack = false;
+    workaround_brokenTexSubImage = false;
     workaroundsCached = false;
 
     workaround_brokenTextureFromPixmap = false;
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 8902099..6f9e39c 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -204,6 +204,8 @@ void QGLContext::makeCurrent()
                 const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION);
                 if (egl_version && strstr(egl_version, "1.3"))
                     d->workaround_brokenFBOReadBack = true;
+                else if (egl_version && strstr(egl_version, "1.4"))
+                    d->workaround_brokenTexSubImage = true;
             }
         }
     }
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index b46d428..bf830ba 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -401,6 +401,7 @@ public:
     // workarounds for driver/hw bugs on different platforms
     uint workaround_needsFullClearOnEveryFrame : 1;
     uint workaround_brokenFBOReadBack : 1;
+    uint workaround_brokenTexSubImage : 1;
     uint workaroundsCached : 1;
 
     uint workaround_brokenTextureFromPixmap : 1;
-- 
cgit v0.12


From 632016368e26ba06d7d09740a8a1805f4ea911f1 Mon Sep 17 00:00:00 2001
From: Joona Petrell <joona.t.petrell@nokia.com>
Date: Fri, 17 Dec 2010 15:24:30 +1000
Subject: Update test bitmaps for QDeclarativeImage::svg() autotest on Linux

Task-number:
Reviewed-by: Martin Jones
---
 .../declarative/qdeclarativeimage/data/heart.png    | Bin 12424 -> 12577 bytes
 .../declarative/qdeclarativeimage/data/heart200.png | Bin 7943 -> 8063 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart.png b/tests/auto/declarative/qdeclarativeimage/data/heart.png
index ff93f6c..abe97fe 100644
Binary files a/tests/auto/declarative/qdeclarativeimage/data/heart.png and b/tests/auto/declarative/qdeclarativeimage/data/heart.png differ
diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart200.png b/tests/auto/declarative/qdeclarativeimage/data/heart200.png
index 5a31ae8..7fbb13c 100644
Binary files a/tests/auto/declarative/qdeclarativeimage/data/heart200.png and b/tests/auto/declarative/qdeclarativeimage/data/heart200.png differ
-- 
cgit v0.12


From e0abcb2ff7a3044305580659f9a432a9630a5943 Mon Sep 17 00:00:00 2001
From: Joona Petrell <joona.t.petrell@nokia.com>
Date: Fri, 17 Dec 2010 16:18:03 +1000
Subject: Fix QDeclarativeState::reset() autotest

Current state reset mechanism does not really work for Text elements as the keeping implicit correct would require relayouting of text twice (See bug QTBUG-15118). Changed QDeclarativeState reset autotest to use Image element instead of Text element until the issue has been fixed.

Task-number:
Reviewed-by: Yann Bodson
---
 tests/auto/declarative/qdeclarativestates/data/image.png  | Bin 0 -> 173 bytes
 tests/auto/declarative/qdeclarativestates/data/reset.qml  |   9 ++++-----
 .../qdeclarativestates/tst_qdeclarativestates.cpp         |  13 ++++++-------
 3 files changed, 10 insertions(+), 12 deletions(-)
 create mode 100644 tests/auto/declarative/qdeclarativestates/data/image.png

diff --git a/tests/auto/declarative/qdeclarativestates/data/image.png b/tests/auto/declarative/qdeclarativestates/data/image.png
new file mode 100644
index 0000000..ed1833c
Binary files /dev/null and b/tests/auto/declarative/qdeclarativestates/data/image.png differ
diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml
index 8799c97..a140ffa 100644
--- a/tests/auto/declarative/qdeclarativestates/data/reset.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml
@@ -3,17 +3,16 @@ import QtQuick 1.0
 Rectangle {
     width: 640
     height: 480
-    Text {
-        id: theText
+    Image {
+        id: image
         width: 40
-        wrapMode: Text.WordWrap
-        text: "a text string that is longer than 40 pixels"
+        source: "image.png"
     }
 
     states: State {
         name: "state1"
         PropertyChanges {
-            target: theText
+            target: image
             width: undefined
         }
     }
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index b8409a5..870842c 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -44,7 +44,6 @@
 #include <private/qdeclarativeanchors_p_p.h>
 #include <private/qdeclarativerectangle_p.h>
 #include <private/qdeclarativeimage_p.h>
-#include <private/qdeclarativetext_p.h>
 #include <private/qdeclarativepropertychanges_p.h>
 #include <private/qdeclarativestategroup_p.h>
 #include <private/qdeclarativeitem_p.h>
@@ -1126,15 +1125,15 @@ void tst_qdeclarativestates::reset()
     QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
     QVERIFY(rect != 0);
 
-    QDeclarativeText *text = rect->findChild<QDeclarativeText*>();
-    QVERIFY(text != 0);
-    QCOMPARE(text->width(), qreal(40.));
-    QVERIFY(text->width() < text->height());
+    QDeclarativeImage *image = rect->findChild<QDeclarativeImage*>();
+    QVERIFY(image != 0);
+    QCOMPARE(image->width(), qreal(40.));
+    QCOMPARE(image->height(), qreal(20.));
 
     QDeclarativeItemPrivate::get(rect)->setState("state1");
 
-    QVERIFY(text->width() > 41);
-    QVERIFY(text->width() > text->height());
+    QCOMPARE(image->width(), 20.0);
+    QCOMPARE(image->height(), qreal(20.));
 }
 
 void tst_qdeclarativestates::illegalObjectCreation()
-- 
cgit v0.12


From 80eb3ebbfe24738163532494e8866ac20fd1b0e4 Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen <miikka.heikkinen@digia.com>
Date: Thu, 16 Dec 2010 16:03:13 +0200
Subject: Fix incorrect file name case for OpenGL libraries in symbian.conf.

To support linux builds, file names must be cased correctly.

Task-number: QT-4375
Reviewed-by: Miikka Heikkinen
---
 mkspecs/common/symbian/symbian.conf | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 707335c..00cf0d7 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -70,12 +70,12 @@ QMAKE_LIBS_CORE         = $$QMAKE_LIBS -lefsrv -lhal -lbafl
 QMAKE_LIBS_GUI          = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -lapparc -lcentralrepository
 QMAKE_LIBS_NETWORK      = 
 QMAKE_LIBS_EGL          = -llibEGL
-QMAKE_LIBS_OPENGL       = -llibglesv2
+QMAKE_LIBS_OPENGL       = -llibGLESv2
 QMAKE_LIBS_OPENGL_ES1   = -llibGLESv1_CM
-QMAKE_LIBS_OPENGL_ES2   = -llibglesv2
-QMAKE_LIBS_OPENGL_QT     = -llibglesv2 -lcone -lws32
+QMAKE_LIBS_OPENGL_ES2   = -llibGLESv2
+QMAKE_LIBS_OPENGL_QT     = -llibGLESv2 -lcone -lws32
 QMAKE_LIBS_OPENGL_ES1_QT = -llibGLESv1_CM -lcone -lws32
-QMAKE_LIBS_OPENGL_ES2_QT = -llibglesv2 -lcone -lws32
+QMAKE_LIBS_OPENGL_ES2_QT = -llibGLESv2 -lcone -lws32
 QMAKE_LIBS_OPENVG       = -llibOpenVG -lfbscli -lbitgdi -lgdi
 QMAKE_LIBS_THREAD       = -llibpthread
 QMAKE_LIBS_COMPAT       = 
-- 
cgit v0.12


From b54efea2e97baac1d9442e829be2d6fb322c5085 Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen <miikka.heikkinen@digia.com>
Date: Fri, 17 Dec 2010 11:37:52 +0200
Subject: Use relative include instead of absolute in default qmake.conf

Absolute include path breaks QtP releases which copy mkspecs under
epoc32 and do not necessarily have the sources available in the
original absolute path and can't patch the paths either at
installation time.

Task-number: QTBUG-16172
Reviewed-by: Oswald Buddenhagen
---
 tools/configure/configureapp.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index c967dad..915a56d 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3267,8 +3267,14 @@ void Configure::generateConfigfiles()
     if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) {
         QTextStream qmakeConfStream;
         qmakeConfStream.setDevice(&qmakeConfFile);
+        // While QMAKESPEC_ORIGINAL being relative or absolute doesn't matter for the
+        // primary use of this variable by qmake to identify the original mkspec, the
+        // variable is also used for few special cases where the absolute path is required.
+        // Conversely, the include of the original qmake.conf must be done using relative path,
+        // as some Qt binary deployments are done in a manner that doesn't allow for patching
+        // the paths at the installation time.
         qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl;
-        qmakeConfStream << "include(" << pltSpec << "/qmake.conf)" << endl;
+        qmakeConfStream << "include(" << "../" << spec << "/qmake.conf)" << endl << endl;
         qmakeConfStream.flush();
         qmakeConfFile.close();
     }
-- 
cgit v0.12


From 184458394b344947bea1852ab88561dc60db6038 Mon Sep 17 00:00:00 2001
From: Aaron McCarthy <aaron.mccarthy@nokia.com>
Date: Mon, 20 Dec 2010 10:32:54 +1000
Subject: Quiet unused parameter warnings.

---
 src/plugins/bearer/icd/qicdengine.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp
index a5a183b..96827f3 100644
--- a/src/plugins/bearer/icd/qicdengine.cpp
+++ b/src/plugins/bearer/icd/qicdengine.cpp
@@ -966,6 +966,9 @@ void QIcdEngine::connectionStateSignalsSlot(QDBusMessage msg)
 void QIcdEngine::icdServiceOwnerChanged(const QString &serviceName, const QString &oldOwner,
                                         const QString &newOwner)
 {
+    Q_UNUSED(serviceName);
+    Q_UNUSED(oldOwner);
+
     QMutexLocker locker(&mutex);
 
     if (newOwner.isEmpty()) {
-- 
cgit v0.12


From 28973e50710cfcd96da037cdad7f46700221c185 Mon Sep 17 00:00:00 2001
From: Jason McDonald <jason.mcdonald@nokia.com>
Date: Mon, 20 Dec 2010 15:50:41 +1000
Subject: Make it clear which security updates are needed for Visual Studio
 2005.

As well as Service Pack 1, the compiler also needs four additional
security updates in order to work correctly with Qt's pre-built binary
package.

Task-number: QTBUG-7633
Reviewed-by: Toby Tomkins
---
 doc/src/getting-started/installation.qdoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index a68310c..5b009cd 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -963,6 +963,7 @@ We hope you will enjoy using Qt.
     first install the Visual Studio Service Pack 1 available
     \l{http://www.microsoft.com/downloads/details.aspx?FamilyId=BB4A75AB-E2D4-4C96-B39D-37BAF6B5B1DC&amp;displaylang=en}{here}
     to avoid runtime conflicts.
+    Additionally, you must use the Check for Updates feature in the Help menu of the Visual Studio 2005 IDE to apply at least the following security updates: KB937061, KB971023, KB971090, KB973673.
 
     If you are using a source edition of Qt, you must first install Perl so
     that the syncqt script invoked by configure can be executed. You can download
-- 
cgit v0.12