tests|qtquick: Don't create lots of spurious QQuickView

Most of the times we just want to create a dock widget which
will be parented immediately, we don't need the window.
This commit is contained in:
Sergio Martins
2022-06-06 10:13:19 +01:00
parent 2beb4982b0
commit e8f390f2ad
5 changed files with 34 additions and 27 deletions

View File

@@ -74,7 +74,7 @@ View *Platform_qtquick::tests_createView(CreateViewOptions opts, View *parent)
auto parentItem = parent ? Views::asQQuickItem(parent) : nullptr;
auto newItem = new TestView_qtquick(opts, parentItem);
if (!parentItem) {
if (!parentItem && opts.createWindow) {
auto view = new QQuickView(m_qmlEngine, nullptr);
view->resize(QSize(800, 800));