forked from qt-creator/qt-creator
QmlDesigner: Add image cache
The image cache is saving images and icon of this images in a sqlite database. If there are no images they are generated in the backgound. The icons are fetched by item library. Task-number: QDS-2782 Task-number: QDS-2783 Task-number: QDS-2858 Change-Id: I5a32cccfef7f8fd8eb78902605a09f5da18ce88e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -566,7 +566,7 @@ QRectF QuickItemNodeInstance::boundingRectWithStepChilds(QQuickItem *parentItem)
|
||||
|
||||
boundingRect = boundingRect.united(QRectF(QPointF(0, 0), size()));
|
||||
|
||||
foreach (QQuickItem *childItem, parentItem->childItems()) {
|
||||
for (QQuickItem *childItem : parentItem->childItems()) {
|
||||
if (!nodeInstanceServer()->hasInstanceForObject(childItem)) {
|
||||
QRectF transformedRect = childItem->mapRectToItem(parentItem, boundingRectWithStepChilds(childItem));
|
||||
if (isRectangleSane(transformedRect))
|
||||
@@ -574,6 +574,9 @@ QRectF QuickItemNodeInstance::boundingRectWithStepChilds(QQuickItem *parentItem)
|
||||
}
|
||||
}
|
||||
|
||||
if (boundingRect.isEmpty())
|
||||
QRectF{0, 0, 640, 480};
|
||||
|
||||
return boundingRect;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user