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 | |
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')
-rw-r--r-- | src/imports/utils/plugin.cpp | 12 | ||||
-rw-r--r-- | src/imports/utils/qmldir | 4 | ||||
-rw-r--r-- | src/imports/utils/utils.pro | 10 |
3 files changed, 11 insertions, 15 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); } }; diff --git a/src/imports/utils/qmldir b/src/imports/utils/qmldir index 6db1b0f..e5e0b31 100644 --- a/src/imports/utils/qmldir +++ b/src/imports/utils/qmldir @@ -1,3 +1,3 @@ -module QtDroid.Utils -plugin qtdroidutilsplugin +module B2Qt.Utils +plugin b2qtutilsplugin typeinfo plugins.qmltypes diff --git a/src/imports/utils/utils.pro b/src/imports/utils/utils.pro index a589b46..a580643 100644 --- a/src/imports/utils/utils.pro +++ b/src/imports/utils/utils.pro @@ -1,14 +1,10 @@ CXX_MODULE = qml -TARGET = qtdroidutilsplugin -TARGETPATH = QtDroid/Utils +TARGET = b2qtutilsplugin +TARGETPATH = B2Qt/Utils IMPORT_VERSION = 1.0 -QT += qml +QT += qml b2qtutils SOURCES += plugin.cpp -### kludge -INCLUDEPATH += $$PWD/../../../include -LIBS += -L$$PWD/../../../lib -lQt5DroidUtils - load(qml_plugin) |