Move units from PlasmaComponents into PlasmaCore
This commit is contained in:
parent
7e5604cc56
commit
e10b77f236
@ -27,6 +27,7 @@ set(corebindings_SRCS
|
||||
serviceoperationstatus.cpp
|
||||
dataenginebindings.cpp
|
||||
iconitem.cpp
|
||||
units.cpp
|
||||
windowthumbnail.cpp
|
||||
)
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "serviceoperationstatus.h"
|
||||
|
||||
#include "tooltip.h"
|
||||
#include "units.h"
|
||||
#include "windowthumbnail.h"
|
||||
|
||||
// #include "dataenginebindings_p.h"
|
||||
@ -59,6 +60,10 @@ void CoreBindingsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
|
||||
Plasma::Theme *theme = new Plasma::Theme(engine);
|
||||
context->setContextProperty("theme", theme);
|
||||
|
||||
Units *units = new Units(context);
|
||||
context->setContextProperty("units", units);
|
||||
|
||||
|
||||
if (!engine->rootContext()->contextObject()) {
|
||||
KDeclarative::KDeclarative kdeclarative;
|
||||
kdeclarative.setDeclarativeEngine(engine);
|
||||
@ -71,6 +76,7 @@ void CoreBindingsPlugin::registerTypes(const char *uri)
|
||||
Q_ASSERT(uri == QLatin1String("org.kde.plasma.core"));
|
||||
|
||||
qmlRegisterUncreatableType<Plasma::Types>(uri, 2, 0, "Types", "");
|
||||
qmlRegisterUncreatableType<Units>(uri, 2, 0, "Units", "");
|
||||
|
||||
qmlRegisterType<Plasma::Svg>(uri, 2, 0, "Svg");
|
||||
qmlRegisterType<Plasma::FrameSvg>(uri, 2, 0, "FrameSvg");
|
||||
@ -105,7 +111,6 @@ void CoreBindingsPlugin::registerTypes(const char *uri)
|
||||
qRegisterMetaType<Plasma::DataSource*>("DataSource");
|
||||
|
||||
qmlRegisterType<Plasma::WindowThumbnail>(uri, 2, 0, "WindowThumbnail");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,7 +10,6 @@ set(plasmacomponents_SRCS
|
||||
enums.cpp
|
||||
qmenu.cpp
|
||||
qmenuitem.cpp
|
||||
units.cpp
|
||||
)
|
||||
|
||||
add_library(plasmacomponentsplugin SHARED ${plasmacomponents_SRCS})
|
||||
|
@ -33,10 +33,6 @@
|
||||
#include "enums.h"
|
||||
#include "qmenu.h"
|
||||
#include "qmenuitem.h"
|
||||
//#include "fullscreensheet.h"
|
||||
#include "units.h"
|
||||
|
||||
//Q_EXPORT_PLUGIN2(plasmacomponentsplugin, PlasmaComponentsPlugin)
|
||||
|
||||
class BKSingleton
|
||||
{
|
||||
@ -83,10 +79,6 @@ 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)
|
||||
@ -107,7 +99,6 @@ 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, 2, 0, "Units", "");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user