From 05c20cbf719746f295ac4c3ebb484ea6c3555d70 Mon Sep 17 00:00:00 2001
From: axis <qt-info@nokia.com>
Date: Thu, 11 Mar 2010 19:21:29 +0100
Subject: Fixed broken test.

When the new QLineEdit got assigned to the proxy, the event spy was
not updated, meaning that all the remaining tests would pass
regardless of whether more events came in or not. Fixed by adding the
line edits in separate blocks.

RevBy:    Trust me
---
 .../tst_qgraphicsproxywidget.cpp                   | 133 +++++++++++----------
 1 file changed, 71 insertions(+), 62 deletions(-)

diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 69d2ad2..17311e2 100644
--- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -3426,85 +3426,94 @@ void tst_QGraphicsProxyWidget::clickFocus()
     scene.setItemIndexMethod(QGraphicsScene::NoIndex);
     QGraphicsProxyWidget *proxy = scene.addWidget(new QLineEdit);
 
-    EventSpy proxySpy(proxy);
-    EventSpy widgetSpy(proxy->widget());
-
     QGraphicsView view(&scene);
-    view.setFrameStyle(0);
-    view.resize(300, 300);
-    view.show();
-#ifdef Q_WS_X11
-    qt_x11_wait_for_window_manager(&view);
-#endif
-    QApplication::setActiveWindow(&view);
-    QTest::qWait(25);
-    QTRY_COMPARE(QApplication::activeWindow(), &view);
 
-    QVERIFY(!proxy->hasFocus());
-    QVERIFY(!proxy->widget()->hasFocus());
+    {
+        EventSpy proxySpy(proxy);
+        EventSpy widgetSpy(proxy->widget());
 
-    QCOMPARE(proxySpy.counts[QEvent::FocusIn], 0);
-    QCOMPARE(proxySpy.counts[QEvent::FocusOut], 0);
-    QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 0);
-    QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 0);
+        view.setFrameStyle(0);
+        view.resize(300, 300);
+        view.show();
+#ifdef Q_WS_X11
+        qt_x11_wait_for_window_manager(&view);
+#endif
+        QApplication::setActiveWindow(&view);
+        QTest::qWait(25);
+        QTRY_COMPARE(QApplication::activeWindow(), &view);
 
-    QPointF lineEditCenter = proxy->mapToScene(proxy->boundingRect().center());
-    // Spontaneous mouse click sets focus on a clickable widget.
-    for (int retry = 0; retry < 50 && !proxy->hasFocus(); retry++)
-        QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter));
-    QVERIFY(proxy->hasFocus());
-    QVERIFY(proxy->widget()->hasFocus());
-    QCOMPARE(proxySpy.counts[QEvent::FocusIn], 1);
-    QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 1);
+        QVERIFY(!proxy->hasFocus());
+        QVERIFY(!proxy->widget()->hasFocus());
 
-    scene.setFocusItem(0);
-    QVERIFY(!proxy->hasFocus());
-    QVERIFY(!proxy->widget()->hasFocus());
-    QCOMPARE(proxySpy.counts[QEvent::FocusOut], 1);
-    QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 1);
+        QCOMPARE(proxySpy.counts[QEvent::FocusIn], 0);
+        QCOMPARE(proxySpy.counts[QEvent::FocusOut], 0);
+        QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 0);
+        QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 0);
 
-    // Non-spontaneous mouse click sets focus if the widget has been clicked before
-    {
-        QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
-        event.setScenePos(lineEditCenter);
-        event.setButton(Qt::LeftButton);
-        qApp->sendEvent(&scene, &event);
+        QPointF lineEditCenter = proxy->mapToScene(proxy->boundingRect().center());
+        // Spontaneous mouse click sets focus on a clickable widget.
+        for (int retry = 0; retry < 50 && !proxy->hasFocus(); retry++)
+            QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter));
         QVERIFY(proxy->hasFocus());
         QVERIFY(proxy->widget()->hasFocus());
