summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2010-01-13 11:01:21 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-01-13 11:01:21 (GMT)
commite60277e8d5934ca9fff8abaf9493a33985ee34c4 (patch)
tree087f848d84038e85d456efd1aab49584062269bd /src/gui/kernel/qapplication.cpp
parentabd6f1d678757e963909e3202b24e61fb0e865ba (diff)
parentc01c7f59449aa4c1b2edf260ba8fb783ac180f95 (diff)
downloadQt-e60277e8d5934ca9fff8abaf9493a33985ee34c4.zip
Qt-e60277e8d5934ca9fff8abaf9493a33985ee34c4.tar.gz
Qt-e60277e8d5934ca9fff8abaf9493a33985ee34c4.tar.bz2
Merge branch '4.6.1' of git@scm.dev.nokia.troll.no:qt/qt-releases into 4.6.1
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index d474391..fb923be 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -177,6 +177,7 @@ QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::T
directPainters = 0;
#endif
+ gestureManager = 0;
gestureWidget = 0;
if (!self)
@@ -3632,7 +3633,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
}
// walk through parents and check for gestures
- if (qt_gestureManager) {
+ if (d->gestureManager) {
switch (e->type()) {
case QEvent::Paint:
case QEvent::MetaCall:
@@ -3664,13 +3665,13 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
break;
default:
if (receiver->isWidgetType()) {
- if (qt_gestureManager->filterEvent(static_cast<QWidget *>(receiver), e))
+ if (d->gestureManager->filterEvent(static_cast<QWidget *>(receiver), e))
return true;
} else {
// a special case for events that go to QGesture objects.
// We pass the object to the gesture manager and it'll figure
// out if it's QGesture or not.
- if (qt_gestureManager->filterEvent(receiver, e))
+ if (d->gestureManager->filterEvent(receiver, e))
return true;
}
}
@@ -5230,6 +5231,8 @@ QInputContext *QApplication::inputContext() const
{
Q_D(const QApplication);
Q_UNUSED(d);// only static members being used.
+ if (QApplicationPrivate::is_app_closing)
+ return d->inputContext;
#ifdef Q_WS_X11
if (!X11)
return 0;
@@ -5676,6 +5679,14 @@ Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
QApplicationPrivate::translateRawTouchEvent(window, deviceType, touchPoints);
}
+QGestureManager* QGestureManager::instance()
+{
+ QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
+ if (!qAppPriv->gestureManager)
+ qAppPriv->gestureManager = new QGestureManager(qApp);
+ return qAppPriv->gestureManager;
+}
+
QT_END_NAMESPACE
#include "moc_qapplication.cpp"