1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00

Convert to singleton

This commit is contained in:
kelteseth 2018-09-19 13:22:53 +02:00
parent 758a967c04
commit e9fe1d4133

View File

@ -3,9 +3,17 @@
#include <qqml.h>
QObject *ScreenPlaySysInfoSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
return new SysInfo();
}
void ScreenPlaySysInfoPlugin::registerTypes(const char *uri)
{
// @uri net.aimber.sysinfo
qmlRegisterType<SysInfo>(uri, 1, 0, "SysInfo");
qmlRegisterSingletonType<SysInfo>(uri, 1, 0, "SysInfo",ScreenPlaySysInfoSingleton);
}