Port to declarative type registration
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <QHash>
|
||||
#include <QObject>
|
||||
#include <QQmlEngine>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
@@ -23,6 +24,8 @@ class Room;
|
||||
class SpaceHierarchyCache : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
QML_SINGLETON
|
||||
|
||||
public:
|
||||
static SpaceHierarchyCache &instance()
|
||||
@@ -30,6 +33,10 @@ public:
|
||||
static SpaceHierarchyCache _instance;
|
||||
return _instance;
|
||||
}
|
||||
static SpaceHierarchyCache *create(QQmlEngine *, QJSEngine *)
|
||||
{
|
||||
return &instance();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the list of child rooms for the given space ID.
|
||||
|
||||
Reference in New Issue
Block a user