summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-04-29 12:08:34 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-04-29 12:08:34 (GMT)
commit60f3b87e503b149159b63638178183fa4f5306bb (patch)
tree2484ae861d6beed086247ab5d877166f519b6e80
parente267231ecdd4f1614da62f620f82b19e1157b0b8 (diff)
parentee45a77ce45011b09a2984df007941460245a534 (diff)
downloadQt-60f3b87e503b149159b63638178183fa4f5306bb.zip
Qt-60f3b87e503b149159b63638178183fa4f5306bb.tar.gz
Qt-60f3b87e503b149159b63638178183fa4f5306bb.tar.bz2
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
-rw-r--r--src/gui/kernel/qapplication_s60.cpp35
-rw-r--r--src/gui/kernel/qwidget_s60.cpp7
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp6
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp3
4 files changed, 37 insertions, 14 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index b021b1c..c7bbcdb 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -531,6 +531,9 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const
void QSymbianControl::Draw(const TRect& r) const
{
QWindowSurface *surface = qwidget->windowSurface();
+ if (!surface)
+ return;
+
QPaintEngine *engine = surface->paintDevice()->paintEngine();
if (!engine)
return;
@@ -948,6 +951,7 @@ int QApplication::s60ProcessEvent(TWsEvent *event)
// Qt event handling. Handle some events regardless of if the handle is in our
// widget map or not.
CCoeControl* control = reinterpret_cast<CCoeControl*>(event->Handle());
+ const bool controlInMap = QWidgetPrivate::mapper && QWidgetPrivate::mapper->contains(control);
switch (event->Type()) {
#ifndef QT_NO_IM
case EEventKey:
@@ -970,17 +974,12 @@ int QApplication::s60ProcessEvent(TWsEvent *event)
}
#endif
case EEventPointerEnter:
- if (QWidgetPrivate::mapper && QWidgetPrivate::mapper->contains(control))
- {
- // Qt::Enter will be generated in HandlePointerL
- return 1;
- }
+ if (controlInMap)
+ return 1; // Qt::Enter will be generated in HandlePointerL
break;
case EEventPointerExit:
- if (QWidgetPrivate::mapper && QWidgetPrivate::mapper->contains(control))
- {
- if (S60)
- {
+ if (controlInMap) {
+ if (S60) {
// mouseEvent outside our window, send leave event to last focused widget
QMouseEvent mEvent(QEvent::Leave, S60->lastPointerEventPos, S60->lastCursorPos,
Qt::NoButton, QApplicationPrivate::mouse_buttons, Qt::NoModifier);
@@ -995,11 +994,27 @@ int QApplication::s60ProcessEvent(TWsEvent *event)
if (S60)
S60->updateScreenSize();
return 0; // Propagate to CONE
+ case EEventWindowVisibilityChanged:
+ if (controlInMap) {
+ const TWsVisibilityChangedEvent *visChangedEvent = event->VisibilityChanged();
+ QWidget *w = QWidgetPrivate::mapper->value(control);
+ if (!w->d_func()->maybeTopData())
+ break;
+ if (visChangedEvent->iFlags & TWsVisibilityChangedEvent::ENotVisible) {
+ delete w->d_func()->topData()->backingStore;
+ w->d_func()->topData()->backingStore = 0;
+ } else if ((visChangedEvent->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible)
+ && !w->d_func()->maybeBackingStore()) {
+ w->d_func()->topData()->backingStore = new QWidgetBackingStore(w);
+ }
+ return 1;
+ }
+ break;
default:
break;
}
- if (!QWidgetPrivate::mapper || !QWidgetPrivate::mapper->contains(control))
+ if (!controlInMap)
return -1;
return 0;
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 116dc35..ec80a18 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -195,12 +195,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
data.crect.moveTopLeft(QPoint(clientRect.iTl.iX, clientRect.iTl.iY));
QSymbianControl *control= new QSymbianControl(q);
control->ConstructL(true,desktop);
- if (!desktop)
- {
+ if (!desktop) {
QTLWExtra *topExtra = topData();
topExtra->rwindow = control->DrawableWindow();
// Request mouse move events.
- topExtra->rwindow->PointerFilter(EPointerFilterEnterExit | EPointerFilterMove | EPointerFilterDrag, 0);
+ topExtra->rwindow->PointerFilter(EPointerFilterEnterExit
+ | EPointerFilterMove | EPointerFilterDrag, 0);
+ topExtra->rwindow->EnableVisibilityChangeEvents();
}
id = (WId)control;
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
index c289c24..50ac953 100644
--- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -716,12 +716,18 @@ void tst_QLocalSocket::threadedConnection()
QFETCH(int, threads);
Server server;
+#if defined(Q_OS_SYMBIAN)
+ server.setStackSize(0x14000);
+#endif
server.clients = threads;
server.start();
QList<Client*> clients;
for (int i = 0; i < threads; ++i) {
clients.append(new Client());
+#if defined(Q_OS_SYMBIAN)
+ clients.last()->setStackSize(0x14000);
+#endif
clients.last()->start();
}
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 9d75fba..2e039bf 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -81,7 +81,8 @@
#ifndef TEST_QNETWORK_PROXY
//#define TEST_QNETWORK_PROXY
#endif
-#ifdef TEST_QNETWORK_PROXY
+#if defined(TEST_QNETWORK_PROXY) || defined (Q_CC_RVCT)
+// RVCT compiles also unused inline methods
# include <QNetworkProxy>
#endif