summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qringbuffer_p.h8
-rw-r--r--src/gui/kernel/qapplication_s60.cpp15
2 files changed, 15 insertions, 8 deletions
diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h
index ac33353..a1bfab0 100644
--- a/src/corelib/tools/qringbuffer_p.h
+++ b/src/corelib/tools/qringbuffer_p.h
@@ -199,8 +199,12 @@ public:
inline void clear() {
if(!buffers.isEmpty()) {
- // remove all but the first
- buffers.erase(buffers.begin() + 1, buffers.end());
+ QByteArray tmp = buffers[0];
+ buffers.clear();
+ buffers << tmp;
+ //TODO merge this optimization ?
+ //buffers.erase(buffers.begin() + 1, buffers.end());
+ //>>>>>>> 08ae7ee1fb930e7d4b4039e2294cba69f9380964:src/corelib/tools/qringbuffer_p.h
if (buffers.at(0).size() != basicBlockSize)
buffers[0].resize(basicBlockSize);
}
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 42faf98..3bd6e6b 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -343,7 +343,7 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons
QMouseEvent mEvent(QEvent::MouseButtonPress, alienWidget->mapFrom(qwidget, widgetPos), globalPos,
Qt::RightButton, QApplicationPrivate::mouse_buttons, Qt::NoModifier);
sendMouseEvent(alienWidget, &mEvent);
- m_previousEventLongTap = false;
+ m_previousEventLongTap = true;
}
void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent)
@@ -821,18 +821,21 @@ void QApplicationPrivate::openPopup(QWidget *popup)
WId id = popup->effectiveWinId();
id->SetPointerCapture(true);
id->SetGloballyCapturing(true);
-
autoGrabWindow = id;
}
// popups are not focus-handled by the window system (the first
// popup grabbed the keyboard), so we have to do that manually: A
// new popup gets the focus
- if (popup->focusWidget()) {
- popup->focusWidget()->setFocus(Qt::PopupFocusReason);
+ if (QApplication::focusWidget())
+ static_cast<QSymbianControl*>(QApplication::focusWidget()->effectiveWinId())->CancelLongTapTimer();
+ QWidget *fw = popup->focusWidget();
+ if (fw) {
+ fw->setFocus(Qt::PopupFocusReason);
} else if (QApplicationPrivate::popupWidgets->count() == 1) { // this was the first popup
- if (QWidget *fw = QApplication::focusWidget()) {
- static_cast<QSymbianControl*>(fw->effectiveWinId())->CancelLongTapTimer();
+ fw = QApplication::focusWidget();
+ if (fw) {
+// static_cast<QSymbianControl*>(fw->effectiveWinId())->CancelLongTapTimer();
QFocusEvent e(QEvent::FocusOut, Qt::PopupFocusReason);
q_func()->sendEvent(fw, &e);
}