summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qtableview.cpp
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2019-04-09 13:38:06 +0200
committerMilian Wolff <milian.wolff@kdab.com>2019-04-09 15:46:35 +0000
commit5f2afe18ccb0bbe258d4016ef65218cd3656cac2 (patch)
tree4f20c62ba8bc1fd5d519be1672ebf31ef7dd4f90 /src/widgets/itemviews/qtableview.cpp
parent6d4a456a28282973d2501e0b16f09cafb316bb0a (diff)
Fix QMetaObject::newInstance on non-QObject meta object
QMetaObject::newInstance returns a QObject, thus it's not possible to create a new instance of a Q_GADGET using this function. Previously, we returned a non-null QObject pointer for such scenarios, which then leads to crashes when one tries to use it. Now, we check whether the meta object inherits QObject's meta object, and error out early otherwise. Change-Id: I7b1fb6c8d48b3e98161894be2f281a491963345e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/itemviews/qtableview.cpp')
0 files changed, 0 insertions, 0 deletions