summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJere Tuliniemi <jere.tuliniemi@qt.io>2017-11-30 10:39:54 +0200
committerJere Tuliniemi <jere.tuliniemi@qt.io>2017-12-01 07:56:17 +0000
commitd19aa455a4a8052520439e4796b02217fc7e924f (patch)
tree2545b9080c96a9afc83065fdfeebad3ed89bed7c
parent7d91a5c8e12f52c068adfc7106fa7c013a0dbaa4 (diff)
Fix import error when adding behaviors
The studio now also registers the Q3DSQmlBehavior type so that the error checking works correctly. Task-number: QT3DS-594 Change-Id: Ifd84440ed6c3216ec1d44fa350efb27bd3c1b208 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp2
-rw-r--r--src/Runtime/Source/Runtime/Include/q3dsqmlbehavior.h4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
index 417bf293..ecb62fdb 100644
--- a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
@@ -86,6 +86,7 @@
#include <QtQml/qqmlcomponent.h>
#include <QtCore/qdir.h>
#include <unordered_set>
+#include "Runtime/Include/q3dsqmlbehavior.h"
extern "C" {
#include "lua.h"
@@ -231,6 +232,7 @@ public:
theSystem->AddDirectory(m_Doc.GetDocumentDirectory().toQString(),
std::bind(&CDocEditor::OnProjectDirChanged, this,
std::placeholders::_1));
+ qmlRegisterType<Q3DSQmlBehavior>("QtStudio3D.Behavior", 1, 0, "Behavior");
}
virtual ~CDocEditor()
{
diff --git a/src/Runtime/Source/Runtime/Include/q3dsqmlbehavior.h b/src/Runtime/Source/Runtime/Include/q3dsqmlbehavior.h
index b4860b8a..310d8caa 100644
--- a/src/Runtime/Source/Runtime/Include/q3dsqmlbehavior.h
+++ b/src/Runtime/Source/Runtime/Include/q3dsqmlbehavior.h
@@ -37,10 +37,6 @@
#include <QtGui/qvector3d.h>
#include <QtGui/qmatrix4x4.h>
-#include "Qt3DSTypes.h"
-#include "Qt3DSKernelTypes.h"
-#include "Qt3DSEvent.h"
-
namespace Q3DStudio {
class Q3DSQmlScript;