QmlDesigner:Instances: Adding instance for QQuickWindow

This allows QuickWindowNodeInstance to return the content item
instead.

The function parentObject() in ObjectNodeInstance now knows
QQuickRootItem, because the parent of the root item should
is the windows (which is just a QObject but treated as item from us).

Change-Id: Ibaa7ccc8dd9346689cc4443ce0b594056feaa0cf
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Thomas Hartmann
2013-04-18 11:56:23 +02:00
parent 67825ab2dc
commit 58e280de2c
5 changed files with 744 additions and 1 deletions
@@ -40,6 +40,7 @@
#include "debugoutputcommand.h"
#include "quickitemnodeinstance.h"
#include "quickwindownodeinstance.h"
#include "nodeinstanceserver.h"
#include "instancecontainer.h"
@@ -194,6 +195,8 @@ Internal::ObjectNodeInstance::Pointer ServerNodeInstance::createInstance(QObject
instance = Internal::QmlTransitionNodeInstance::create(objectToBeWrapped);
else if (isSubclassOf(objectToBeWrapped, "QQuickBehavior"))
instance = Internal::BehaviorNodeInstance::create(objectToBeWrapped);
else if (isSubclassOf(objectToBeWrapped, "QQuickWindow"))
instance = Internal::QuickWindowNodeInstance::create(objectToBeWrapped);
else if (isSubclassOf(objectToBeWrapped, "QObject"))
instance = Internal::ObjectNodeInstance::create(objectToBeWrapped);
else