diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-04-11 19:49:39 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-15 15:09:57 +0200 |
commit | 5857ea03a77e44879191dd922b7c38c49616517b (patch) | |
tree | bff6d278b83e1ee1699ae36a89dfea463d08caa9 /src/private/plugin.cpp | |
parent | 2b309cf52dfff7307a055b2662e7ce1a53d44bdb (diff) | |
download | qtquickcontrols-5857ea03a77e44879191dd922b7c38c49616517b.tar.gz |
Remove hard dependency on widgets
Change-Id: I1fabb4efcc931f12f0a65ac5c66e6e085108269b
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/private/plugin.cpp')
-rw-r--r-- | src/private/plugin.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/private/plugin.cpp b/src/private/plugin.cpp index 17b2b09b..34486de1 100644 --- a/src/private/plugin.cpp +++ b/src/private/plugin.cpp @@ -43,6 +43,11 @@ #include "qquickwheelarea_p.h" #include "qquickstyleitem_p.h" #include "qquicktooltip_p.h" +#include "qquickcontrolsettings_p.h" + +#ifndef QT_NO_WIDGETS +#include "qquickstyleitem_p.h" +#endif #include <qqml.h> #include <qqmlextensionplugin.h> @@ -56,6 +61,13 @@ static QObject *registerTooltipModule(QQmlEngine *engine, QJSEngine *jsEngine) return new QQuickTooltip(); } +static QObject *registerSettingsModule(QQmlEngine *engine, QJSEngine *jsEngine) +{ + Q_UNUSED(engine); + Q_UNUSED(jsEngine); + return new QQuickControlSettings(); +} + class QtQuickControlsPrivatePlugin : public QQmlExtensionPlugin { Q_OBJECT @@ -69,8 +81,11 @@ void QtQuickControlsPrivatePlugin::registerTypes(const char *uri) { qmlRegisterType<QQuickRangeModel>(uri, 1, 0, "RangeModel"); qmlRegisterType<QQuickWheelArea>(uri, 1, 0, "WheelArea"); - qmlRegisterType<QQuickStyleItem>(uri, 1, 0, "StyleItem"); qmlRegisterSingletonType<QQuickTooltip>(uri, 1, 0, "Tooltip", registerTooltipModule); + qmlRegisterSingletonType<QQuickControlSettings>(uri, 1, 0, "Settings", registerSettingsModule); +#ifndef QT_NO_WIDGETS + qmlRegisterType<QQuickStyleItem>(uri, 1, 0, "StyleItem"); +#endif } QT_END_NAMESPACE |