summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-03-30 09:01:55 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-03-30 09:01:55 (GMT)
commit917102fedeef6a22237fd426c28268856984965e (patch)
treedc34bfe1caed990e2ef85311ad28c9fdde5eb192 /src
parent9a23f377b38a2e65da9b67982d7ca770dbcc16b0 (diff)
parent2edaa9e52da494703df219a6b7672e0a33fc7031 (diff)
downloadQt-917102fedeef6a22237fd426c28268856984965e.zip
Qt-917102fedeef6a22237fd426c28268856984965e.tar.gz
Qt-917102fedeef6a22237fd426c28268856984965e.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: Corrected case mismatch. Fixed pro file syntax in demos/spectrum Fix for failing autotest QToolBar/Symbian Removed useless Exit button in Symbian^3
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp8
-rw-r--r--src/gui/styles/qs60style.cpp9
2 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
index 3496297..09e2b5f 100644
--- a/src/gui/kernel/qsoftkeymanager_s60.cpp
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -113,12 +113,20 @@ void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonG
void QSoftKeyManagerPrivateS60::clearSoftkeys(CEikButtonGroupContainer &cba)
{
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ QT_TRAP_THROWING(
+ //EAknSoftkeyEmpty is used, because using -1 adds softkeys without actions on Symbian3
+ cba.SetCommandL(0, EAknSoftkeyEmpty, KNullDesC);
+ cba.SetCommandL(2, EAknSoftkeyEmpty, KNullDesC);
+ );
+#else
QT_TRAP_THROWING(
//Using -1 instead of EAknSoftkeyEmpty to avoid flickering.
cba.SetCommandL(0, -1, KNullDesC);
// TODO: Should we clear also middle SK?
cba.SetCommandL(2, -1, KNullDesC);
);
+#endif
realSoftKeyActions.clear();
}
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index aa68c23..da1528e 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2556,17 +2556,16 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
tb->sizePolicy().horizontalPolicy() == QSizePolicy::Maximum) && tb->orientation() == Qt::Horizontal;
if (parentCanGrowHorizontally) {
- int visibleButtons = 0;
+ int buttons = 0;
//Make the auto-stretch to happen only for horizontal orientation
if (tb && tb->orientation() == Qt::Horizontal) {
QList<QAction*> actionList = tb->actions();
for (int i = 0; i < actionList.count(); i++) {
- if (actionList.at(i)->isVisible())
- visibleButtons++;
+ buttons++;
}
}
- if (widget->parentWidget() && visibleButtons > 0) {
+ if (widget->parentWidget() && buttons > 0) {
QWidget *w = const_cast<QWidget *>(widget);
int toolBarMaxWidth = 0;
int totalMargin = 0;
@@ -2589,7 +2588,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
toolBarMaxWidth -= totalMargin;
//ensure that buttons are side-by-side and not on top of each other
- const int toolButtonWidth = (toolBarMaxWidth / visibleButtons)
+ const int toolButtonWidth = (toolBarMaxWidth / buttons)
- pixelMetric(QStyle::PM_ToolBarItemSpacing)
- pixelMetric(QStyle::PM_ToolBarItemMargin)
//toolbar frame needs to be reduced again, since QToolBarLayout adds it for each toolbar action