diff options
Diffstat (limited to 'src/animation/frontend/qchannelmapping.cpp')
-rw-r--r-- | src/animation/frontend/qchannelmapping.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/animation/frontend/qchannelmapping.cpp b/src/animation/frontend/qchannelmapping.cpp index b3d3816a0..faa77f5db 100644 --- a/src/animation/frontend/qchannelmapping.cpp +++ b/src/animation/frontend/qchannelmapping.cpp @@ -74,6 +74,15 @@ void QChannelMappingPrivate::updatePropertyNameAndType() QMetaProperty mp = mo->property(propertyIndex); propertyName = mp.name(); type = mp.userType(); + if (type == QMetaType::QVariant) { + QVariant currentValue = m_target->property(mp.name()); + if (currentValue.isValid()) { + type = currentValue.userType(); + } else { + qWarning("QChannelMapping: Attempted to target QVariant property with no value set. " + "Set a value first in order to be able to determine the type."); + } + } } if (m_type != type) { |