-        QCOMPARE(proxySpy.counts[QEvent::FocusIn], 2);
-        QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 2);
+        QCOMPARE(proxySpy.counts[QEvent::FocusIn], 1);
+        QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 1);
+
+        scene.setFocusItem(0);
+        QVERIFY(!proxy->hasFocus());
+        QVERIFY(!proxy->widget()->hasFocus());
+        QCOMPARE(proxySpy.counts[QEvent::FocusOut], 1);
+        QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 1);
+
+        // Non-spontaneous mouse click sets focus if the widget has been clicked before
+        {
+            QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
+            event.setScenePos(lineEditCenter);
+            event.setButton(Qt::LeftButton);
+            qApp->sendEvent(&scene, &event);
+            QVERIFY(proxy->hasFocus());
+            QVERIFY(proxy->widget()->hasFocus());
+            QCOMPARE(proxySpy.counts[QEvent::FocusIn], 2);
+            QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 2);
+        }
     }
 
     scene.setFocusItem(0);
     proxy->setWidget(new QLineEdit); // resets focusWidget
-    QVERIFY(!proxy->hasFocus());
-    QVERIFY(!proxy->widget()->hasFocus());
-    QCOMPARE(proxySpy.counts[QEvent::FocusOut], 2);
-    QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 2);
 
-    // Non-spontaneous mouse click does not set focus on the embedded widget.
     {
-        QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
-        event.setScenePos(lineEditCenter);
-        event.setButton(Qt::LeftButton);
-        qApp->sendEvent(&scene, &event);
+        QPointF lineEditCenter = proxy->mapToScene(proxy->boundingRect().center());
+        EventSpy proxySpy(proxy);
+        EventSpy widgetSpy(proxy->widget());
         QVERIFY(!proxy->hasFocus());
         QVERIFY(!proxy->widget()->hasFocus());
-        QCOMPARE(proxySpy.counts[QEvent::FocusIn], 2);
-        QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 2);
-    }
+        QCOMPARE(proxySpy.counts[QEvent::FocusOut], 0);
+        QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 0);
 
-    scene.setFocusItem(0);
-    QVERIFY(!proxy->hasFocus());
-    QVERIFY(!proxy->widget()->hasFocus());
-    QCOMPARE(proxySpy.counts[QEvent::FocusOut], 2);
-    QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 2);
-
-    // Spontaneous click on non-clickable widget does not give focus.
-    proxy->widget()->setFocusPolicy(Qt::NoFocus);
-    QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter));
-    QVERIFY(!proxy->hasFocus());
-    QVERIFY(!proxy->widget()->hasFocus());
+        // Non-spontaneous mouse click does not set focus on the embedded widget.
+        {
+            QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
+            event.setScenePos(lineEditCenter);
+            event.setButton(Qt::LeftButton);
+            qApp->sendEvent(&scene, &event);
+            QVERIFY(!proxy->hasFocus());
+            QVERIFY(!proxy->widget()->hasFocus());
+            QCOMPARE(proxySpy.counts[QEvent::FocusIn], 0);
+            QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 0);
+        }
+
+        scene.setFocusItem(0);
+        QVERIFY(!proxy->hasFocus());
+        QVERIFY(!proxy->widget()->hasFocus());
+        QCOMPARE(proxySpy.counts[QEvent::FocusOut], 0);
+        QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 0);
+
+        // Spontaneous click on non-clickable widget does not give focus.
+        proxy->widget()->setFocusPolicy(Qt::NoFocus);
+        QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter));
+        QVERIFY(!proxy->hasFocus());
+        QVERIFY(!proxy->widget()->hasFocus());
+    }
 }
 
 void tst_QGraphicsProxyWidget::windowFrameMargins()
-- 
cgit v0.12


From e483886bcfcf7252af9ac7cc89de15f912bf69da Mon Sep 17 00:00:00 2001
From: axis <qt-info@nokia.com>
Date: Tue, 9 Mar 2010 15:32:05 +0100
Subject: Fixed a bug where a proxy widget received FocusIn over and over.

