diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-26 03:01:48 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-26 03:01:48 +0200 |
commit | f93050fd95a0f22e83c4130fb8dc066064078b7e (patch) | |
tree | c92e2120b599747385cb06d6bd22523b6251d91f | |
parent | 9936883f2518e6a347d87ec2fd5d832cce007f49 (diff) | |
parent | 48decf79395e6a89c8802318c2ac2643645a974e (diff) | |
download | qtsensors-f93050fd95a0f22e83c4130fb8dc066064078b7e.tar.gz |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I49c2b397af3fcf54347f8c18d655ab1080c675e8
-rw-r--r-- | examples/sensors/accelbubble/android/AndroidManifest.xml | 6 | ||||
-rw-r--r-- | examples/sensors/maze/android/AndroidManifest.xml | 6 | ||||
-rw-r--r-- | examples/sensors/sensor_explorer/import/import.pro | 1 | ||||
-rw-r--r-- | examples/sensors/sensor_explorer/import/main.cpp | 28 | ||||
-rw-r--r-- | examples/sensors/sensor_explorer/import/main.h | 64 | ||||
-rw-r--r-- | src/imports/sensors/plugins.qmltypes | 2 |
6 files changed, 79 insertions, 28 deletions
diff --git a/examples/sensors/accelbubble/android/AndroidManifest.xml b/examples/sensors/accelbubble/android/AndroidManifest.xml index 4627978..2fac659 100644 --- a/examples/sensors/accelbubble/android/AndroidManifest.xml +++ b/examples/sensors/accelbubble/android/AndroidManifest.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <manifest package="org.qtproject.example" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto"> - <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --"> + <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:extractNativeLibs="true"> <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="portrait" android:launchMode="singleTop"> <intent-filter> <action android:name="android.intent.action.MAIN"/> @@ -18,12 +18,10 @@ <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/> <!-- Deploy Qt libs as part of package --> <meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/> - <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/> - <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/> <!-- Run with local libs --> <meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/> <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/> - <meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/> + <meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/> <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/> <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/> <!-- Used to specify custom system library path to run with local system libs --> diff --git a/examples/sensors/maze/android/AndroidManifest.xml b/examples/sensors/maze/android/AndroidManifest.xml index bfb126a..ac1cd58 100644 --- a/examples/sensors/maze/android/AndroidManifest.xml +++ b/examples/sensors/maze/android/AndroidManifest.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <manifest package="org.qtproject.example" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto"> - <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --"> + <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:extractNativeLibs="true"> <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="portrait" android:launchMode="singleTop"> <intent-filter> <action android:name="android.intent.action.MAIN"/> @@ -13,12 +13,10 @@ <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/> <!-- Deploy Qt libs as part of package --> <meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/> - <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/> - <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/> <!-- Run with local libs --> <meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/> <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/> - <meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/> + <meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/> <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/> <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/> <!-- Messages maps --> diff --git a/examples/sensors/sensor_explorer/import/import.pro b/examples/sensors/sensor_explorer/import/import.pro index 49a437e..4850921 100644 --- a/examples/sensors/sensor_explorer/import/import.pro +++ b/examples/sensors/sensor_explorer/import/import.pro @@ -15,6 +15,7 @@ SOURCES = \ propertyinfo.cpp HEADERS = \ + main.h \ explorer.h \ sensoritem.h \ propertyinfo.h diff --git a/examples/sensors/sensor_explorer/import/main.cpp b/examples/sensors/sensor_explorer/import/main.cpp index b43ea33..4199b2f 100644 --- a/examples/sensors/sensor_explorer/import/main.cpp +++ b/examples/sensors/sensor_explorer/import/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtSensors module of the Qt Toolkit. @@ -48,28 +48,18 @@ ** ****************************************************************************/ -#include <QtQml/QQmlExtensionPlugin> -#include <QtQml/QtQml> +#include "main.h" #include "explorer.h" -#include <QtCore/QDebug> QT_BEGIN_NAMESPACE -class SensorExplorerDeclarativeModule : public QQmlExtensionPlugin +void SensorExplorerDeclarativeModule::registerTypes(const char *uri) { - Q_OBJECT - Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid FILE "import.json") -public: - void registerTypes(const char *uri) override - { - Q_ASSERT(QLatin1String(uri) == QLatin1String("Explorer")); - // @uri Explorer - qmlRegisterType<QSensorExplorer>(uri, 1, 0, "SensorExplorer"); - qmlRegisterType<QSensorItem>(uri, 1, 0, "SensorItem"); - qmlRegisterType<QPropertyInfo>(uri, 1, 0, "PropertyInfo"); - } -}; + Q_ASSERT(QLatin1String(uri) == QLatin1String("Explorer")); + // @uri Explorer + qmlRegisterType<QSensorExplorer>(uri, 1, 0, "SensorExplorer"); + qmlRegisterType<QSensorItem>(uri, 1, 0, "SensorItem"); + qmlRegisterType<QPropertyInfo>(uri, 1, 0, "PropertyInfo"); +} QT_END_NAMESPACE - -#include "main.moc" diff --git a/examples/sensors/sensor_explorer/import/main.h b/examples/sensors/sensor_explorer/import/main.h new file mode 100644 index 0000000..6964bec --- /dev/null +++ b/examples/sensors/sensor_explorer/import/main.h @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtQml/QQmlExtensionPlugin> +#include <QtQml/QtQml> + +QT_BEGIN_NAMESPACE + +class SensorExplorerDeclarativeModule : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid FILE "import.json") +public: + void registerTypes(const char *uri) override; +}; + +QT_END_NAMESPACE diff --git a/src/imports/sensors/plugins.qmltypes b/src/imports/sensors/plugins.qmltypes index b78e63c..b148cbe 100644 --- a/src/imports/sensors/plugins.qmltypes +++ b/src/imports/sensors/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtSensors 5.13' +// 'qmlplugindump -nonrelocatable QtSensors 5.14' Module { dependencies: ["QtQuick 2.0"] |