Skip to content

Commit

Permalink
Merge pull request #5944 from opengisch/up_up_up
Browse files Browse the repository at this point in the history
Update to latest QGIS release (3.40.2) and up vcpkg revision to prepare for Qt 6.8.2
  • Loading branch information
nirvn authored Jan 17, 2025
2 parents 4f63625 + 9e26119 commit 204210a
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMake settings
cmake_minimum_required(VERSION 3.19)

set(VCPKG_TAG 19847ac3d8cad7599e96bd531f9bc1f0ebae6131)
set(VCPKG_TAG d4f3e122069912636c123b7ece673f6e01513cea)

set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/src/qml/imports CACHE PATH "QML import path for Qt Creator to detect custom modules properly")

Expand Down
8 changes: 4 additions & 4 deletions src/core/tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void Tracker::trackPosition()
return;
}

if ( !qgsDoubleNear( mMaximumDistance, 0.0 ) && mCurrentDistance > mMaximumDistance )
if ( mRubberbandModel->vertexCount() > 1 && !qgsDoubleNear( mMaximumDistance, 0.0 ) && mCurrentDistance > mMaximumDistance )
{
// Simple logic to avoid getting stuck in an infinite erroneous distance having somehow actually moved beyond the safeguard threshold
if ( ++mMaximumDistanceFailuresCount < MAXIMUM_DISTANCE_FAILURES )
Expand Down Expand Up @@ -190,7 +190,7 @@ void Tracker::positionReceived()
return;
}

