register Units
This commit is contained in:
parent
436fdf1de6
commit
669ed7a35c
@ -35,6 +35,7 @@
|
||||
#include "qmenu.h"
|
||||
#include "qmenuitem.h"
|
||||
//#include "fullscreensheet.h"
|
||||
#include "units.h"
|
||||
|
||||
//Q_EXPORT_PLUGIN2(plasmacomponentsplugin, PlasmaComponentsPlugin)
|
||||
|
||||
@ -83,6 +84,10 @@ void PlasmaComponentsPlugin::initializeEngine(QQmlEngine *engine, const char *ur
|
||||
{
|
||||
QQmlExtensionPlugin::initializeEngine(engine, uri);
|
||||
EngineBookKeeping::self()->insertEngine(engine);
|
||||
|
||||
QQmlContext *context = engine->rootContext();
|
||||
Units *units = new Units(context);
|
||||
context->setContextProperty("units", units);
|
||||
}
|
||||
|
||||
void PlasmaComponentsPlugin::registerTypes(const char *uri)
|
||||
@ -103,6 +108,7 @@ void PlasmaComponentsPlugin::registerTypes(const char *uri)
|
||||
qmlRegisterUncreatableType<DialogStatus>(uri, 2, 0, "DialogStatus", "");
|
||||
qmlRegisterUncreatableType<PageOrientation>(uri, 2, 0, "PageOrientation", "");
|
||||
qmlRegisterUncreatableType<PageStatus>(uri, 2, 0, "PageStatus", "");
|
||||
qmlRegisterUncreatableType<Units>(uri, 0, 1, "Units", "");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user