Raise the QML imports version to 2.1

Change-Id: Ia753bbc7a55a256486f2d0f225571b9046f03cda
REVIEW: 122696
This commit is contained in:
Martin Klapetek 2015-02-24 13:06:48 +01:00
parent 0f3eee1bc7
commit fa2109ccb6
5 changed files with 30 additions and 32 deletions

View File

@ -27,10 +27,8 @@
void CalendarPlugin::registerTypes(const char *uri) void CalendarPlugin::registerTypes(const char *uri)
{ {
Q_ASSERT(uri == QLatin1String("org.kde.plasma.calendar")); Q_ASSERT(uri == QLatin1String("org.kde.plasma.calendar"));
qmlRegisterType<CalendarData>(uri, 2, 0, "CalendarData"); qmlRegisterType<CalendarData>(uri, 2, 1, "CalendarData");
qmlRegisterType<Calendar>(uri, 2, 0, "Calendar"); qmlRegisterType<Calendar>(uri, 2, 1, "Calendar");
// qmlRegisterType<CalendarData>(uri, 1, 0, "CalendarData");
// qmlRegisterType<CalendarData>(uri, 1, 0, "Calendar");
qmlRegisterType<QAbstractItemModel>(); qmlRegisterType<QAbstractItemModel>();
qmlRegisterType<QAbstractListModel>(); qmlRegisterType<QAbstractListModel>();
} }

View File

@ -73,39 +73,39 @@ void CoreBindingsPlugin::registerTypes(const char *uri)
{ {
Q_ASSERT(uri == QLatin1String("org.kde.plasma.core")); Q_ASSERT(uri == QLatin1String("org.kde.plasma.core"));
qmlRegisterUncreatableType<Plasma::Types>(uri, 2, 0, "Types", ""); qmlRegisterUncreatableType<Plasma::Types>(uri, 2, 1, "Types", "");
qmlRegisterUncreatableType<Units>(uri, 2, 0, "Units", ""); qmlRegisterUncreatableType<Units>(uri, 2, 1, "Units", "");
qmlRegisterType<Plasma::Svg>(uri, 2, 0, "Svg"); qmlRegisterType<Plasma::Svg>(uri, 2, 1, "Svg");
qmlRegisterType<Plasma::FrameSvg>(uri, 2, 0, "FrameSvg"); qmlRegisterType<Plasma::FrameSvg>(uri, 2, 1, "FrameSvg");
qmlRegisterType<Plasma::SvgItem>(uri, 2, 0, "SvgItem"); qmlRegisterType<Plasma::SvgItem>(uri, 2, 1, "SvgItem");
qmlRegisterType<Plasma::FrameSvgItem>(uri, 2, 0, "FrameSvgItem"); qmlRegisterType<Plasma::FrameSvgItem>(uri, 2, 1, "FrameSvgItem");
//qmlRegisterType<ThemeProxy>(uri, 2, 0, "Theme"); //qmlRegisterType<ThemeProxy>(uri, 2, 1, "Theme");
qmlRegisterUncreatableType<Plasma::QuickTheme>(uri, 2, 0, "Theme", "It is not possible to instantiate Theme directly."); qmlRegisterUncreatableType<Plasma::QuickTheme>(uri, 2, 1, "Theme", "It is not possible to instantiate Theme directly.");
qmlRegisterType<ColorScope>(uri, 2, 0, "ColorScope"); qmlRegisterType<ColorScope>(uri, 2, 1, "ColorScope");
qmlRegisterType<Plasma::DataSource>(uri, 2, 0, "DataSource"); qmlRegisterType<Plasma::DataSource>(uri, 2, 1, "DataSource");
qmlRegisterType<Plasma::DataModel>(uri, 2, 0, "DataModel"); qmlRegisterType<Plasma::DataModel>(uri, 2, 1, "DataModel");
qmlRegisterType<Plasma::SortFilterModel>(uri, 2, 0, "SortFilterModel"); qmlRegisterType<Plasma::SortFilterModel>(uri, 2, 1, "SortFilterModel");
qmlRegisterType<PlasmaQuick::Dialog>(uri, 2, 0, "Dialog"); qmlRegisterType<PlasmaQuick::Dialog>(uri, 2, 1, "Dialog");
qmlRegisterType<ToolTip>(uri, 2, 0, "ToolTipArea"); qmlRegisterType<ToolTip>(uri, 2, 1, "ToolTipArea");
qmlRegisterInterface<Plasma::Service>("Service"); qmlRegisterInterface<Plasma::Service>("Service");
qRegisterMetaType<Plasma::Service *>("Service"); qRegisterMetaType<Plasma::Service *>("Service");
qmlRegisterInterface<Plasma::ServiceJob>("ServiceJob"); qmlRegisterInterface<Plasma::ServiceJob>("ServiceJob");
qRegisterMetaType<Plasma::ServiceJob *>("ServiceJob"); qRegisterMetaType<Plasma::ServiceJob *>("ServiceJob");
qmlRegisterType<ServiceOperationStatus>(uri, 2, 0, "ServiceOperationStatus"); qmlRegisterType<ServiceOperationStatus>(uri, 2, 1, "ServiceOperationStatus");
qmlRegisterType<QAbstractItemModel>(); qmlRegisterType<QAbstractItemModel>();
qmlRegisterType<QQmlPropertyMap>(); qmlRegisterType<QQmlPropertyMap>();
qmlRegisterType<IconItem>(uri, 2, 0, "IconItem"); qmlRegisterType<IconItem>(uri, 2, 1, "IconItem");
qmlRegisterInterface<Plasma::DataSource>("DataSource"); qmlRegisterInterface<Plasma::DataSource>("DataSource");
qRegisterMetaType<Plasma::DataSource *>("DataSource"); qRegisterMetaType<Plasma::DataSource *>("DataSource");
qmlRegisterType<Plasma::WindowThumbnail>(uri, 2, 0, "WindowThumbnail"); qmlRegisterType<Plasma::WindowThumbnail>(uri, 2, 1, "WindowThumbnail");
} }

