Files
qt-creator/share/qtcreator/templates/wizards/projects/cpplibrary/lib.h
Eike Ziller cb63706f83 Move C++ Library wizard to JSON
And add build system option (QMake & CMake)

Task-number: QTCREATORBUG-17308
Fixes: QTCREATORBUG-14605
Change-Id: Ibfadc4bffeabd7ec11271647460a21b6400625c7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-04-17 10:53:21 +00:00

49 lines
787 B
C++

%{Cpp:LicenseTemplate}\
@if '%{Cpp:PragmaOnce}'
#pragma once
@else
#ifndef %{GUARD}
#define %{GUARD}
@endif
@if %{IsShared}
#include "%{GlobalHdrFileName}"
@elsif %{IsQtPlugin}
#include <%{BaseClassName}>
@endif
%{JS: Cpp.openNamespaces('%{Class}')}\
@if %{IsShared}
class %{LibraryExport} %{CN}
{
public:
%{CN}();
};
@elsif %{IsStatic}
class %{CN}
{
public:
%{CN}();
};
@else
class %{CN} : public %{BaseClassName}
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.%{PluginInterface}" FILE "%{PluginJsonFile}")
public:
explicit %{CN}(QObject *parent = nullptr);
private:
%{JS: '%{PluginMethods}'.split('|').map(s => ' ' + s + ' override;').join('\n')}
};
@endif
%{JS: Cpp.closeNamespaces('%{Class}')}\
@if ! '%{Cpp:PragmaOnce}'
#endif // %{GUARD}
@endif