forked from qt-creator/qt-creator
The header file must be referenced relative to the location of the source file. Task-number: QTCREATORBUG-15599 Change-Id: Ib7d4aa5a62a94541cbe32cd340a8a1e7d6ef35e5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
42 lines
925 B
C++
42 lines
925 B
C++
%{Cpp:LicenseTemplate}\
|
|
#include "%{JS: Util.relativeFilePath('%{Path}/%{HdrFileName}', '%{Path}' + '/' + Util.path('%{SrcFileName}'))}"
|
|
%{JS: Cpp.openNamespaces('%{Class}')}
|
|
@if '%{IncludeQSharedData}'
|
|
class %{CN}Data : public QSharedData
|
|
{
|
|
public:
|
|
|
|
};
|
|
|
|
@endif
|
|
@if '%{Base}' === 'QObject'
|
|
%{CN}::%{CN}(QObject *parent) : QObject(parent)%{JS: ('%{SharedDataInit}') ? ', %{SharedDataInit}' : ''}
|
|
@elsif '%{Base}' === 'QWidget' || '%{Base}' === 'QMainWindow'
|
|
%{CN}::%{CN}(QWidget *parent) : %{Base}(parent)%{JS: ('%{SharedDataInit}') ? ', %{SharedDataInit}' : ''}
|
|
@else
|
|
%{CN}::%{CN}()%{JS: ('%{SharedDataInit}') ? ' : %{SharedDataInit}' : ''}
|
|
@endif
|
|
{
|
|
|
|
}
|
|
@if '%{IncludeQSharedData}'
|
|
|
|
%{CN}::%{CN}(const %{CN} &rhs) : data(rhs.data)
|
|
{
|
|
|
|
}
|
|
|
|
%{CN} &%{CN}::operator=(const %{CN} &rhs)
|
|
{
|
|
if (this != &rhs)
|
|
data.operator=(rhs.data);
|
|
return *this;
|
|
}
|
|
|
|
%{CN}::~%{CN}()
|
|
{
|
|
|
|
}
|
|
@endif
|
|
%{JS: Cpp.closeNamespaces('%{Class}')}\
|