View File

@ -86,17 +86,17 @@ void PlasmaComponentsPlugin::registerTypes(const char *uri)
//platform specific c++ components //platform specific c++ components
const QString target = KDeclarative::KDeclarative::componentsTarget(); const QString target = KDeclarative::KDeclarative::componentsTarget();
if (target == KDeclarative::KDeclarative::defaultComponentsTarget()) { if (target == KDeclarative::KDeclarative::defaultComponentsTarget()) {
qmlRegisterType<QMenuProxy>(uri, 2, 0, "Menu"); qmlRegisterType<QMenuProxy>(uri, 2, 1, "Menu");
qmlRegisterType<QMenuItem>(uri, 2, 0, "MenuItem"); qmlRegisterType<QMenuItem>(uri, 2, 1, "MenuItem");
} else { } else {
// qmlRegisterType<FullScreenSheet>(uri, 2, 0, "Sheet"); // qmlRegisterType<FullScreenSheet>(uri, 2, 1, "Sheet");
} }
qmlRegisterType<Plasma::QRangeModel>(uri, 2, 0, "RangeModel"); qmlRegisterType<Plasma::QRangeModel>(uri, 2, 1, "RangeModel");
qmlRegisterUncreatableType<DialogStatus>(uri, 2, 0, "DialogStatus", ""); qmlRegisterUncreatableType<DialogStatus>(uri, 2, 1, "DialogStatus", "");
qmlRegisterUncreatableType<PageOrientation>(uri, 2, 0, "PageOrientation", ""); qmlRegisterUncreatableType<PageOrientation>(uri, 2, 1, "PageOrientation", "");
qmlRegisterUncreatableType<PageStatus>(uri, 2, 0, "PageStatus", ""); qmlRegisterUncreatableType<PageStatus>(uri, 2, 1, "PageStatus", "");
} }
#include "moc_plasmacomponentsplugin.cpp" #include "moc_plasmacomponentsplugin.cpp"

View File

@ -38,8 +38,8 @@ void PlasmaExtraComponentsPlugin::initializeEngine(QQmlEngine *engine, const cha
void PlasmaExtraComponentsPlugin::registerTypes(const char *uri) void PlasmaExtraComponentsPlugin::registerTypes(const char *uri)
{ {
Q_ASSERT(uri == QLatin1String("org.kde.plasma.extras")); Q_ASSERT(uri == QLatin1String("org.kde.plasma.extras"));
//qmlRegisterType<ResourceInstance>(uri, 2, 0, "ResourceInstance"); //qmlRegisterType<ResourceInstance>(uri, 2, 1, "ResourceInstance");
qmlRegisterType<FallbackComponent>(uri, 2, 0, "FallbackComponent"); qmlRegisterType<FallbackComponent>(uri, 2, 1, "FallbackComponent");
} }

View File

@ -38,8 +38,8 @@ public:
void registerTypes(const char *uri) Q_DECL_OVERRIDE { void registerTypes(const char *uri) Q_DECL_OVERRIDE {
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.platformcomponents")); Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.platformcomponents"));
qmlRegisterType<Application> (uri, 2, 0, "Application"); qmlRegisterType<Application> (uri, 2, 1, "Application");
qmlRegisterType<IconDialog> (uri, 2, 0, "IconDialog"); qmlRegisterType<IconDialog> (uri, 2, 1, "IconDialog");
} }
}; };