if ( !qgsDoubleNear( mMinimumDistance, 0.0 ) || !qgsDoubleNear( mMaximumDistance, 0.0 ) )
if ( mRubberbandModel->vertexCount() > 1 && ( !qgsDoubleNear( mMinimumDistance, 0.0 ) || !qgsDoubleNear( mMaximumDistance, 0.0 ) ) )
{
QVector<QgsPointXY> points = mRubberbandModel->flatPointSequence( QgsProject::instance()->crs() );

Expand All @@ -210,7 +210,7 @@ void Tracker::positionReceived()

if ( !qgsDoubleNear( mMinimumDistance, 0.0 ) )
{
mMinimumDistanceFulfilled = mCurrentDistance >= mMinimumDistance;
mMinimumDistanceFulfilled = mRubberbandModel->vertexCount() == 1 || mCurrentDistance >= mMinimumDistance;

if ( !mConjunction && mMinimumDistanceFulfilled )
{
Expand All @@ -221,7 +221,7 @@ void Tracker::positionReceived()

if ( !qgsDoubleNear( mTimeInterval, 0.0 ) )
{
mTimeIntervalFulfilled = ( mLastDevicePositionTimestamp.toMSecsSinceEpoch() - mLastVertexPositionTimestamp.toMSecsSinceEpoch() ) >= mTimeInterval * 1000;
mTimeIntervalFulfilled = mRubberbandModel->vertexCount() == 1 || ( ( mLastDevicePositionTimestamp.toMSecsSinceEpoch() - mLastVertexPositionTimestamp.toMSecsSinceEpoch() ) >= mTimeInterval * 1000 );

if ( !mConjunction && mTimeIntervalFulfilled )
{
Expand Down
29 changes: 29 additions & 0 deletions vcpkg/ports/libb2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO BLAKE2/libb2
REF 2c5142f12a2cd52f3ee0a43e50a3a76f75badf85
SHA512 cf29cf9391ae37a978eb6618de6f856f3defa622b8f56c2d5a519ab34fd5e4d91f3bb868601a44e9c9164a2992e80dde188ccc4d1605dffbdf93687336226f8d
HEAD_REF master
)

set(OPTIONS)
if(CMAKE_HOST_WIN32)
set(OPTIONS --disable-native) # requires cpuid
endif()

vcpkg_configure_make(
AUTOCONFIG
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
ax_cv_check_cflags___O3=no # see https://github.com/microsoft/vcpkg/pull/17912#issuecomment-840514179
${OPTIONS}
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()


file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

vcpkg_copy_pdbs()

file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
8 changes: 8 additions & 0 deletions vcpkg/ports/libb2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "libb2",
"version": "0.98.1",
"port-version": 6,
"description": "C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp",
"homepage": "https://github.com/BLAKE2/libb2",
"supports": "!windows"
}
34 changes: 34 additions & 0 deletions vcpkg/ports/nu-book-zxing-cpp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zxing-cpp/zxing-cpp
REF "v${VERSION}"
SHA512 f1de8df783061a152a18cd9102ac0c579c40c76ab4a5ba9f30bcb8ddb532f3fac08736840a631adbf7c30a7fa00ce8d65625c8cd695288620601708e8f256a53
HEAD_REF master
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_BLACKBOX_TESTS=OFF
-DBUILD_EXAMPLES=OFF
)

vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()

vcpkg_cmake_config_fixup(
CONFIG_PATH lib/cmake/ZXing
PACKAGE_NAME ZXing
)

file(READ "${CURRENT_PACKAGES_DIR}/share/ZXing/ZXingConfig.cmake" _contents)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/ZXing/ZXingConfig.cmake" "
include(CMakeFindDependencyMacro)
find_dependency(Threads)
${_contents}")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
17 changes: 17 additions & 0 deletions vcpkg/ports/nu-book-zxing-cpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "nu-book-zxing-cpp",
"version": "2.2.1",
"description": "Barcode detection and decoding library.",
"homepage": "https://github.com/zxing-cpp/zxing-cpp",
"license": "Apache-2.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 2 additions & 2 deletions vcpkg/ports/qgis/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(QGIS_REF final-3_40_1)
set(QGIS_SHA512 58d42dafe9174ec6962d851eea5754f30b88dfbe281f5c17c69edfb379658da310c5426882200210c6a95e08d08b36e84cd7288c5e3893aebf8ec3418d911e3a)
set(QGIS_REF final-3_40_2)
set(QGIS_SHA512 1389c1254d23fc02daa4b50f6c1fa8133659aa10186c7a1ee2b65f9ebcfc8128b0680cbe3067a5aa5b3cfb89d021a3f8a1c84973fa99529af2fcfda9e93bcb08)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
Expand Down
18 changes: 9 additions & 9 deletions vcpkg/ports/qgis/processing.patch
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
diff --git a/src/analysis/processing/qgsnativealgorithms.cpp b/src/analysis/processing/qgsnativealgorithms.cpp
index a74cdfc700b..2b2412c933a 100644
index 7b50c49a..f850a311 100644
--- a/src/analysis/processing/qgsnativealgorithms.cpp
+++ b/src/analysis/processing/qgsnativealgorithms.cpp
@@ -31,7 +31,6 @@
@@ -32,7 +32,6 @@
#include "qgsalgorithmaspect.h"
#include "qgsalgorithmassignprojection.h"
#include "qgsalgorithmattributeindex.h"
-#include "qgsalgorithmb3dmtogltf.h"
#include "qgsalgorithmbasicstatistics.h"
#include "qgsalgorithmbatchnominatimgeocode.h"
#include "qgsalgorithmboundary.h"
@@ -100,7 +99,6 @@
@@ -101,7 +100,6 @@
#include "qgsalgorithmforcerhr.h"
#include "qgsalgorithmfuzzifyraster.h"
#include "qgsalgorithmgeometrybyexpression.h"
-#include "qgsalgorithmgltftovector.h"
#if QT_CONFIG(process)
#if QT_CONFIG( process )
#include "qgsalgorithmgpsbabeltools.h"
#endif
@@ -204,7 +202,6 @@
@@ -205,7 +203,6 @@
#include "qgsalgorithmsinglesidedbuffer.h"
#include "qgsalgorithmslope.h"
#include "qgsalgorithmsmooth.h"
-#include "qgsalgorithmsnapgeometries.h"
#include "qgsalgorithmsnaptogrid.h"
#include "qgsalgorithmspatialindex.h"
#include "qgsalgorithmsplitfeaturesbyattributecharacter.h"
@@ -300,7 +297,6 @@ void QgsNativeAlgorithms::loadAlgorithms()
@@ -301,7 +298,6 @@ void QgsNativeAlgorithms::loadAlgorithms()
addAlgorithm( new QgsAspectAlgorithm() );
addAlgorithm( new QgsAssignProjectionAlgorithm() );
addAlgorithm( new QgsAttributeIndexAlgorithm() );
- addAlgorithm( new QgsB3DMToGltfAlgorithm() );
addAlgorithm( new QgsBasicStatisticsAlgorithm() );
addAlgorithm( new QgsBatchNominatimGeocodeAlgorithm() );
addAlgorithm( new QgsBookmarksToLayerAlgorithm() );
@@ -384,7 +380,6 @@ void QgsNativeAlgorithms::loadAlgorithms()
@@ -385,7 +381,6 @@ void QgsNativeAlgorithms::loadAlgorithms()
addAlgorithm( new QgsFuzzifyRasterGaussianMembershipAlgorithm() );
addAlgorithm( new QgsFuzzifyRasterNearMembershipAlgorithm() );
addAlgorithm( new QgsGeometryByExpressionAlgorithm() );
- addAlgorithm( new QgsGltfToVectorFeaturesAlgorithm() );
#if QT_CONFIG(process)
#if QT_CONFIG( process )
addAlgorithm( new QgsConvertGpxFeatureTypeAlgorithm() );
addAlgorithm( new QgsConvertGpsDataAlgorithm() );
@@ -519,7 +514,6 @@ void QgsNativeAlgorithms::loadAlgorithms()
@@ -520,7 +515,6 @@ void QgsNativeAlgorithms::loadAlgorithms()
addAlgorithm( new QgsSingleSidedBufferAlgorithm() );
addAlgorithm( new QgsSlopeAlgorithm() );
addAlgorithm( new QgsSmoothAlgorithm() );
Expand Down

1 comment on commit 204210a

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.