Port to declarative type registration

This commit is contained in:
Tobias Fella
2023-09-23 14:05:50 +00:00
parent 4ed4f3f628
commit 3a4f71de7f
202 changed files with 604 additions and 532 deletions

View File

@@ -6,6 +6,7 @@
#include <QJsonObject>
#include <QObject>
#include <QPointer>
#include <QQmlEngine>
#include <QString>
#include <QVariantMap>
#include <QVector>
@@ -58,6 +59,8 @@ public:
class Registration : public QObject
{
Q_OBJECT
QML_ELEMENT
QML_SINGLETON
Q_PROPERTY(QString homeserver READ homeserver WRITE setHomeserver NOTIFY homeserverChanged)
Q_PROPERTY(QString username READ username WRITE setUsername NOTIFY usernameChanged)
@@ -88,6 +91,10 @@ public:
static Registration _instance;
return _instance;
}
static Registration *create(QQmlEngine *, QJSEngine *)
{
return &instance();
}
Q_INVOKABLE void registerAccount();
Q_INVOKABLE void registerEmail();