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 <KConfig>
#include <KConfigGroup>
#include <QObject>
#include <QQmlEngine>
#include <Quotient/room.h>
#include <Quotient/uriresolver.h>
@@ -33,6 +34,8 @@ using namespace Quotient;
class RoomManager : public QObject, public UriResolverBase
{
Q_OBJECT
QML_ELEMENT
QML_SINGLETON
/**
* @brief The current open room in NeoChat, if any.
@@ -87,6 +90,10 @@ public:
explicit RoomManager(QObject *parent = nullptr);
virtual ~RoomManager();
static RoomManager &instance();
static RoomManager *create(QQmlEngine *, QJSEngine *)
{
return &instance();
}
NeoChatRoom *currentRoom() const;