summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-11 08:49:14 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-11 08:49:14 (GMT)
commit1c6c353ecc23a01368d785794d130131e3fb2553 (patch)
tree5068ef035c3e78332a21806b082ce2e4ef0489f8 /src
parentd8f65a7f0707d8a97801ad20d690672e0124b491 (diff)
downloadQt-1c6c353ecc23a01368d785794d130131e3fb2553.zip
Qt-1c6c353ecc23a01368d785794d130131e3fb2553.tar.gz
Qt-1c6c353ecc23a01368d785794d130131e3fb2553.tar.bz2
rename Qt::WA_AcceptedTouchBeginEvent to Qt::WA_WState_AcceptedTouchBeginEvent
this is an internal widget state variable, so the name should reflect that (and we shouldn't include it in the docs either)
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/gui/kernel/qapplication.cpp8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 78e2b08..4de431c 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -492,7 +492,7 @@ public:
WA_TranslucentBackground = 120,
WA_AcceptTouchEvents = 121,
- WA_AcceptedTouchBeginEvent = 122,
+ WA_WState_AcceptedTouchBeginEvent = 122,
// Add new attributes before this line
WA_AttributeCount
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index e5cf0b5..7cb1ac1 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -4055,7 +4055,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
touchEvent->setAccepted(acceptTouchEvents);
res = acceptTouchEvents && d->notify_helper(widget, touchEvent);
eventAccepted = touchEvent->isAccepted();
- widget->setAttribute(Qt::WA_AcceptedTouchBeginEvent, res && eventAccepted);
+ widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, res && eventAccepted);
touchEvent->spont = false;
if (res && eventAccepted) {
// the first widget to accept the TouchBegin gets an implicit grab.
@@ -5402,13 +5402,15 @@ bool QApplicationPrivate::translateRawTouchEvent(QWidget *window,
{
// if the TouchBegin handler recurses, we assume that means the event
// has been implicitly accepted and continue to send touch events
- widget->setAttribute(Qt::WA_AcceptedTouchBeginEvent);
+ widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent);
res = QApplication::sendSpontaneousEvent(widget, &touchEvent)
&& touchEvent.isAccepted();
break;
}
default:
- if (widget->testAttribute(Qt::WA_AcceptedTouchBeginEvent)) {
+ if (widget->testAttribute(Qt::WA_WState_AcceptedTouchBeginEvent)) {
+ if (touchEvent.type() == QEvent::TouchEnd)
+ widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, false);
(void) QApplication::sendSpontaneousEvent(widget, &touchEvent);
res = true;
}