aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qml/qmlpuppet
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2022-10-10 17:41:03 +0200
committerMarco Bubke <marco.bubke@qt.io>2022-10-12 16:29:56 +0000
commitba891e7f346d9d212f45d25ef7969842f41b13d2 (patch)
tree79f7cf254e141481fad7aff2b2681bb262c76fc4 /share/qtcreator/qml/qmlpuppet
parent21b0a69331c3e161893afaf8b27669544fc51b26 (diff)
QmlDesigner: Prevent calling the node instance view directly
Views should not write to the node instance view directly. Instead they should use the model for manipulation. Change-Id: I3941cc691addab939b8032952230cbe03951730b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet')
-rw-r--r--share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceglobal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceglobal.h b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceglobal.h
index 528f9effe4..968a9bef0f 100644
--- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceglobal.h
+++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceglobal.h
@@ -50,4 +50,13 @@ enum class View3DActionType {
SyncBackgroundColor,
GetNodeAtPos
};
+
+constexpr bool isNanotraceEnabled()
+{
+#ifdef NANOTRACE_ENABLED
+ return true;
+#else
+ return false;
+#endif
+}
}