summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-27 22:33:26 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-27 22:33:26 (GMT)
commitb65e9811968ec2e122b0e7f6b9a58dce50e3c01c (patch)
tree5c394813841d5172e3430f20b0500ffc10fc594e /src/gui
parent7795c14a574fcee67c840ce996602d61e66683f5 (diff)
parent7f9205aa572c60085c9e9f38749bb48e707fea95 (diff)
downloadQt-b65e9811968ec2e122b0e7f6b9a58dce50e3c01c.zip
Qt-b65e9811968ec2e122b0e7f6b9a58dce50e3c01c.tar.gz
Qt-b65e9811968ec2e122b0e7f6b9a58dce50e3c01c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Adding missing image Fix QT_NO_DATESTRING Check the gesturemanager pointer before accessing it. Added files that had been renamed. Modified file/directory names and text to remove disallowed terminology. Cherry pick fix for MOBILITY-1077 from Qt Mobility. Fix typo in docs. Cherry pick fix for MOBILITY-1145 from Qt Mobility. Cherry pick fix for MOBILITY-1144 from Qt Mobility. Fixed the following sub-tasks for QTBUG-12192
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp7
-rw-r--r--src/gui/kernel/qapplication.cpp10
-rw-r--r--src/gui/kernel/qevent.cpp8
-rw-r--r--src/gui/kernel/qgesture.cpp6
-rw-r--r--src/gui/kernel/qwidget.cpp4
5 files changed, 19 insertions, 16 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 5fffefb..a2ae385 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1453,9 +1453,10 @@ QGraphicsItem::~QGraphicsItem()
#ifndef QT_NO_GESTURES
if (d_ptr->isObject && !d_ptr->gestureContext.isEmpty()) {
QGraphicsObject *o = static_cast<QGraphicsObject *>(this);
- QGestureManager *manager = QGestureManager::instance();
- foreach (Qt::GestureType type, d_ptr->gestureContext.keys())
- manager->cleanupCachedGestures(o, type);
+ if (QGestureManager *manager = QGestureManager::instance()) {
+ foreach (Qt::GestureType type, d_ptr->gestureContext.keys())
+ manager->cleanupCachedGestures(o, type);
+ }
}
#endif
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index aaf479f..5c333b0 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -5791,10 +5791,12 @@ Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
#ifndef QT_NO_GESTURES
QGestureManager* QGestureManager::instance()
{
- QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
- if (!qAppPriv->gestureManager)
- qAppPriv->gestureManager = new QGestureManager(qApp);
- return qAppPriv->gestureManager;
+ if (QApplicationPrivate *qAppPriv = QApplicationPrivate::instance()) {
+ if (!qAppPriv->gestureManager)
+ qAppPriv->gestureManager = new QGestureManager(qApp);
+ return qAppPriv->gestureManager;
+ }
+ return 0;
}
#endif // QT_NO_GESTURES
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 92eed33..bbc9e0b 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -3627,7 +3627,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\brief The QTouchEvent class contains parameters that describe a touch event.
\since 4.6
\ingroup events
- \ingroup multitouch
+ \ingroup touch
\section1 Enabling Touch Events
@@ -3641,7 +3641,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
Similarly to QMouseEvent, Qt automatically grabs each touch point on the first press inside a
widget, and the widget will receive all updates for the touch point until it is released.
- Note that it is possible for a widget to receive events for multiple touch points, and that
+ Note that it is possible for a widget to receive events for numerous touch points, and that
multiple widgets may be receiving touch events at the same time.
\section1 Event Handling
@@ -3717,7 +3717,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\i As mentioned above, enabling touch events means multiple widgets can be receiving touch
events simultaneously. Combined with the default QWidget::event() handling for QTouchEvents,
- this gives you great flexibility in designing multi-touch user interfaces. Be aware of the
+ this gives you great flexibility in designing touch user interfaces. Be aware of the
implications. For example, it is possible that the user is moving a QSlider with one finger and
pressing a QPushButton with another. The signals emitted by these widgets will be
interleaved.
@@ -3729,7 +3729,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\i QTouchEvents are not affected by a \l{QWidget::grabMouse()}{mouse grab} or an
\l{QApplication::activePopupWidget()}{active pop-up widget}. The behavior of QTouchEvents is
- undefined when opening a pop-up or grabbing the mouse while there are multiple active touch
+ undefined when opening a pop-up or grabbing the mouse while there are more than one active touch
points.
\endlist
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index 6359ecf..4a4452a 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -306,10 +306,10 @@ void QPanGesture::setAcceleration(qreal value)
\class QPinchGesture
\since 4.6
\brief The QPinchGesture class describes a pinch gesture made my the user.
- \ingroup multitouch
+ \ingroup touch
\ingroup gestures
- A pinch gesture is a form of multitouch user input in which the user typically
+ A pinch gesture is a form of touch user input in which the user typically
touches two points on the input device with a thumb and finger, before moving
them closer together or further apart to change the scale factor, zoom, or level
of detail of the user interface.
@@ -389,7 +389,7 @@ void QPanGesture::setAcceleration(qreal value)
\brief the current scale factor
The scale factor measures the scale factor associated with the distance
- between two of the user's inputs on a multitouch device.
+ between two of the user's inputs on a touch device.
\sa totalScaleFactor, lastScaleFactor
*/
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index fed8d0a..aaa29a1 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -12049,8 +12049,8 @@ void QWidget::ungrabGesture(Qt::GestureType gesture)
{
Q_D(QWidget);
if (d->gestureContext.remove(gesture)) {
- QGestureManager *manager = QGestureManager::instance();
- manager->cleanupCachedGestures(this, gesture);
+ if (QGestureManager *manager = QGestureManager::instance())
+ manager->cleanupCachedGestures(this, gesture);
}
}
#endif // QT_NO_GESTURES