GIT_SILENT Fix formatting for templates
This commit is contained in:
parent
c7c0146cc6
commit
9b7b38004e
2
templates/.clang-format
Normal file
2
templates/.clang-format
Normal file
@ -0,0 +1,2 @@
|
||||
DisableFormat: true
|
||||
SortIncludes: false
|
@ -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;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef %{APPNAMEUC}_H
|
||||
#define %{APPNAMEUC}_H
|
||||
|
||||
|
||||
#include <Plasma/Applet>
|
||||
|
||||
class %{APPNAME} : public Plasma::Applet
|
||||
|
@ -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}"));
|
||||
|
@ -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}"));
|
||||
|
Loading…
Reference in New Issue
Block a user