Commit 828b0de5 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

C++ class wizard: Do not add Q_OBJECT macro for non-QObjects



Task-number: QTCREATORBUG-14515
Change-Id: I02e423acc53ae23169399bc9b86b4753cb84f7a2
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@theqtcompany.com>
parent c5309964
......@@ -24,7 +24,7 @@ class %{CN} : public %{Base}
class %{CN}
@endif
{
@if '%{isQObject}'
@if %{isQObject}
Q_OBJECT
@endif
public:
......
......@@ -16,7 +16,7 @@
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
{ "key": "Base", "value": "%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" },
{ "key": "isQObject", "value": "%{JS: '%{Base}' === 'QObject' || '%{Base}' === 'QWidget' || '%{Base}' === 'QMainWindow' || '%{Base}' === 'QDeclarativeItem' || '%{Base}' === 'QQuickItem' }" },
{ "key": "isQObject", "value": "%{JS: [ 'QObject', 'QWidget', 'QMainWindow', 'QDeclarativeItem', 'QQuickItem'].indexOf('%{Base}') >= 0 }" },
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" },
{ "key": "SharedDataInit", "value": "%{JS: ('%{IncludeQSharedData}') ? 'data(new %{CN}Data)' : '' }" }
],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment