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,32 +6,21 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
K_EXPORT_PLASMA_APPLET_WITH_JSON(% {APPNAMELC}, % {APPNAME}, "metadata.json")
|
||||
K_EXPORT_PLASMA_APPLET_WITH_JSON(%{APPNAMELC}, %{APPNAME}, "metadata.json")
|
||||
|
||||
#include "%{APPNAMELC}.moc"
|
||||
|
@ -3,19 +3,20 @@
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef % {APPNAMEUC } _H
|
||||
#define % {APPNAMEUC } _H
|
||||
#ifndef %{APPNAMEUC}_H
|
||||
#define %{APPNAMEUC}_H
|
||||
|
||||
|
||||
#include <Plasma/Applet>
|
||||
|
||||
class % {APPNAME} : public Plasma::Applet
|
||||
class %{APPNAME} : public Plasma::Applet
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString nativeText READ nativeText CONSTANT)
|
||||
|
||||
public:
|
||||
% {APPNAME}(QObject * parent, const QVariantList &args);
|
||||
~ % {APPNAME}();
|
||||
%{APPNAME}( QObject *parent, const QVariantList &args );
|
||||
~%{APPNAME}();
|
||||
|
||||
QString nativeText() const;
|
||||
|
||||
|
@ -9,10 +9,10 @@
|
||||
#include <KLocalizedString>
|
||||
// Qt
|
||||
#include <QJSEngine>
|
||||
#include <QQmlContext>
|
||||
#include <QQmlEngine>
|
||||
#include <QQmlContext>
|
||||
|
||||
static QJSValue singletonTypeExampleProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
|
||||
static QJSValue singletonTypeExampleProvider(QQmlEngine* engine, QJSEngine* scriptEngine)
|
||||
{
|
||||
Q_UNUSED(engine)
|
||||
|
||||
@ -21,7 +21,8 @@ static QJSValue singletonTypeExampleProvider(QQmlEngine *engine, QJSEngine *scri
|
||||
return helloWorld;
|
||||
}
|
||||
|
||||
void % {APPNAME} Plugin::registerTypes(const char *uri)
|
||||
|
||||
void %{APPNAME}Plugin::registerTypes(const char* uri)
|
||||
{
|
||||
Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.%{APPNAMELC}"));
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef % {APPNAMEUC } PLUGIN_H
|
||||
#define % {APPNAMEUC } PLUGIN_H
|
||||
#ifndef %{APPNAMEUC}PLUGIN_H
|
||||
#define %{APPNAMEUC}PLUGIN_H
|
||||
|
||||
#include <QQmlExtensionPlugin>
|
||||
|
||||
class % {APPNAME} Plugin : public QQmlExtensionPlugin
|
||||
class %{APPNAME}Plugin : public QQmlExtensionPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
|
||||
|
@ -9,10 +9,10 @@
|
||||
#include <KLocalizedString>
|
||||
// Qt
|
||||
#include <QJSEngine>
|
||||
#include <QQmlContext>
|
||||
#include <QQmlEngine>
|
||||
#include <QQmlContext>
|
||||
|
||||
static QJSValue singletonTypeExampleProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
|
||||
static QJSValue singletonTypeExampleProvider(QQmlEngine* engine, QJSEngine* scriptEngine)
|
||||
{
|
||||
Q_UNUSED(engine)
|
||||
|
||||
@ -21,7 +21,8 @@ static QJSValue singletonTypeExampleProvider(QQmlEngine *engine, QJSEngine *scri
|
||||
return helloWorld;
|
||||
}
|
||||
|
||||
void % {APPNAME} Plugin::registerTypes(const char *uri)
|
||||
|
||||
void %{APPNAME}Plugin::registerTypes(const char* uri)
|
||||
{
|
||||
Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.%{APPNAMELC}"));
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef % {APPNAMEUC } PLUGIN_H
|
||||
#define % {APPNAMEUC } PLUGIN_H
|
||||
#ifndef %{APPNAMEUC}PLUGIN_H
|
||||
#define %{APPNAMEUC}PLUGIN_H
|
||||
|
||||
#include <QQmlExtensionPlugin>
|
||||
|
||||
class % {APPNAME} Plugin : public QQmlExtensionPlugin
|
||||
class %{APPNAME}Plugin : public QQmlExtensionPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
|
||||
|
Loading…
Reference in New Issue
Block a user