summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Fernengel <harald@trolltech.com>2009-06-16 13:41:27 (GMT)
committerHarald Fernengel <harald@trolltech.com>2009-06-16 13:41:27 (GMT)
commit186d66f01e0e489219e82ea732868a0520dc241b (patch)
treed3c9c38f349f0c08e1ff04489dc59a3bb3c20909
parentcb6cd0e4159606619b1ce708c1b00f8d294cc4bb (diff)
parent228b2f6494ebd95fc66993b00ecab065ec5fe5a5 (diff)
downloadQt-186d66f01e0e489219e82ea732868a0520dc241b.zip
Qt-186d66f01e0e489219e82ea732868a0520dc241b.tar.gz
Qt-186d66f01e0e489219e82ea732868a0520dc241b.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
-rw-r--r--doc/src/installation.qdoc12
-rw-r--r--src/gui/kernel/qapplication_s60.cpp7
-rw-r--r--src/gui/kernel/qwidget.cpp12
-rw-r--r--src/gui/widgets/qmainwindow.cpp11
-rw-r--r--tests/auto/network-settings.h6
5 files changed, 35 insertions, 13 deletions
diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc
index 13af50c..05188c7 100644
--- a/doc/src/installation.qdoc
+++ b/doc/src/installation.qdoc
@@ -554,9 +554,9 @@ in the \l{Qt for S60 Requirements} document.
\note Qt for S60 has some requirements that are given in more detail
in the \l{Qt for S60 Requirements} document.
-\note This document describes how to install Qt for S60 from the source package.
-Go \l{Installing Qt on S60 using binary package}{here} for instructions on how to install
-Qt using binary package.
+\note \bold {This document describes how to install and configure Qt for S60 from scratch.
+If you are using pre-built binaries, follow the instructions
+\l{Installing Qt on S60 using binary package}{here}.}
\list 1
@@ -904,7 +904,11 @@ Qt using binary package.
Qt for S60 requires the following software installed on your development PC:
\list
- \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/}{Carbide.c++ v2.0.0 or higher}
+ \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/}{Carbide.c++ v2.0.0 or higher}
+ \list
+ \o \bold{Note:} It is necessary to update Carbide compiler if you are using Carbide 2.0.2 or older.
+ You can find a compiler patch \l{http://pepper.troll.no/s60prereleases/patches/}{here}.
+ \endlist
\o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/}{S60 Platform SDK 3rd Edition FP1 or higher}
\o \l{http://www.forum.nokia.com/main/resources/technologies/openc_cpp/}{Open C/C++ v1.6.0 or higher}.
Install this to all S60 SDKs you plan to use Qt with.
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 4c008fb..42faf98 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1072,9 +1072,10 @@ void QApplication::symbianHandleCommand(int command)
default:
if (command >= SOFTKEYSTART && command <= SOFTKEYEND) {
int index= command-SOFTKEYSTART;
- QWidget* focused = QApplication::focusWidget();
- const QList<QAction*>& softKeys = focused->softKeys();
- Q_ASSERT(index<softKeys.count());
+ QWidget *focused = QApplication::focusWidget();
+ QWidget *softKeySource = focused ? focused : QApplication::activeWindow();
+ const QList<QAction*>& softKeys = softKeySource->softKeys();
+ Q_ASSERT(index < softKeys.count());
softKeys.at(index)->activate(QAction::Trigger);
}
else
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index a83a79f..8d2569e 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -5781,7 +5781,6 @@ bool QWidget::hasFocus() const
void QWidget::setFocus(Qt::FocusReason reason)
{
Q_D(QWidget);
- d->setSoftKeys_sys(softKeys());
if (!isEnabled())
return;
@@ -7733,6 +7732,7 @@ bool QWidget::event(QEvent *event)
#if defined(Q_WS_WIN)
QInputContextPrivate::updateImeStatus(this, true);
#endif
+ d->setSoftKeys_sys(softKeys());
focusInEvent((QFocusEvent*)event);
break;
@@ -7885,6 +7885,10 @@ bool QWidget::event(QEvent *event)
if (w && w->isVisible() && !w->isWindow())
QApplication::sendEvent(w, event);
}
+
+ if (isWindow() && isActiveWindow())
+ d->setSoftKeys_sys(softKeys());
+
break; }
case QEvent::LanguageChange:
@@ -11617,7 +11621,8 @@ void QWidget::setSoftKey(QAction *softKey)
d->softKeys.clear();
if (softKey)
d->softKeys.append(softKey);
- if (QApplication::focusWidget() == this)
+ if ((!QApplication::focusWidget() && this == QApplication::activeWindow())
+ || QApplication::focusWidget() == this)
d->setSoftKeys_sys(this->softKeys());
}
@@ -11634,7 +11639,8 @@ void QWidget::setSoftKeys(const QList<QAction*> &softKeys)
d->softKeys.clear();
d->softKeys = softKeys;
- if ((QApplication::focusWidget() == this) || (QApplication::focusWidget()==0))
+ if ((!QApplication::focusWidget() && this == QApplication::activeWindow())
+ || QApplication::focusWidget() == this)
d->setSoftKeys_sys(this->softKeys());
}
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 2f3b412..5f8371c 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -1396,7 +1396,16 @@ bool QMainWindow::event(QEvent *event)
}
break;
#endif
-
+#ifndef QT_NO_MENUBAR
+ case QEvent::WindowActivate:
+ if (d->layout->menuBar()) {
+ // ### TODO: This is evil, there is no need to create a new action every time
+ QAction* menu = new QAction(QString::fromLatin1("Menu"), this);
+ menu->setSoftKeyRole(QAction::MenuSoftKey);
+ setSoftKey(menu);
+ }
+ break;
+#endif
default:
break;
}
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 0924c57..01a732c 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -50,7 +50,8 @@
#include <QSharedPointer>
#include <QHash>
#endif
-#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
+#if defined(Q_OS_SYMBIAN)
+#if defined(Q_CC_NOKIAX86)
// In emulator we use WINSOCK connectivity by default. Unfortunately winsock
// does not work very well with UDP sockets. This defines skips some test
// cases which have known problems.
@@ -59,6 +60,7 @@
// network tests. WINPCAP connectivity uses Symbian OS IP stack,
// correspondingly as HW does. When using WINPCAP disable this define
//#define SYMBIAN_WINSOCK_CONNECTIVITY
+#endif // Q_CC_NOKIAX86
class QtNetworkSettingsRecord {
public:
@@ -80,7 +82,7 @@ private:
QString strRecordValue;
};
-#endif
+#endif // Q_OS_SYMBIAN
class QtNetworkSettings
{