This also fixed the issue where an input panel would not be requested
by the widget, because it thought it was being focused over and over,
instead of focused, and then clicked (focus followed by click is
default input panel popup behavior on Symbian).

AutoTest: Included and passed
RevBy:    yoann
RevBy:    Jan-Arve
---
 src/gui/graphicsview/qgraphicsproxywidget.cpp                |  5 ++++-
 src/gui/graphicsview/qgraphicsproxywidget_p.h                |  1 +
 src/gui/kernel/qwidget.cpp                                   |  2 ++
 tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 12 ++++++++++++
 4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp
index a39ccfd..483eb62 100644
--- a/src/gui/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp
@@ -1315,6 +1315,8 @@ void QGraphicsProxyWidget::focusInEvent(QFocusEvent *event)
         return;
     }
 
+    d->proxyIsGivingFocus = true;
+
     switch (event->reason()) {
     case Qt::TabFocusReason: {
 	if (QWidget *focusChild = d->findFocusChild(0, true))
@@ -1328,10 +1330,11 @@ void QGraphicsProxyWidget::focusInEvent(QFocusEvent *event)
     default:
 	if (d->widget && d->widget->focusWidget()) {
 	    d->widget->focusWidget()->setFocus(event->reason());
-	    return;
         }
         break;
     }
+
+    d->proxyIsGivingFocus = false;
 }
 
 /*!
diff --git a/src/gui/graphicsview/qgraphicsproxywidget_p.h b/src/gui/graphicsview/qgraphicsproxywidget_p.h
index 60eb058..8aed363 100644
--- a/src/gui/graphicsview/qgraphicsproxywidget_p.h
+++ b/src/gui/graphicsview/qgraphicsproxywidget_p.h
@@ -118,6 +118,7 @@ public:
     quint32 styleChangeMode : 2;
     quint32 paletteChangeMode : 2;
     quint32 focusFromWidgetToProxy : 1;
+    quint32 proxyIsGivingFocus : 1;
 };
 
 QT_END_NAMESPACE
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index b5ccb3e..cd943cd 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -6123,6 +6123,8 @@ void QWidget::setFocus(Qt::FocusReason reason)
             previousProxyFocus = topData->proxyWidget->widget()->focusWidget();
             if (previousProxyFocus && previousProxyFocus->focusProxy())
                 previousProxyFocus = previousProxyFocus->focusProxy();
+            if (previousProxyFocus == this && !topData->proxyWidget->d_func()->proxyIsGivingFocus)
+                return;
         }
     }
 #endif
diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 17311e2..23b3458 100644
--- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -3513,6 +3513,18 @@ void tst_QGraphicsProxyWidget::clickFocus()
         QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter));
         QVERIFY(!proxy->hasFocus());
         QVERIFY(!proxy->widget()->hasFocus());
+
+        // Multiple clicks should only result in one FocusIn.
+        proxy->widget()->setFocusPolicy(Qt::StrongFocus);
+        scene.setFocusItem(0);
+        QVERIFY(!proxy->hasFocus());
+        QVERIFY(!proxy->widget()->hasFocus());
+        QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter));
+        QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter));
+        QVERIFY(proxy->hasFocus());
+        QVERIFY(proxy->widget()->hasFocus());
+        QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 1);
+        QCOMPARE(proxySpy.counts[QEvent::FocusIn], 1);
     }
 }
 
-- 
cgit v0.12


From 7343939f58d6ee3c695ad0a62248fda04f58e1a2 Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen <miikka.heikkinen@digia.com>
Date: Wed, 17 Mar 2010 15:16:25 +0200
Subject: Useful support for -qtlibinfix configure parameter in Symbian

Configure parameter -qtlibinfix will now change also plugin names
of plugins built and installed with Qt in Symbian.
Default plugin path is changed to: /resource/qt<libinfix>/plugins.
Other plugins besides the ones installed with Qt are not renamed.

With infixed configuration, Qt can be installed on a phone that already
has a Qt installed on ROM without interfering with the ROM version of
Qt.

Note that since s60main.rsc resource cannot deployed with infixed Qt,
and infixing it is somewhat problematic, currently the phone needs
to have proper Qt installation, too, for infixed Qt to work.
It also means that any changes to Qt that would affect s60main.rsc
cannot be tested on real device using infixed builds. Since this file
is unlikely to need changing, this should not be a big problem.

Task-number: QTBUG-9065
Reviewed-by: Jani Hautakangas
---
 demos/embedded/fluidlauncher/fluidlauncher.pro | 10 ++--
 mkspecs/features/symbian/data_caging_paths.prf |  2 +-
 mkspecs/features/symbian/default_post.prf      |  2 +-
 mkspecs/features/symbian/qt.prf                |  2 +-
 src/corelib/kernel/qcore_symbian_p.cpp         | 18 ++++++
 src/plugins/qpluginbase.pri                    |  1 +
 src/plugins/s60/3_1/3_1.pro                    |  2 +-
 src/plugins/s60/3_2/3_2.pro                    |  2 +-
 src/plugins/s60/5_0/5_0.pro                    |  2 +-
 src/s60installs/s60installs.pro                | 79 +++++++++++++++-----------
 tools/configure/configureapp.cpp               |  6 ++
 11 files changed, 82 insertions(+), 44 deletions(-)

diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index f71388c..535b5bf 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -164,10 +164,12 @@ symbian {
         mifs.sources += \
             $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.mif
 
-        # Since Fluidlauncher itself doesn't link webkit, we won't get dependency automatically
-        executables.pkg_prerules += \
-            "; Dependency to Qt Webkit" \
-            "(0x200267C2), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION},  {\"QtWebKit\"}"
+        isEmpty(QT_LIBINFIX) {
+            # Since Fluidlauncher itself doesn't link webkit, we won't get dependency automatically
+            executables.pkg_prerules += \
+                "; Dependency to Qt Webkit" \
+                "(0x200267C2), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION},  {\"QtWebKit\"}"
+        }
     }
 
     contains(QT_CONFIG, phonon) {
diff --git a/mkspecs/features/symbian/data_caging_paths.prf b/mkspecs/features/symbian/data_caging_paths.prf
index 3ed5661..6f40bb5 100644
--- a/mkspecs/features/symbian/data_caging_paths.prf
+++ b/mkspecs/features/symbian/data_caging_paths.prf
@@ -74,7 +74,7 @@ exists($${EPOCROOT}epoc32/include/data_caging_paths.prf) {
     BOOTDATA_DIR            = /resource/bootdata
 }
 
-isEmpty(QT_PLUGINS_BASE_DIR): QT_PLUGINS_BASE_DIR = /$$RESOURCE_FILES_DIR/qt/plugins
+isEmpty(QT_PLUGINS_BASE_DIR): QT_PLUGINS_BASE_DIR = /$$RESOURCE_FILES_DIR/qt$${QT_LIBINFIX}/plugins
 isEmpty(HW_ZDIR): HW_ZDIR = epoc32/data/z
 isEmpty(REG_RESOURCE_DIR): REG_RESOURCE_DIR = /private/10003a3f/apps
 isEmpty(REG_RESOURCE_IMPORT_DIR): REG_RESOURCE_IMPORT_DIR = /private/10003a3f/import/apps
\ No newline at end of file
diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf
index 7c9e8ee..0c952b5 100644
--- a/mkspecs/features/symbian/default_post.prf
+++ b/mkspecs/features/symbian/default_post.prf
@@ -5,7 +5,7 @@ contains(TEMPLATE, ".*app") {
         QMAKE_LIBS +=
     } else:contains(QT, gui):contains(CONFIG,qt) {
         S60MAIN_LIBS = -leuser
-        QMAKE_LIBS += -lqtmain.lib $$S60MAIN_LIBS
+        QMAKE_LIBS += -lqtmain$${QT_LIBINFIX}.lib $$S60MAIN_LIBS
     } else {
         QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY
     }
diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf
index 99f5ece..275b86a 100644
--- a/mkspecs/features/symbian/qt.prf
+++ b/mkspecs/features/symbian/qt.prf
@@ -24,7 +24,7 @@ INCLUDEPATH = $$PREPEND_INCLUDEPATH $$INCLUDEPATH
 # Add dependency to Qt package to all other projects besides Qt libs.
 # Note: Qt libs with full capabilities has UID3 of 0x2001E61C,
 #       while self-signed version typically has temporary UID3 of 0xE001E61C.
-contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0xE001E61C) {
+contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0xE001E61C):isEmpty(QT_LIBINFIX) {
     default_deployment.pkg_prerules += \
         "; Default dependency to Qt libraries" \
         "(0x2001E61C), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION},  {\"Qt\"}"
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp
index 0257ac4..a0a80c8 100644
--- a/src/corelib/kernel/qcore_symbian_p.cpp
+++ b/src/corelib/kernel/qcore_symbian_p.cpp
@@ -132,9 +132,27 @@ private:
     void init()
     {
 #ifdef Q_WS_S60
+#  if defined(QT_LIBINFIX)
+#    define S60_LIBNAME_3_1 "qts60plugin_3_1" QT_LIBINFIX ".dll"
+#    define S60_LIBNAME_3_2 "qts60plugin_3_2" QT_LIBINFIX ".dll"
+#    define S60_LIBNAME_5_0 "qts60plugin_5_0" QT_LIBINFIX ".dll"
+
+        TPtrC8 ptrLibName_3_1(reinterpret_cast<const TUint8 *>(S60_LIBNAME_3_1));
+        TPtrC8 ptrLibName_3_2(reinterpret_cast<const TUint8 *>(S60_LIBNAME_3_2));
+        TPtrC8 ptrLibName_5_0(reinterpret_cast<const TUint8 *>(S60_LIBNAME_5_0));
+
+        TFileName KLibName_3_1;
+        TFileName KLibName_3_2;
+        TFileName KLibName_5_0;
+
+        KLibName_3_1.Copy(ptrLibName_3_1);
+        KLibName_3_2.Copy(ptrLibName_3_2);
+        KLibName_5_0.Copy(ptrLibName_5_0);
+#  else
         _LIT(KLibName_3_1, "qts60plugin_3_1.dll");
         _LIT(KLibName_3_2, "qts60plugin_3_2.dll");
         _LIT(KLibName_5_0, "qts60plugin_5_0.dll");
+#  endif
         TPtrC libName;
         TInt uidValue;
         switch (QSysInfo::s60Version()) {
diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri
index 3fd3657..f6a8f87 100644
--- a/src/plugins/qpluginbase.pri
+++ b/src/plugins/qpluginbase.pri
@@ -17,5 +17,6 @@ wince*:LIBS += $$QMAKE_LIBS_GUI
 symbian: {
     TARGET.EPOCALLOWDLLDATA=1
     TARGET.CAPABILITY = All -Tcb
+    TARGET = $${TARGET}$${QT_LIBINFIX}
     load(armcc_warnings)
 }
diff --git a/src/plugins/s60/3_1/3_1.pro b/src/plugins/s60/3_1/3_1.pro
index 58ff5ce..9437f3d 100644
--- a/src/plugins/s60/3_1/3_1.pro
+++ b/src/plugins/s60/3_1/3_1.pro
@@ -1,6 +1,6 @@
 include(../s60pluginbase.pri)
 
-TARGET  = qts60plugin_3_1
+TARGET  = qts60plugin_3_1$${QT_LIBINFIX}
 
 SOURCES += ../src/qlocale_3_1.cpp \
     ../src/qdesktopservices_3_1.cpp \
diff --git a/src/plugins/s60/3_2/3_2.pro b/src/plugins/s60/3_2/3_2.pro
index 468197d..9424c7c 100644
--- a/src/plugins/s60/3_2/3_2.pro
+++ b/src/plugins/s60/3_2/3_2.pro
@@ -1,6 +1,6 @@
 include(../s60pluginbase.pri)
 
-TARGET  = qts60plugin_3_2
+TARGET  = qts60plugin_3_2$${QT_LIBINFIX}
 
 contains(S60_VERSION, 3.1) {
     SOURCES += ../src/qlocale_3_1.cpp \
diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro
index 86e3dc9..c787ab3 100644
--- a/src/plugins/s60/5_0/5_0.pro
+++ b/src/plugins/s60/5_0/5_0.pro
@@ -1,6 +1,6 @@
 include(../s60pluginbase.pri)
 
-TARGET  = qts60plugin_5_0
+TARGET  = qts60plugin_5_0$${QT_LIBINFIX}
 
 contains(S60_VERSION, 3.1) {
     SOURCES += ../src/qlocale_3_1.cpp \
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 1b1e965..ec03673 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -7,37 +7,48 @@ symbian: {
     SUBDIRS=
     # WARNING: Changing TARGET name will break Symbian SISX upgrade functionality
     # DO NOT TOUCH TARGET VARIABLE IF YOU ARE NOT SURE WHAT YOU ARE DOING
-    TARGET = "Qt"
-    TARGET.UID3 = 0x2001E61C
+    TARGET = "Qt$${QT_LIBINFIX}"
+
+    isEmpty(QT_LIBINFIX) {
+        TARGET.UID3 = 0x2001E61C
+
+        # s60main.rsc  and sqlite3 are expected to be already found on phone if
+        # infixed configuration is built.
+        DEPLOYMENT += qtresources
+
+        sqlitedeployment = \
+            "; Deploy sqlite onto phone that does not have it already" \
+            "@\"$$PWD/sqlite3.sis\", (0x2002af5f)"
+        qtlibraries.pkg_postrules += sqlitedeployment
+    } else {
+        # Always use experimental UID for infixed configuration to avoid UID clash
+        TARGET.UID3 = 0xE001E61C
+    }
     VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
 
     qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc
     qtresources.path = c:$$APP_RESOURCE_DIR
 
     qtlibraries.sources = \
-        QtCore.dll \
-        QtXml.dll \
-        QtGui.dll \
-        QtNetwork.dll \
-        QtTest.dll \
-        QtSql.dll
+        QtCore$${QT_LIBINFIX}.dll \
+        QtXml$${QT_LIBINFIX}.dll \
+        QtGui$${QT_LIBINFIX}.dll \
+        QtNetwork$${QT_LIBINFIX}.dll \
+        QtTest$${QT_LIBINFIX}.dll \
+        QtSql$${QT_LIBINFIX}.dll
 
     qts60plugindeployment = \
         "IF package(0x1028315F)" \
-        "   \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \
+        "   \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
         "ELSEIF package(0x102752AE)" \
-        "   \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \
+        "   \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2$${QT_LIBINFIX}.dll\"" \
         "ELSEIF package(0x102032BE)" \
-        "   \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \
+        "   \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_1$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1$${QT_LIBINFIX}.dll\"" \
         "ELSE" \
-        "   \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \
+        "   \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
         "ENDIF"
     qtlibraries.pkg_postrules += qts60plugindeployment
 
-    sqlitedeployment = \
-        "; Deploy sqlite onto phone that does not have it already" \
-        "@\"$$PWD/sqlite3.sis\", (0x2002af5f)"
-    qtlibraries.pkg_postrules += sqlitedeployment
 
     qtlibraries.path = c:/sys/bin
 
@@ -61,18 +72,18 @@ symbian: {
     }
     qtlibraries.pkg_prerules += "(0x2002af5f), 0, 5, 0, {\"sqlite3\"}"
 
-    !contains(QT_CONFIG, no-jpeg): imageformats_plugins.sources += qjpeg.dll
-    !contains(QT_CONFIG, no-gif):  imageformats_plugins.sources += qgif.dll
-    !contains(QT_CONFIG, no-mng):  imageformats_plugins.sources += qmng.dll
-    !contains(QT_CONFIG, no-tiff): imageformats_plugins.sources += qtiff.dll
-    !contains(QT_CONFIG, no-ico):  imageformats_plugins.sources += qico.dll
+    !contains(QT_CONFIG, no-jpeg): imageformats_plugins.sources += qjpeg$${QT_LIBINFIX}.dll
+    !contains(QT_CONFIG, no-gif):  imageformats_plugins.sources += qgif$${QT_LIBINFIX}.dll
+    !contains(QT_CONFIG, no-mng):  imageformats_plugins.sources += qmng$${QT_LIBINFIX}.dll
+    !contains(QT_CONFIG, no-tiff): imageformats_plugins.sources += qtiff$${QT_LIBINFIX}.dll
+    !contains(QT_CONFIG, no-ico):  imageformats_plugins.sources += qico$${QT_LIBINFIX}.dll
     imageformats_plugins.path = c:$$QT_PLUGINS_BASE_DIR/imageformats
 
-    codecs_plugins.sources = qcncodecs.dll qjpcodecs.dll qtwcodecs.dll qkrcodecs.dll
+    codecs_plugins.sources = qcncodecs$${QT_LIBINFIX}.dll qjpcodecs$${QT_LIBINFIX}.dll qtwcodecs$${QT_LIBINFIX}.dll qkrcodecs$${QT_LIBINFIX}.dll
     codecs_plugins.path = c:$$QT_PLUGINS_BASE_DIR/codecs
 
     contains(QT_CONFIG, phonon-backend) {
-        phonon_backend_plugins.sources += phonon_mmf.dll
+        phonon_backend_plugins.sources += phonon_mmf$${QT_LIBINFIX}.dll
 
         phonon_backend_plugins.path = c:$$QT_PLUGINS_BASE_DIR/phonon_backend
         DEPLOYMENT += phonon_backend_plugins
@@ -82,40 +93,40 @@ symbian: {
     qtbackup.sources = backup_registration.xml
     qtbackup.path = c:/private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,)
 
-    DEPLOYMENT += qtresources qtlibraries qtbackup imageformats_plugins codecs_plugins graphicssystems_plugins
+    DEPLOYMENT += qtlibraries qtbackup imageformats_plugins codecs_plugins graphicssystems_plugins
 
     contains(QT_CONFIG, svg): {
-       qtlibraries.sources += QtSvg.dll
-       imageformats_plugins.sources += qsvg.dll
-       iconengines_plugins.sources = qsvgicon.dll
+       qtlibraries.sources += QtSvg$${QT_LIBINFIX}.dll
+       imageformats_plugins.sources += qsvg$${QT_LIBINFIX}.dll
+       iconengines_plugins.sources = qsvgicon$${QT_LIBINFIX}.dll
        iconengines_plugins.path = c:$$QT_PLUGINS_BASE_DIR/iconengines
        DEPLOYMENT += iconengines_plugins
     }
 
     contains(QT_CONFIG, phonon): {
-       qtlibraries.sources += phonon.dll
+       qtlibraries.sources += phonon$${QT_LIBINFIX}.dll
     }
 
     contains(QT_CONFIG, script): {
-        qtlibraries.sources += QtScript.dll
+        qtlibraries.sources += QtScript$${QT_LIBINFIX}.dll
     }
 
     contains(QT_CONFIG, xmlpatterns): {
-       qtlibraries.sources += QtXmlPatterns.dll
+       qtlibraries.sources += QtXmlPatterns$${QT_LIBINFIX}.dll
     }
 
     contains(QT_CONFIG, declarative): {
-        qtlibraries.sources += QtDeclarative.dll
+        qtlibraries.sources += QtDeclarative$${QT_LIBINFIX}.dll
     }
 
     graphicssystems_plugins.path = c:$$QT_PLUGINS_BASE_DIR/graphicssystems
     contains(QT_CONFIG, openvg) {
-        qtlibraries.sources += QtOpenVG.dll
-        graphicssystems_plugins.sources += qvggraphicssystem.dll
+        qtlibraries.sources += QtOpenVG$${QT_LIBINFIX}.dll
+        graphicssystems_plugins.sources += qvggraphicssystem$${QT_LIBINFIX}.dll
     }
 
     contains(QT_CONFIG, multimedia) {
-        qtlibraries.sources += QtMultimedia.dll
+        qtlibraries.sources += QtMultimedia$${QT_LIBINFIX}.dll
     }
 
     BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)"
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 2555015..b35f454 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -969,6 +969,10 @@ void Configure::parseCmdLine()
             if(i==argCount)
                 break;
             dictionary[ "QT_LIBINFIX" ] = configCmdLine.at(i);
+            if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
+                dictionary[ "QT_INSTALL_PLUGINS" ] =
+                    QString("\\resource\\qt%1\\plugins").arg(dictionary[ "QT_LIBINFIX" ]);
+            }
         } else if( configCmdLine.at(i) == "-D" ) {
             ++i;
             if (i==argCount)
@@ -3023,6 +3027,8 @@ void Configure::generateConfigfiles()
             qconfigList += "QT_NO_CRASHHANDLER";
             qconfigList += "QT_NO_PRINTER";
             qconfigList += "QT_NO_SYSTEMTRAYICON";
+            if (dictionary.contains("QT_LIBINFIX"))
+                tmpStream << QString("#define QT_LIBINFIX \"%1\"").arg(dictionary["QT_LIBINFIX"]) << endl;
         }
 
         qconfigList.sort();
-- 
cgit v0.12


From 86b95444d6c8c37335524e2b0302fa6cc282b9e8 Mon Sep 17 00:00:00 2001
From: Jason Barron <jbarron@trolltech.com>
Date: Thu, 18 Mar 2010 09:32:04 +0100
Subject: Build OpenVG on Symbian with QVG_RECREATE_ON_SIZE_CHANGE.

If the size of the window changes, then there is a chance that this
will require a re-allocation so it's better to handle the re-allocation
here when the window size has changed because we don't want the error
to occur in eglSwapBuffers.

Reviewed-by: TrustMe
---
 src/openvg/openvg.pro | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro
index c8c9917..3790492 100644
--- a/src/openvg/openvg.pro
+++ b/src/openvg/openvg.pro
@@ -33,6 +33,8 @@ contains(QT_CONFIG, egl) {
         qwindowsurface_vgegl.cpp
 }
 
+symbian: DEFINES += QVG_RECREATE_ON_SIZE_CHANGE
+
 include(../qbase.pri)
 
 unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
-- 
cgit v0.12


From f1bac8599dab92cfe6ad65c534a2a7fd133a80a5 Mon Sep 17 00:00:00 2001
From: Jason Barron <jbarron@trolltech.com>
Date: Thu, 18 Mar 2010 10:37:07 +0100
Subject: Update configure binary after -libinfix changes for Symbian.

---
 configure.exe | Bin 1212416 -> 1205248 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/configure.exe b/configure.exe
index 3e51833..5fb2b42 100755
Binary files a/configure.exe and b/configure.exe differ
-- 
cgit v0.12


From 8ae6867b82bfdc391dab6d97945dea7c7436ef25 Mon Sep 17 00:00:00 2001
From: axis <qt-info@nokia.com>
Date: Thu, 18 Mar 2010 11:34:39 +0100
Subject: Made runonphone flush all application output.

RevBy:    Shane Kearns
---
 tools/runonphone/trksignalhandler.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/runonphone/trksignalhandler.cpp b/tools/runonphone/trksignalhandler.cpp
index 4fa79f1..138ebc9 100644
--- a/tools/runonphone/trksignalhandler.cpp
+++ b/tools/runonphone/trksignalhandler.cpp
@@ -125,7 +125,7 @@ void TrkSignalHandler::finished()
 
 void TrkSignalHandler::applicationOutputReceived(const QString &output)
 {
-    d->out << output;
+    d->out << output << flush;
 }
 
 void TrkSignalHandler::copyProgress(int percent)
-- 
cgit v0.12