aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickapplicationwindow.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-03-21 15:08:42 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2018-03-23 16:51:31 +0000
commita064824341375206603f794e2b8d8b1f87f016a8 (patch)
tree06a045723506d6bf4879f8dcd5b10dcc91c558e9 /src/quicktemplates2/qquickapplicationwindow.cpp
parent5178f6269418d731efe6bec7bc541f21fdd6d7f4 (diff)
Add QQuickContentItem to produce more useful debug output
With the following code: ApplicationWindow { Component.onCompleted: print(contentItem) } Before: QQuickItem(0x16043e52600) After: QQuickContentItem(0x28a89b96440, "ApplicationWindow") QQuickWindow has a similar concept (QQuickRootItem). Change-Id: I6504b62c69cfd7d9036d5c200a65542b953bc7bc Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickapplicationwindow.cpp')
-rw-r--r--src/quicktemplates2/qquickapplicationwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickapplicationwindow.cpp b/src/quicktemplates2/qquickapplicationwindow.cpp
index edbc9e91..97624b9d 100644
--- a/src/quicktemplates2/qquickapplicationwindow.cpp
+++ b/src/quicktemplates2/qquickapplicationwindow.cpp
@@ -35,6 +35,7 @@
****************************************************************************/
#include "qquickapplicationwindow_p.h"
+#include "qquickcontentitem_p.h"
#include "qquickoverlay_p.h"
#include "qquickpopup_p_p.h"
#include "qquickcontrol_p_p.h"
@@ -584,7 +585,7 @@ QQuickItem *QQuickApplicationWindow::contentItem() const
{
QQuickApplicationWindowPrivate *d = const_cast<QQuickApplicationWindowPrivate *>(d_func());
if (!d->contentItem) {
- d->contentItem = new QQuickItem(QQuickWindow::contentItem());
+ d->contentItem = new QQuickContentItem(QStringLiteral("ApplicationWindow"), QQuickWindow::contentItem());
d->contentItem->setFlag(QQuickItem::ItemIsFocusScope);
d->contentItem->setFocus(true);
d->relayout();