GIT_SILENT Fix formatting for templates

This commit is contained in:
Alexander Lohnau 2021-03-13 21:52:20 +01:00
parent c7c0146cc6
commit 9b7b38004e
No known key found for this signature in database
GPG Key ID: 6C45BA731AA2ED36
7 changed files with 29 additions and 35 deletions

2
templates/.clang-format Normal file
View File

@ -0,0 +1,2 @@
DisableFormat: true
SortIncludes: false

View File

@ -6,28 +6,17 @@
#include "%{APPNAMELC}.h"
#include <KLocalizedString>
%
{
APPNAME
}
::
% {APPNAME}(QObject *parent, const QVariantList &args)
: Plasma::Applet(parent, args)
, m_nativeText(i18n("Text coming from C++ plugin")){}
%
{
APPNAME
}
::~ % {APPNAME}()
%{APPNAME}::%{APPNAME}(QObject *parent, const QVariantList &args)
: Plasma::Applet(parent, args),
m_nativeText(i18n("Text coming from C++ plugin"))
{
}
QString %
%{APPNAME}::~%{APPNAME}()
{
APPNAME
}
::nativeText() const
QString %{APPNAME}::nativeText() const
{
return m_nativeText;
}

View File

@ -6,6 +6,7 @@
#ifndef %{APPNAMEUC}_H
#define %{APPNAMEUC}_H
#include <Plasma/Applet>
class %{APPNAME} : public Plasma::Applet

View File

@ -9,8 +9,8 @@
#include <KLocalizedString>
// Qt
#include <QJSEngine>
#include <QQmlContext>
#include <QQmlEngine>
#include <QQmlContext>
static QJSValue singletonTypeExampleProvider(QQmlEngine* engine, QJSEngine* scriptEngine)
{
@ -21,6 +21,7 @@ static QJSValue singletonTypeExampleProvider(QQmlEngine *engine, QJSEngine *scri
return helloWorld;
}
void %{APPNAME}Plugin::registerTypes(const char* uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.%{APPNAMELC}"));

View File

@ -9,8 +9,8 @@
#include <KLocalizedString>
// Qt
#include <QJSEngine>
#include <QQmlContext>
#include <QQmlEngine>
#include <QQmlContext>
static QJSValue singletonTypeExampleProvider(QQmlEngine* engine, QJSEngine* scriptEngine)
{
@ -21,6 +21,7 @@ static QJSValue singletonTypeExampleProvider(QQmlEngine *engine, QJSEngine *scri
return helloWorld;
}
void %{APPNAME}Plugin::registerTypes(const char* uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.%{APPNAMELC}"));