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:
@ -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";
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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; });
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user