2D: Use loadFromModule instead of setData
Using QQmlComponent::setData is problematic in a code where the same
type is created again and again since the created QQmlTypeData is not
cached. QGraphsView uses it in componentComplete to create zoom area so
if multiple graphsviews are created, the engine allocates space for
every graphsview's zoom areas. This patch changes Graph2D to use
QQmlComponent::loadFromModule rather than QQmlComponent::setData.
Task-number: QTBUG-142559
Change-Id: I1d59ed99a22fd57235af5603f991865be1e6d3c9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>