summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-11-131-0/+7
|\ | | | | | | | | | | | | | | Conflicts: examples/widgets/widgets/scribble/mainwindow.cpp This amends cb54c16584cf3be746a1a536c1e37cb3022a2f1b. Change-Id: Iaae60a893330524b2973917e23b31f9d51f8bd38
| * syncqt: Add a means to suspend/resume the processing of a fileAndy Shaw2019-11-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than tweaking the parser to cover every eventuality with corner case lines that could cause incorrect header files to be created then the means to suspend/resume the processing of a file is added. This enables us to have it skip over the template line that is causing a QList header to be created as part of the QtGui headers. This patch includes the fix to solve this in addition. Fixes: QTBUG-68129 Change-Id: I751646c4b20a4434347c149ae5e6dcb6e7618853 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Add QQuickMultiPointTouchArea as a friend of QTouchEventv5.14.0-alpha1Shawn Rutledge2019-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | QQuickMultiPointTouchArea needs to understand whether a stationary touchpoint has relevant property changes, to decide whether to emit its updated() signal. Amends 217dd1b3b03cd40b4bb926631464c684f7f84a69 Task-number: QTBUG-77142 Change-Id: I85e031820bef9d687369b7d67a57c67fe2875b4b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Mark stationary touch points as updated if pressure or velocity changesShawn Rutledge2019-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is to inform Qt Quick when a stationary touchpoint is delivered that it is because of a changed property. Qt Quick still needs to avoid delivering item-customized events (with only the touch points that occur inside the item) that contain only stationary touch points without changed properties. To be able to check this private flag, QQuickPointerTouchEvent needs to be a friend. Task-number: QTBUG-77142 Change-Id: I6ee0dffbbeca9e513c77227b757252e2eec6a4ef Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QWheelEvent: use QT_DEPRECATED_VERSION_X_5_15Marc Mutz2019-07-311-16/+16
| | | | | | | | | | | | | | | | ... in an attempt to get qt5 integration going. Change-Id: I22dd6ff2cb9a6d11620878c432905bd07292220b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Procrastinate QWheelEvent deprecations until 5.15Shawn Rutledge2019-07-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | It turns out that Qt3D has uses of x() and y() in a header, which is an error rather than just a warning. So we need more time to do a qt5.git submodule update, then fix Qt3D. Amends 7d29807296cb7ccc7f3459e106d74f93a321c493 Change-Id: Ibead628e7094316bb17d5924f6c6f75dbda5826b Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Finish deprecating obsolete members of QWheelEventShawn Rutledge2019-07-121-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5.0, delta() and orientation() were already marked obsolete, but Widgets and tests have kept on depending on them all this time. We now start using alternative API so they can really be deprecated. All constructors except the newest one are also deprecated. The plan is for all events from pointing devices to have QPointF position() and globalPosition(), so we deprecate the other position accessors. [ChangeLog][QtGui] Obsolete constructors and accessors in QWheelEvent now have proper deprecation macros. What is left is intended to be compatible with planned changes in Qt 6. Change-Id: I26250dc90922b60a6ed20d7f65f38019da3e139e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Remove handling of missing Q_COMPILER_RVALUE_REFSAllan Sandfeld Jensen2019-05-011-2/+0
| | | | | | | | | | | | | | | | Remove remaining handling of missing support for rvalue refs. Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace qMove with std::moveAllan Sandfeld Jensen2019-04-061-1/+1
| | | | | | | | | | | | Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Replace Q_DECL_NOEXCEPT with noexcept in QtGuiAllan Sandfeld Jensen2019-04-051-9/+9
|/ | | | | Change-Id: I43803b88fea8083782d73ce157c466b022208740 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Teach QWheelEvent to handle a new ScrollMomentum phaseTor Arne Vestbø2018-08-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We detect if there's an upcoming momentum phase using the same trick used by e.g. Mozilla in their event handling: https://tinyurl.com/yd8lcs4l, and as recommended by an Apple engineer: https://tinyurl.com/y8yytlgv The event is not guaranteed to be in the queue, but in practice it seems to be. If this assumption fails we can add a wait timeout to the event search instead of using [NSDate distantPast] as a timeout (which only looks at queued events). When the momentum phase is detected, QWheelEvent::phase will have the new ScrollMomentum value, and the phase transitions will be ScrollBegin -> ScrollUpdate -> ScrollMomentum -> ScrollEnd. We no longer send ScrollEnd to signify that the user's fingers have been lifted off the trackpad; rather, the first event with ScrollMomentum phase means that the fingers have been lifted and macOS is now sending simulated-momentum events. This means ScrollEnd is a reliable indicator that the entire scroll gesture (both the user interaction and the momentum) has ended. If the ScrollMomentum phase is skipped, it means the user's fingers came to rest before being lifted, so there is no momentum. In that case the transitions will be ScrollBegin -> ScrollUpdate -> ScrollEnd. Task-number: QTBUG-63026 Task-number: QTBUG-65160 Change-Id: I80191a472f6fa892387004c199166a6350124274 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-071-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-291-2/+2
| | | | | | | | | | | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Add a legacy-free QWheelEvent constructorShawn Rutledge2018-03-231-2/+6
|/ | | | | | | | | | | qt4Delta and qt4Orientation have been "deprecated" ever since Qt 5.0 (even though widgets continue to depend on those properties). This is mainly for use in Qt Quick right now, but can be used everywhere later on. Change-Id: If0b163766c8ad8efa268edaa4f1ac1e8926f9003 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-051-4/+4
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| * Fix GCC -Wfloat-conversion warnings (available since GCC 4.9)Thiago Macieira2017-10-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | This warning used to be part of -Wconversion, but that generates too more noise than we're willing to fix now (like conversion from qint64 to int). The float conversion does trigger for conversion from double to float, as shown in all the QVectorND uses of float, but more importantly, it triggers on passing floats to ints. Change-Id: I69f37f9304f24709a823fffd14e69cfd33f75988 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-171-2/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * Fix BIC issue with QNativeGestureEventJan Arve Saether2017-09-281-2/+1
| | | | | | | | | | | | | | | | Problem was for 32 bit macOS, or if QT_COORD_TYPE was configured to be float. Change-Id: I0a3d3d305f2e8a0f9be7c40f4fef7eabf4643d05 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-1/+9
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * add back the device-less QNativeGestureEvent (deprecated)Shawn Rutledge2017-09-221-0/+4
| | | | | | | | | | | | | | | | | | | | It was an oversight in 83729ad7a1e2d9c75ddf7238ab7c91b514dcebcf that this constructor is still in use in other modules. And in fact we cannot remove public constructors without deprecating them first. Task-number: QTBUG-63355 Change-Id: I64dbf9bc54c0bf6be7157f047b548d3b2c5bc2ed Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * make the QTouchDevice available in each QNativeGestureEventShawn Rutledge2017-09-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QtQuick is beginning to have a use for this, to distinguish native gestures which come from actual trackpad rather than from the "core pointer". It might as well use a real device ID instead of making one up, as it has to do for the core pointer. So far on macOS, the device ID isn't a real one; but that can be fixed, as the qCDebug lines demonstrate (different trackpads have different IDs). Change-Id: I5841deb1c4cc0b77a3b1df70904f70b3d2d71853 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-3/+3
|/ | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Convert features.whatsthis to QT_[REQUIRE_]CONFIGStephan Binner2017-06-291-1/+1
| | | | | | | Move feature definition to gui/configure.json Change-Id: I00b35c0e259d0a695d84a9bf6803eba74d41465a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.tabletevent to QT_CONFIGStephan Binner2017-06-281-2/+2
| | | | | Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-281-1/+1
| | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-161-8/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure configure.pri examples/widgets/painting/fontsampler/mainwindow.cpp examples/widgets/painting/fontsampler/mainwindow.h mkspecs/features/moc.prf src/corelib/global/qglobal.h src/gui/text/qtextdocument.cpp Change-Id: Ica65512e00871695190a14ccea5c275b0165f787
| * QPointingDeviceUniqueId: remove deprecated numeric() and constructorShawn Rutledge2016-12-081-9/+0
| | | | | | | | | | | | | | | | | | Followup to 0484473: this is all new stuff for 5.8 and we don't need to release it with pre-deprecated functions. Task-number: QTBUG-54616 Change-Id: If17a4bec6fc36ca78d87517992374f101ae13b4f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * rename QPointerUniqueId -> QPointingDeviceUniqueIdShawn Rutledge2016-12-071-10/+10
| | | | | | | | | | | | | | | | | | | | Several people agreed that the name was confusing and that this one is better. Task-number: QTBUG-54616 Change-Id: I31cf057f4bc818332b0551a27d1711599440207c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sune Vuorela <sune@vuorela.dk>
| * QPointerUniqueId: make fit for releaseMarc Mutz2016-12-011-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Declare as Q_MOVABLE_TYPE - Prevent QList<QPointerUniqueId> from being instantiated (use QVector instead) - Add equality relational operators - Add qHash() overload - Replace non-default ctor with named ctor. - Add Q_DECL_NOTHROW. - Add Q_DECL_CONSTEXPR. - Rename numeric() -> numericId(). - Update docs. The extension vector for this class calls for additional properties to be added later, but these are not user- settable. It thus suffices to rely on the only data member, a qint64, which can be reinterpreted to an index into an array or hash with actual objects. This allows to make the class a Trivial Type (ie. no overhead over an int) while still supporting later extension. Cf. QSslEllipticCurve as another example of such a class. The extension has to maintain the following invariants, encoded into user code by way of being used in inline functions: - m_numericId == -1 <=> !isValid() This is trivial to support. An extension could not and still cannot reinterpret the qint64 member as a d-pointer, but a d-pointer is only necessary for user-settable properties where updating a central private data structure would cause too much contention. Add a test. Since this type is used in other modules, keep the existing functions, but mark them as deprecated with the expectation that these compat functions be removed before 5.8.0 final. Task-number: QTBUG-54616 Change-Id: Ia3ede0ecaeeef4cd3ffa94a72b1050bd409713a5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QTouchEvent::TouchPoint: replace ellipse diameters with QSizeFShawn Rutledge2016-12-091-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes assignment a bit more succinct and efficient since they are usually set together. Since we store the diameters and the points separately, we no longer need to worry about updating rects by moving their centers. QGuiApplication and QApplication don't need to alter the diameters: they are set once when the event is constructed. Also fix the initialization of pressure and rotation: 418b6f6899ee414aff29c91a4ae17eed8791a617 did it by casting a double to qreal, whereas a plain integer constant will be auto-converted by the compiler anyway. Change-Id: Ib9956d2def21278b8ae042147d917da156e77e52 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | TouchPoint: add horizontalDiameter, verticalDiameter; deprecate rectsShawn Rutledge2016-12-071-3/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The contact patch of a finger on a touchscreen tends to be roughly elliptical. If we model it as a QRectF, it's not clear whether the ellipse should be considered to be inscribed in the rectangle and then rotated, or whether the rectangle represents the outer bounds of the rotated ellipse. In practice, since most touchscreens can't measure rotation, it is effectively the latter. But modeling it that way means information is lost if the touchscreen can measure rotation: you can determine the bounds of a rotated ellipse, but you cannot derive the rotated ellipse from its bounds. So it's better to model the axes of the ellipse explicitly. This has the added benefit of saving a little storage space: we replace 3 QRectF instances, whose width and height will normally be the same, with 3 positions (bringing the total to 12 QPointF's) and one set of axes. Further, most applications only care about the center of each contact patch, so it's better to store that explicitly instead of calculating QRectF::center() repeatedly. In the past there may have been an assumption that the width of the rect is the same as the horizontalDiameter of the ellipse, so the rect could be considered to be rotated, and the ellipse to be inscribed. But in d0b1c646b4a351f7eea2137c68993ae63b2b6bab and 40e4949674eaf7ceb09f6d18479ead1a36b384fd the point was made that the rect is actually the bounding box of the rotated ellipse. [ChangeLog][QtGui][QTouchEvent] TouchPoint::rect(), sceneRect() and screenRect() are deprecated; a touchpoint is now modeled as an ellipse, so please use pos(), scenePos(), screenPos(), horizontalDiameter() and verticalDiameter() instead. Change-Id: Ic06f6165e2d90fc9d4cc19cf4938d4faf5766bb4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Silence warning from syncqtUlf Hermann2016-09-151-1/+1
| | | | | | | | | Apparently syncqt considers anything like "<blah.h>" to be an include statement, even if it's in a comment. Yet, in fact, the comment was not entirely correct here. Change-Id: I7a661007ee86bb20242d54eb128c6b646cac15e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-011-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| * Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-261-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qtemporarydir.cpp One side encapsulated a repeated piece of #if-ery in a local define; the other added to the #if-ery. Made its addition to the other's. src/corelib/kernel/qeventdispatcher_unix_p.h One side moved some members into a struct; this collided with a #undef check that neither side now has. Discarded the #undef part. src/gui/opengl/qopengltexturehelper_p.h 5.7 deleted a bunch of methods; not clear why merge got confused. src/tools/moc/moc.cpp One added a name to the copyright header; another changed its URL. Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
| | * Work around ICC bug about shadowing declarations that aren't shadowingThiago Macieira2016-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Known ICC bug, still present in version 17 beta. qdatetime.h(126): error #3280: declaration hides member "QDate::jd" (declared at line 136) Obviously a parameter to static function or to a function in a nested class can't shadow an NSDM. Intel issue IDs: 0000698329 / DPD200245740 Change-Id: I149e0540c00745fe8119fffd1463c679a3a9c8c3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Add helper function to reset QMouseEvent localPosFrederik Gladhorn2016-08-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt Quick there are many places which copy mouse events repeatedly, with the only goal of adjusting the local position. Instead it's much more sensible to re-use the same event. Change-Id: I2c6f2b73ee3a7a6df489f813cf2f60b48a6e48df Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QPointerUniqueId::numeric() is constShawn Rutledge2016-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Obviously it returns a copy of the number, and anyone who has a const QPointerUniqueId variable will need this accessor to be const. Change-Id: Ib224a4dfca5d0f71f2fa4f6f6197b2fb2cdb9410 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. A similar scheme and naming convention is already being used for many other modules (e.g. printsupport, qml, quick). That header will later on #include the configuration file for Qt Gui. For now it defines the Q_GUI_EXPORT macro for this library. In addition, add a private global header, qtguiglobal_p.h, that can later on include the private config header for Qt Gui for things we don't want to export to the world. Change-Id: Id9ce2a4f3d2962c3592c35e3d080574789195f24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QTouchEvent: add uniqueId and rotation; TUIO: support fiducial tokensShawn Rutledge2016-04-071-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TUIO supports tracking tagged physical objects on touchscreens by various means (QR codes, RFIDs etc.) It can detect both position and rotation. Likewise, it may be possible for some touchscreens or drivers to detect orientation of the fingers. So, just as QTabletEvent has rotation, each touchpoint needs to include the rotation value. When using tokens, each object has a permanent unique ID, whereas QTouchEvent::TouchPoint::id() is a transient ID which usually auto- increments each time a finger is pressed to the device. So we need to make that available too, to identify each token. Different platforms may use different kinds of IDs (int, UUID, QR code etc.); however for TUIO 1.x, the unique IDs are just 32-bit integers. QPointerUniqueId is added, storing only a qint64 for now (like QTabletEvent::uniqueId()) but able to be expanded as necessary later on. Task-number: QTBUG-51844 Change-Id: I04182042f47fa2954728079139a4664a31184b54 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-03-221-1/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/common/wince/qplatformdefs.h src/plugins/platforms/directfb/qdirectfbbackingstore.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
| * | Add QWheelEvent::inverted()Morten Johan Sørvig2016-03-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some consumers of wheel events need to know if the scrolling direction is inverted in order to provide consistent behavior. For example, the scrolling direction of a horizontal slider should not change when the user toggles the "natural scrolling" setting on OS X. In this case the inverted bit will change state and the slider can compensate. This change adds a bit to QWheelEvent and sets it on OS X. Task-number: QTBUG-35972 Change-Id: I221435dea45d436d570b113bd0e24ee6f6832211 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * | QtGui: mark some more types as movable/primitiveMarc Mutz2016-03-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are already held in QVectors. Public API types need to wait until Qt 6, for BC reasons. Even though Q_RELOCATABLE_TYPE deals with most of them, we lack a way to mark a type as primitive, but still isStatic - for QList. Change-Id: I91392b01ae6f94cc847007636e12d4e64c43b2bc Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-03-011-0/+2
|\| | | | | | | | | | | Change-Id: Ic7aaa06f4a14b1aed61faa1a6e7f527ee0eeb96b
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-291-0/+2
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qprocess/tst_qprocess.cpp Change-Id: Ib6955eb874b516b185b45d6c38cec646fbaa95f4
| | * Track target widget when wheel events are receivedGabriel de Dietrich2016-02-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This issue is reproducible on OS X when using a Magic Mouse or a combination of Magic Trackpad and regular mouse. In these cases it's possible to start a scrolling gesture on one widget and move the mouse cursor over another widget. Although we send the wheel event phase information, we never made any use of it. This means that a widget would start scrolling even though it never received a ScrollBegin event. In this patch, we make sure the scrolling cycle is respected and that once a widget starts scrolling, it'll be recieving all the wheel events until a ScrollEnd event reaches the application. For those input devices not supporting a proper phase cycle, we introduce a new (undocumented) phase value, NoScrollPhase. If the wheel event phase is NoScrollPhase, then we ignore the current scroll widget and proceed as usual. This value is the default for wheel events. It's up to the platform plugin to set the proper phase value according to the data received from the OS. Finally, we fix a few of QWheelEvent constructors to properly initialize the phase and source properties. Task-number: QTBUG-50199 Change-Id: I3773729a9c757e2d2fcc5100dcd79f0ed26cb808 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-02-251-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_module.prf src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm Change-Id: I7912c23b02b186831f0e465dbe5d1f9936205439
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-241-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| | * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or similar. This amends previous commits that converted the majority of cases. Task-number: QTBUG-45291 Change-Id: I219cdeddca7063a56efeb4fee0e5bb2cbdc7732b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QInputMethodEvent::Attribute: add ctor that doesn't take a QVariantMarc Mutz2016-02-201-1/+2
|/ / | | | | | | | | | | | | | | | | | | | | Many callers passed QVariant() as the last ctor argument. Micro-optimize by providing an overload that default- constructs the variant in-place. Change-Id: I9aab40c6e5a025c9a502c706e4cc7b10879ac418 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>