diff options
Diffstat (limited to 'share/qtcreator/templates/wizards/projects/cpplibrary/lib.cpp')
-rw-r--r-- | share/qtcreator/templates/wizards/projects/cpplibrary/lib.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/share/qtcreator/templates/wizards/projects/cpplibrary/lib.cpp b/share/qtcreator/templates/wizards/projects/cpplibrary/lib.cpp new file mode 100644 index 0000000000..23bf7797da --- /dev/null +++ b/share/qtcreator/templates/wizards/projects/cpplibrary/lib.cpp @@ -0,0 +1,17 @@ +%{Cpp:LicenseTemplate}\ +#include "%{HdrFileName}" +%{JS: Cpp.openNamespaces('%{Class}')}\ + +@if ! %{IsQtPlugin} +%{CN}::%{CN}() +{ +} +@else +%{CN}::%{CN}(QObject *parent) + : %{BaseClassName}(parent) +{ +} +%{JS: '%{PluginMethods}'.split('|').map(s => '\n' + s.replace(/([a-zA-Z0-9]+\()/, '%{CN}::$1') + '\n\u007B\n static_assert(false, "You need to implement this function");\n\u007D').join('\n')}\ + +@endif +%{JS: Cpp.closeNamespaces('%{Class}')}\ |