summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-04-29 16:08:44 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-04-29 16:08:44 (GMT)
commita3504361a19428c12ac7e044762f252d8ba2b26f (patch)
tree6b69f1120135b4f45ee27fdc6e1ecfde3c450928 /src/gui/kernel
parent520a67e50ed7717518d3072f8568de00b791f20a (diff)
downloadQt-a3504361a19428c12ac7e044762f252d8ba2b26f.zip
Qt-a3504361a19428c12ac7e044762f252d8ba2b26f.tar.gz
Qt-a3504361a19428c12ac7e044762f252d8ba2b26f.tar.bz2
Don't store activeTouchPoints in QApplicationPrivate
it's only needed and updated during delivery, so the extra copy isn't necessary
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_win.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index ce7110d..da66aab 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -438,7 +438,7 @@ public:
QMap<DWORD, int> touchInputIDToTouchPointID;
QVector<QTouchEvent::TouchPoint *> allTouchPoints;
- QList<QTouchEvent::TouchPoint *> currentTouchPoints, activeTouchPoints;
+ QList<QTouchEvent::TouchPoint *> currentTouchPoints;
void initializeMultitouch();
void insertActiveTouch(QTouchEvent::TouchPoint *touchPoint);
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index f1fb0a4..c7ecdae 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -4003,7 +4003,6 @@ void QApplicationPrivate::initializeMultitouch()
touchInputIDToTouchPointID.clear();
allTouchPoints.clear();
currentTouchPoints.clear();
- activeTouchPoints.clear();
}
void QApplicationPrivate::insertActiveTouch(QTouchEvent::TouchPoint *touchPoint)
@@ -4015,7 +4014,6 @@ void QApplicationPrivate::insertActiveTouch(QTouchEvent::TouchPoint *touchPoint)
break;
}
currentTouchPoints.insert(at, touchPoint);
- activeTouchPoints = currentTouchPoints;
if (currentTouchPoints.count() > allTouchPoints.count()) {
qFatal("Qt: INTERNAL ERROR: currentTouchPoints.count() (%d) > allTouchPoints.count() (%d)",
@@ -4042,7 +4040,7 @@ bool QApplicationPrivate::translateTouchEvent(const MSG &msg)
Q_Q(QApplication);
bool sendTouchBegin = currentTouchPoints.isEmpty();
- activeTouchPoints = currentTouchPoints;
+ QList<QTouchEvent::TouchPoint *> activeTouchPoints = currentTouchPoints;
QVector<TOUCHINPUT> winTouchInputs(msg.wParam);
memset(winTouchInputs.data(), 0, sizeof(TOUCHINPUT) * winTouchInputs.count());
@@ -4068,6 +4066,7 @@ bool QApplicationPrivate::translateTouchEvent(const MSG &msg)
QPointF globalPos(qreal(touchInput.x) / qreal(100.), qreal(touchInput.y) / qreal(100.));
if (!down && (touchInput.dwFlags & TOUCHEVENTF_DOWN)) {
insertActiveTouch(touchPoint);
+ activeTouchPoints = currentTouchPoints;
touchPoint->d->state = Qt::TouchPointPressed;
touchPoint->d->globalPos = touchPoint->d->startGlobalPos = touchPoint->d->lastGlobalPos = globalPos;
touchPoint->d->pressure = qreal(1.);