summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-27 09:44:16 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-27 09:44:16 (GMT)
commit53f5b448f5dd33459837536a855463c917b4c14e (patch)
tree33aaebb5e05dc056de5b7f733ad0ee9589ebcba2
parent0ec3281f7deb9a0c5bdc26481bf5c0fb8d3ae750 (diff)
parenta8d405f470edb41b868142879a978d8976bc766a (diff)
downloadQt-53f5b448f5dd33459837536a855463c917b4c14e.zip
Qt-53f5b448f5dd33459837536a855463c917b4c14e.tar.gz
Qt-53f5b448f5dd33459837536a855463c917b4c14e.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Moved the partial deployment section to qbase.pri. Made the Symbian menu close when switching native focus.
-rw-r--r--src/corelib/corelib.pro15
-rw-r--r--src/gui/gui.pro15
-rw-r--r--src/gui/kernel/qapplication_s60.cpp4
-rw-r--r--src/network/network.pro15
-rw-r--r--src/qbase.pri17
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp33
6 files changed, 54 insertions, 45 deletions
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 728bdf9..b7d6034 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -36,21 +36,6 @@ symbian: {
# Workaroud for problems with paging this dll
MMP_RULES -= PAGED
MMP_RULES *= UNPAGED
-
- # Partial upgrade SIS file
- vendorinfo = \
- "; Localised Vendor name" \
- "%{\"Nokia, Qt\"}" \
- " " \
- "; Unique Vendor name" \
- ":\"Nokia, Qt\"" \
- " "
- pu_header = "; Partial upgrade package for testing QtCore changes without reinstalling everything" \
- "$${LITERAL_HASH}{\"Qt corelib\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU"
- partial_upgrade.pkg_prerules = pu_header vendorinfo
- partial_upgrade.sources = $$QMAKE_LIBDIR_QT/QtCore$${QT_LIBINFIX}.dll
- partial_upgrade.path = c:/sys/bin
- DEPLOYMENT = partial_upgrade $$DEPLOYMENT
}
neon {
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 13d2c77..90b5de5 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -60,21 +60,6 @@ symbian {
QMAKE_LFLAGS.ARMCC += --rw-base 0x800000
QMAKE_LFLAGS.GCCE += -Tdata 0xC00000
}
-
- # Partial upgrade SIS file
- vendorinfo = \
- "; Localised Vendor name" \
- "%{\"Nokia, Qt\"}" \
- " " \
- "; Unique Vendor name" \
- ":\"Nokia, Qt\"" \
- " "
- pu_header = "; Partial upgrade package for testing QtGui changes without reinstalling everything" \
- "$${LITERAL_HASH}{\"Qt gui\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU"
- partial_upgrade.pkg_prerules = pu_header vendorinfo
- partial_upgrade.sources = $$QMAKE_LIBDIR_QT/QtGui$${QT_LIBINFIX}.dll
- partial_upgrade.path = c:/sys/bin
- DEPLOYMENT = partial_upgrade $$DEPLOYMENT
}
neon:*-g++* {
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index e937918..2be3ed3 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1341,6 +1341,10 @@ void QSymbianControl::setFocusSafely(bool focus)
// focus in Symbian. If this is not executed, the control which happens to be on
// the top of the stack may randomly be assigned focus by Symbian, for example
// when creating new windows (specifically in CCoeAppUi::HandleStackChanged()).
+
+ // Close any popups.
+ CEikonEnv::Static()->EikAppUi()->StopDisplayingMenuBar();
+
if (focus) {
S60->appUi()->RemoveFromStack(this);
// Symbian doesn't automatically remove focus from the last focused control, so we need to
diff --git a/src/network/network.pro b/src/network/network.pro
index 5e33080..7ed7d3a 100644
--- a/src/network/network.pro
+++ b/src/network/network.pro
@@ -28,19 +28,4 @@ QMAKE_LIBS += $$QMAKE_LIBS_NETWORK
symbian {
TARGET.UID3=0x2001B2DE
LIBS += -lesock -linsock -lcertstore -lefsrv -lctframework
-
- # Partial upgrade SIS file
- vendorinfo = \
- "; Localised Vendor name" \
- "%{\"Nokia, Qt\"}" \
- " " \
- "; Unique Vendor name" \
- ":\"Nokia, Qt\"" \
- " "
- pu_header = "; Partial upgrade package for testing QtGui changes without reinstalling everything" \
- "$${LITERAL_HASH}{\"Qt network\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU"
- partial_upgrade.pkg_prerules = pu_header vendorinfo
- partial_upgrade.sources = $$QMAKE_LIBDIR_QT/QtNetwork.dll
- partial_upgrade.path = c:/sys/bin
- DEPLOYMENT = partial_upgrade $$DEPLOYMENT
}
diff --git a/src/qbase.pri b/src/qbase.pri
index 680693f..b431ade 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -183,3 +183,20 @@ QMAKE_PKGCONFIG_VARIABLES += moc_dir uic_dir rcc_dir lupdate_dir lrelease_dir
include(qt_targets.pri)
win32:DEFINES+=_USE_MATH_DEFINES
+
+symbian {
+ # Partial upgrade SIS file
+ vendorinfo = \
+ "; Localised Vendor name" \
+ "%{\"Nokia, Qt\"}" \
+ " " \
+ "; Unique Vendor name" \
+ ":\"Nokia, Qt\"" \
+ " "
+ pu_header = "; Partial upgrade package for testing $${TARGET} changes without reinstalling everything" \
+ "$${LITERAL_HASH}{\"$${TARGET}\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU"
+ partial_upgrade.pkg_prerules = pu_header vendorinfo
+ partial_upgrade.sources = $$QMAKE_LIBDIR_QT/$${TARGET}.dll
+ partial_upgrade.path = c:/sys/bin
+ DEPLOYMENT += partial_upgrade
+}
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 098ce3c..2f221d2 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -70,6 +70,7 @@
#include <qtoolbar.h>
#include <QtGui/qpaintengine.h>
#include <private/qbackingstore_p.h>
+#include <qmenubar.h>
#include <QtGui/QGraphicsView>
#include <QtGui/QGraphicsProxyWidget>
@@ -81,8 +82,14 @@
#include <avkon.hrh> // EEikStatusPaneUidTitle
#include <akntitle.h> // CAknTitlePane
#include <akncontext.h> // CAknContextPane
+#endif
+
+#ifdef Q_OS_SYMBIAN
#include <eikspane.h> // CEikStatusPane
#include <eikbtgpc.h> // CEikButtonGroupContainer
+#include <eikenv.h> // CEikonEnv
+#include <eikaufty.h> // MEikAppUiFactory
+#include <eikmenub.h> // CEikMenuBar
#endif
#ifdef Q_WS_QWS
@@ -387,6 +394,7 @@ private slots:
void maximizedWindowModeTransitions();
void minimizedWindowModeTransitions();
void normalWindowModeTransitions();
+ void focusSwitchClosesPopupMenu();
#endif
void focusProxyAndInputMethods();
@@ -10253,6 +10261,31 @@ void tst_QWidget::normalWindowModeTransitions()
QVERIFY(!buttonGroup->IsVisible());
QVERIFY(!statusPane->IsVisible());
}
+
+void tst_QWidget::focusSwitchClosesPopupMenu()
+{
+ QMainWindow mainWindow;
+ QAction action("Test action", &mainWindow);
+ mainWindow.menuBar()->addAction(&action);
+
+ mainWindow.show();
+ QT_TRAP_THROWING(CEikonEnv::Static()->AppUiFactory()->MenuBar()->TryDisplayMenuBarL());
+ QVERIFY(CEikonEnv::Static()->AppUiFactory()->MenuBar()->IsDisplayed());
+
+ // Close the popup by opening a new window.
+ QMainWindow mainWindow2;
+ QAction action2("Test action", &mainWindow2);
+ mainWindow2.menuBar()->addAction(&action2);
+ mainWindow2.show();
+ QVERIFY(!CEikonEnv::Static()->AppUiFactory()->MenuBar()->IsDisplayed());
+
+ QT_TRAP_THROWING(CEikonEnv::Static()->AppUiFactory()->MenuBar()->TryDisplayMenuBarL());
+ QVERIFY(CEikonEnv::Static()->AppUiFactory()->MenuBar()->IsDisplayed());
+
+ // Close the popup by switching focus.
+ mainWindow.activateWindow();
+ QVERIFY(!CEikonEnv::Static()->AppUiFactory()->MenuBar()->IsDisplayed());
+}
#endif
class InputContextTester : public QInputContext