1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-06-30 09:12:29 +00:00

Add style command && applied new style format to existing code && setup tests plugins

This commit is contained in:
2019-03-21 11:22:12 +01:00
parent aa4018c680
commit 7dc320f8ce
30 changed files with 355 additions and 267 deletions

View File

@ -3,12 +3,14 @@
#include "pass.h"
Pass::Pass() {
Pass::Pass()
{
}
void Pass::speak() {
qDebug() << "Starting app from main.cpp";
void Pass::speak()
{
qDebug() << "Starting app from main.cpp";
}

View File

@ -3,15 +3,16 @@
#include <QObject>
class Pass : public QObject {
Q_OBJECT
QString gpgHome;
class Pass : public QObject
{
Q_OBJECT
QString gpgHome;
public:
Pass();
~Pass() override = default;
public:
Pass();
~Pass() override = default;
Q_INVOKABLE void speak();
Q_INVOKABLE void speak();
};
#endif

View File

@ -3,7 +3,8 @@
#include "plugin.h"
#include "pass.h"
void PassPlugin::registerTypes(const char *uri) {
//@uri Pass
qmlRegisterSingletonType<Pass>(uri, 1, 0, "Pass", [](QQmlEngine *, QJSEngine *) -> QObject * { return new Pass; });
void PassPlugin::registerTypes(const char *uri)
{
//@uri Pass
qmlRegisterSingletonType<Pass>(uri, 1, 0, "Pass", [](QQmlEngine *, QJSEngine *) -> QObject * { return new Pass; });
}

View File

@ -3,13 +3,14 @@
#include <QQmlExtensionPlugin>
class PassPlugin : public QQmlExtensionPlugin {
Q_OBJECT
Q_PLUGIN_METADATA(IID
"org.qt-project.Qt.QQmlExtensionInterface")
class PassPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID
"org.qt-project.Qt.QQmlExtensionInterface")
public:
void registerTypes(const char *uri) override;
public:
void registerTypes(const char *uri) override;
};
#endif