diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qnamespace.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 9 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index d3b048579f..ee4000498f 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -481,6 +481,8 @@ public: AA_MacDontSwapCtrlAndMeta = 7, AA_Use96Dpi = 8, AA_X11InitThreads = 10, + AA_SynthesizeTouchForUnhandledMouseEvents = 11, + AA_SynthesizeMouseForUnhandledTouchEvents = 12, // Add new attributes before this line AA_AttributeCount diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 3c2697e1f8..3add1a48c7 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -167,6 +167,15 @@ construction in order to make Xlib calls thread-safe. This attribute must be set before QApplication is constructed. + \value AA_SynthesizeTouchForUnhandledMouseEvents All mouse events + that are not accepted by the application will be translated + to touch events instead. + + \value AA_SynthesizeMouseForUnhandledTouchEvents All touch events + that are not accepted by the application will be translated + to left button mouse events instead. This attribute is enabled + by default. + \omitvalue AA_AttributeCount */ diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 7a4618be34..05f26cc87f 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -300,7 +300,7 @@ Q_CORE_EXPORT uint qGlobalPostedEventsCount() QCoreApplication *QCoreApplication::self = 0; QAbstractEventDispatcher *QCoreApplicationPrivate::eventDispatcher = 0; -uint QCoreApplicationPrivate::attribs; +uint QCoreApplicationPrivate::attribs = (1 << Qt::AA_SynthesizeMouseForUnhandledTouchEvents); #ifdef Q_OS_UNIX Qt::HANDLE qt_application_thread_id = 0; |