Network: Register the qml type of Configuration

pull/2/head
cutefishd 4 years ago
parent f79b8f3feb
commit 23258fdac4

@ -52,6 +52,7 @@ public:
~Handler() override; ~Handler() override;
Q_PROPERTY(bool hotspotSupported READ hotspotSupported NOTIFY hotspotSupportedChanged); Q_PROPERTY(bool hotspotSupported READ hotspotSupported NOTIFY hotspotSupportedChanged);
public: public:
bool hotspotSupported() const { return m_hotspotSupported; }; bool hotspotSupported() const { return m_hotspotSupported; };

@ -11,6 +11,7 @@
#include "enabledconnections.h" #include "enabledconnections.h"
#include "enums.h" #include "enums.h"
#include "wifisettings.h" #include "wifisettings.h"
#include "configuration.h"
#include <QQmlEngine> #include <QQmlEngine>
@ -28,5 +29,6 @@ void QmlPlugins::registerTypes(const char* uri)
qmlRegisterType<Handler>(uri, 1, 0, "Handler"); qmlRegisterType<Handler>(uri, 1, 0, "Handler");
qmlRegisterType<EnabledConnections>(uri, 1, 0, "EnabledConnections"); qmlRegisterType<EnabledConnections>(uri, 1, 0, "EnabledConnections");
qmlRegisterType<WifiSettings>(uri, 1, 0, "WifiSettings"); qmlRegisterType<WifiSettings>(uri, 1, 0, "WifiSettings");
qmlRegisterType<Configuration>(uri, 1, 0, "Configuration");
qmlRegisterUncreatableType<Enums>(uri, 1, 0, "Enums", "You cannot create Enums on yourself"); qmlRegisterUncreatableType<Enums>(uri, 1, 0, "Enums", "You cannot create Enums on yourself");
} }
Loading…
Cancel
Save