summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-04-28 10:41:57 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2023-04-28 12:52:46 +0000
commitdbfd378f5c2bae4fc8950493e4976490eae00e58 (patch)
treef0847036114bd00ef8d474332194d7fb46127c70
parent239805e5400972839a42d1bae3168549f0b359ee (diff)
downloadqt-creator-dbfd378f5c2bae4fc8950493e4976490eae00e58.tar.gz
Wizards: Fix "New Class" with QML_ELEMENT and no QQuickItem include
Amends 2f94e93334af366589fb2c5dcbff33a0694b6074. Fixes: QTCREATORBUG-29092 Change-Id: Ic27729a601534f5b4ed98451f637b9d49029a33a Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
-rw-r--r--share/qtcreator/templates/wizards/classes/cpp/file.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/share/qtcreator/templates/wizards/classes/cpp/file.h b/share/qtcreator/templates/wizards/classes/cpp/file.h
index 77f1b21351..ad2b178e8f 100644
--- a/share/qtcreator/templates/wizards/classes/cpp/file.h
+++ b/share/qtcreator/templates/wizards/classes/cpp/file.h
@@ -17,6 +17,7 @@
( '%{IncludeQMainWindow}' ) ? 'QtWidgets/%{IncludeQMainWindow}' : '',
( '%{IncludeQDeclarativeItem}' ) ? 'QtQuick1/%{IncludeQDeclarativeItem}' : '',
( '%{IncludeQQuickItem}' ) ? 'QtDeclarative/%{IncludeQQuickItem}' : '',
+ ( '%{AddQmlElementMacro}' && !'%{IncludeQQuickItem}' ) ? 'QtQml/QQmlEngine' : '',
( '%{IncludeQSharedData}' ) ? 'QtCore/QSharedDataPointer' : '' ])}\
%{JS: Cpp.openNamespaces('%{Class}')}
@if '%{IncludeQSharedData}'