qt6-bb10/src/corelib
Marc Mutz bc087db590 QtTest: fix UB in QSpontaneKeyEvent::setSpontaneous()
Found by UBSan:

  src/testlib/qtestspontaneevent.h:95:38: runtime error: member call on address 0x7ffc33019650 which does not point to an object of type 'QSpontaneKeyEvent' 0x7ffc33019650: note: object is of type 'QMouseEvent'
  83 2b 00 00  98 e8 fa 8e 83 2b 00 00  00 00 00 00 00 00 00 00  02 00 04 00 00 00 00 00  00 00 00 00
               ^~~~~~~~~~~~~~~~~~~~~~~
               vptr for 'QMouseEvent'

  src/testlib/qtestspontaneevent.h:95:38: runtime error: member call on address 0x7ffc330196e0 which does not point to an object of type 'QSpontaneKeyEvent' 0x7ffc330196e0: note: object is of type 'QKeyEvent'
  00 00 00 00  f8 e8 fa 8e 83 2b 00 00  00 00 00 00 00 00 00 00  07 00 04 00 00 00 00 00  00 00 00 00
               ^~~~~~~~~~~~~~~~~~~~~~~
               vptr for 'QKeyEvent'

Fix by providing setSpontaneous() on QEvent as a private function and
befriending QSpontaneKeyEvent. Make setSpontaneous() always-inline to
avoid BiC between 5.6.0 and 5.6.1.

Change-Id: Ic60d82ed6a858f4f13f41fa3d2d1db6e808896b7
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-07 16:13:33 +00:00
..
animation QSequentialAnimationGroupPrivate: replace an inefficient QList with QVector 2015-07-13 10:36:34 +00:00
arch Make public headers compile with -Wzero-as-null-pointer-constant 2016-02-19 16:37:33 +00:00
codecs Reduce allocations by using reserve() 2016-02-07 16:50:26 +00:00
doc Doc: Add the missing \l command and the target section title 2016-03-01 08:56:48 +00:00
global QNX: Fix logging of QtDebugMsg in slog2 backend 2016-03-07 14:24:02 +00:00
io Remove QT_MOC_COMPAT from deprecated QProcess::error signal 2016-03-04 12:07:23 +00:00
itemmodels Reduce allocations by using reserve() 2016-02-07 16:50:26 +00:00
json QJsonPrivate::q_littleendian: mark as primitive/movable, depending on T 2016-03-01 08:48:52 +00:00
kernel QtTest: fix UB in QSpontaneKeyEvent::setSpontaneous() 2016-03-07 16:13:33 +00:00
mimetypes QMimeBinaryProvider::loadMimeTypePrivate(): Make name check case insensitive. 2016-03-02 14:52:59 +00:00
plugin Link with -ldl option only when it is supported 2016-02-05 16:29:09 +00:00
statemachine Allow QFinalStatePrivate to be subclassed. 2016-01-28 16:24:46 +00:00
thread Revert "Don't add qmutex_xxx.cpp to SOURCES, as qmutex.cpp #include's them" 2016-03-07 14:09:45 +00:00
tools Merge remote-tracking branch 'origin/5.6.0' into 5.6 2016-02-15 08:09:50 +01:00
xml QXmlStreamStringRef: unbreak move special member functions 2015-11-19 07:40:49 +00:00
Qt5CTestMacros.cmake CMake: Introduce qt5_add_binary_resources 2015-02-11 20:59:35 +00:00
Qt5Config.cmake.in Check that files we expect to find actually exist when using a cmake package. 2013-05-20 15:20:26 +02:00
Qt5CoreConfigExtras.cmake.in CMake: Add -fPIC to CXX flags only where necessary 2015-12-28 22:39:58 +00:00
Qt5CoreConfigExtrasMkspecDir.cmake.in Generate the directory for the mkspec include in a helper file. 2013-06-21 18:58:54 +02:00
Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in Generate the directory for the mkspec include in a helper file. 2013-06-21 18:58:54 +02:00
Qt5CoreMacros.cmake CMake: Fix qt5_use_modules macro for CMake 2.8.11 2016-01-11 09:53:32 +00:00
QtCore.dynlist
corelib.pro consistently put {qt,qml}_{module,plugin} at the end of project files 2016-03-07 14:09:49 +00:00
eval.pri
qtzlib.pro make a proper header-only module for QtZlib 2015-11-17 20:22:17 +00:00