From f739e28a541c2cd1a5ca6f160da9864e5b32ec0e Mon Sep 17 00:00:00 2001 From: nirvn Date: Tue, 18 Aug 2020 15:57:50 +0700 Subject: [PATCH] Update SDK catch new modules --- CMakeLists.txt | 2 +- sdk.conf | 2 +- src/app/app.pro | 2 +- src/app/main.cpp | 4 +++- src/core/CMakeLists.txt | 1 + src/qml/FeatureForm.qml | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77e3b1927f..643ef6c16a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,7 @@ IF (ANDROID) ADD_CUSTOM_TARGET(assets ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/android-build/assets/assets.zip") ENDIF (ANDROID) -FIND_PACKAGE(Qt5 COMPONENTS Test Concurrent Core Qml Gui Xml Positioning Widgets PrintSupport Network Quick Svg OpenGL Sql PrintSupport Sensors REQUIRED) +FIND_PACKAGE(Qt5 COMPONENTS Test Concurrent Core Qml Gui Xml Positioning Widgets PrintSupport Network Quick Svg OpenGL Sql PrintSupport Sensors WebView REQUIRED) ADD_SUBDIRECTORY(3rdparty/tessellate) ADD_SUBDIRECTORY(src/qgsquick) diff --git a/sdk.conf b/sdk.conf index d12eb4434f..e83df8a1c5 100644 --- a/sdk.conf +++ b/sdk.conf @@ -1 +1 @@ -osgeo4a_version=20200818 +osgeo4a_version=newmodules diff --git a/src/app/app.pro b/src/app/app.pro index 4aaaa81aaf..f464743438 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -7,7 +7,7 @@ include( ../../qgis.pri ) include( ../../version.pri ) include( ../../assets.pri ) -QT += widgets concurrent xml positioning printsupport svg sql opengl sensors quick quickcontrols2 qml +QT += widgets concurrent xml positioning printsupport svg sql opengl sensors quick quickcontrols2 qml webview android { QT += androidextras diff --git a/src/app/main.cpp b/src/app/main.cpp index e9a253c7c8..3b8e2ebd2a 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include "qgsapplication.h" #include "qgslogger.h" @@ -101,9 +102,10 @@ int main( int argc, char **argv ) app.setPluginPath( QApplication::applicationDirPath() ); app.setPkgDataPath( AndroidPlatformUtilities().packagePath() ); #else + QtWebView::initialize(); QgsApplication app( argc, argv, true ); - QSettings settings; + QSettings settings; app.setThemeName( settings.value( "/Themes", "default" ).toString() ); app.setPrefixPath( CMAKE_INSTALL_PREFIX, true ); #endif diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index f8078e9d2a..e612c0ef7d 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -167,6 +167,7 @@ TARGET_LINK_LIBRARIES(qfield_core Qt5::Positioning Qt5::Sql Qt5::Concurrent + Qt5::WebView ${QGIS_CORE_LIBRARY} ${QGIS_ANALYSIS_LIBRARY} ) diff --git a/src/qml/FeatureForm.qml b/src/qml/FeatureForm.qml index 2ca87b7678..37d0cc1c0b 100644 --- a/src/qml/FeatureForm.qml +++ b/src/qml/FeatureForm.qml @@ -289,7 +289,7 @@ Page { } onLoadingChanged: { if ( !loading ) - runJavaScript("document.body.offsetHeight", function(result) { htmlItem.height = ( result + 20 ) * screen.devicePixelRatio; } ); + runJavaScript("document.body.offsetHeight", function(result) { htmlItem.height = ( result + 20 ) } ); } }