mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-05 18:42:29 +01:00
Convert to singleton
This commit is contained in:
parent
758a967c04
commit
e9fe1d4133
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user