diff options
author | aavit <eirik.aavitsland@digia.com> | 2014-09-10 14:50:28 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@digia.com> | 2014-10-08 11:37:49 +0300 |
commit | 3d6bb94a9e7c80edc4b2a2321b464533a4a7f60b (patch) | |
tree | c164a2bd67eb0b172398c38c471b9be5d9bea4ce /src/imports/utils/plugin.cpp | |
parent | 20b464d745b7ae319a89d9c2b14c5dcf7364c250 (diff) |
Rename DroidUtils -> B2QtUtils and refactor the API
Preparing this module for being documented and presented for
external users.
- Renamed since this is for eLinux as well as eAndroid
- Provide all settings as proper Q_PROPERTYs for easy QML access
- Hide all the detailed audio stuff that's not useful for users
- Implement a getter function for current backlight, so that we don't
have to reset it to full every time this module is loaded
- qmake now groks this as internal module, so get rid build kludges
- hostname setting on eLinux fixed
- getIPAddress() now returns ALL active addresses, and implentation
is simplified
Task-number: QTEE-704
Change-Id: I9f22d5531b5963ae7e78c840bcfe1edd6197f82a
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Diffstat (limited to 'src/imports/utils/plugin.cpp')
-rw-r--r-- | src/imports/utils/plugin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/imports/utils/plugin.cpp b/src/imports/utils/plugin.cpp index 5431061..46aa4d2 100644 --- a/src/imports/utils/plugin.cpp +++ b/src/imports/utils/plugin.cpp @@ -16,32 +16,32 @@ ** the contact form at http://qt.digia.com/ ** ****************************************************************************/ -#include <QtDroidUtils/qdroidutils.h> +#include <b2qtdevice.h> #include <QtQml> static QObject *module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) Q_UNUSED(scriptEngine) - QDroidUtils *api = new QDroidUtils(); + B2QtDevice *api = new B2QtDevice(); return api; } -class QDroidUtilsPlugin : public QQmlExtensionPlugin +class B2QtUtilsPlugin : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - QDroidUtilsPlugin() + B2QtUtilsPlugin() { } void registerTypes(const char *uri) { - Q_ASSERT(QLatin1String(uri) == "QtDroid.Utils"); - qmlRegisterSingletonType<QDroidUtils>(uri, 1, 0, "DroidUtils", module_api_factory); + Q_ASSERT(QLatin1String(uri) == "B2Qt.Utils"); + qmlRegisterSingletonType<B2QtDevice>(uri, 1, 0, "B2QtDevice", module_api_factory); } }; |