Skip to content
Permalink
Browse files
Remove QTMOBILITY
It's days are gone
  • Loading branch information
m-kuhn authored and nyalldawson committed Jun 18, 2021
1 parent 564c892 commit ff3be3df4068e9720da7f45f24145bff33b6cd99
@@ -271,14 +271,6 @@ if(WITH_CORE)
set(HAVE_EPT TRUE)
endif()

#BUILD WITH QtMobility by default on android only. Other platform can force it
if (ANDROID)
set (DEFAULT_WITH_QTMOBILITY TRUE)
else()
set (DEFAULT_WITH_QTMOBILITY FALSE)
endif()
set (WITH_QTMOBILITY ${DEFAULT_WITH_QTMOBILITY} CACHE BOOL "Determines if QtMobility related code should be build (for example internal GPS)")

set (WITH_THREAD_LOCAL TRUE CACHE BOOL "Determines whether std::thread_local should be used")
mark_as_advanced(WITH_THREAD_LOCAL)

@@ -508,10 +500,6 @@ if(WITH_CORE)
set(OPTIONAL_QTWEBKIT ${Qt5WebKitWidgets_LIBRARIES})
endif()

if (WITH_QTMOBILITY)
find_package(QtMobility 1.1.0)
endif()

# search for QScintilla2 (C++ lib)
if (WITH_GUI)
find_package(QScintilla REQUIRED)

This file was deleted.

@@ -121,10 +121,6 @@ else()
set(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} ARM)
endif()

if(NOT QT_MOBILITY_LOCATION_FOUND)
set(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} MOBILITY_LOCATION)
endif()

# SIP 4.19.7+ can:
# * prepend auto-generated Python signature to existing Docstrings
# * document template based classes
@@ -11,10 +11,6 @@



%Feature MOBILITY_LOCATION

%If (MOBILITY_LOCATION)

class QgsQtLocationConnection: QgsGpsConnection
{
%Docstring(signature="appended")
@@ -44,8 +40,6 @@ Parse available data source content
%End


%If (!ANDROID)

void satellitesInViewUpdated( const QList<QGeoSatelliteInfo> &satellites );
%Docstring
Called when the number of satellites in view is updated.
@@ -64,12 +58,8 @@ Called when the number of satellites in use is updated.
not available in Python bindings on android
%End

%End

};

%End // MOBILITY_LOCATION

/************************************************************************
* This file has been generated automatically from *
* *
@@ -97,6 +97,7 @@ done:

%Import QtPrintSupport/QtPrintSupportmod.sip
%Import QtWidgets/QtWidgetsmod.sip
%Import QtPositioning/QtPositioningmod.sip

%Feature ANDROID
%Feature VECTOR_MAPPED_TYPE
@@ -287,14 +287,11 @@ QgsGpsInformationWidget::QgsGpsInformationWidget( QgsMapCanvas *mapCanvas, QWidg
{
mRadGpsd->setChecked( true );
}
//hide the internal port method if build is without QtLocation
#ifndef HAVE_QT_MOBILITY_LOCATION
if ( mRadInternal->isChecked() )
{
mRadAutodetect->setChecked( true );
}
mRadInternal->hide();
#endif

//auto digitizing behavior
mCbxAutoAddVertices->setChecked( mySettings.value( QStringLiteral( "gps/autoAddVertices" ), "false" ).toBool() );
@@ -832,7 +832,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_source_files_properties(qgsspatialindex.cpp PROPERTIES COMPILE_FLAGS -Wno-overloaded-virtual)
endif()

if (QT_MOBILITY_LOCATION_FOUND OR ${QT_VERSION_BASE}Positioning_FOUND)
if (${QT_VERSION_BASE}Positioning_FOUND)
set(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qgsqtlocationconnection.cpp
)
@@ -1682,7 +1682,7 @@ if (NOT WITH_QTWEBKIT)
)
endif()

if (QT_MOBILITY_LOCATION_FOUND OR ${QT_VERSION_BASE}Positioning_FOUND)
if (${QT_VERSION_BASE}Positioning_FOUND)
set(QGIS_CORE_HDRS ${QGIS_CORE_HDRS}
gps/qgsqtlocationconnection.h
)
@@ -1715,7 +1715,7 @@ endif()
# install qgsconfig.h and plugin.h here so they can get into
# the OS X framework target

if (QT_MOBILITY_LOCATION_FOUND OR ${QT_VERSION_BASE}Positioning_FOUND)
if (${QT_VERSION_BASE}Positioning_FOUND)
set(QGIS_CORE_HDRS ${QGIS_CORE_HDRS}
gps/qgsqtlocationconnection.h
gps/qgsgpsconnectionregistry.h
@@ -1966,10 +1966,6 @@ if (APPLE AND NOT IOS)
target_link_libraries(qgis_core qgis_native)
endif()

if (QT_MOBILITY_LOCATION_FOUND)
target_link_libraries(qgis_core ${QT_MOBILITY_LOCATION_LIBRARY})
endif()

if (ADD_CLAZY_CHECKS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_BASE_FLAGS} -Xclang -plugin-arg-clazy -Xclang ${CLAZY_BASE_CHECKS},non-pod-global-static")
endif()
@@ -22,7 +22,7 @@
#include "qgsgpsdconnection.h"
#include "qgssettings.h"

#if defined(HAVE_QT_MOBILITY_LOCATION ) || defined(QT_POSITIONING_LIB)
#if defined(QT_POSITIONING_LIB)
#include "qgsqtlocationconnection.h"
#endif

@@ -40,7 +40,7 @@ QList< QPair<QString, QString> > QgsGpsDetector::availablePorts()
QList< QPair<QString, QString> > devs;

// try local QtLocation first
#if defined(HAVE_QT_MOBILITY_LOCATION ) || defined(QT_POSITIONING_LIB)
#if defined(QT_POSITIONING_LIB)
devs << QPair<QString, QString>( QStringLiteral( "internalGPS" ), tr( "internal GPS" ) );
#endif

@@ -110,10 +110,10 @@ void QgsGpsDetector::advance()
}
else if ( mPortList.at( mPortIndex ).first.contains( QLatin1String( "internalGPS" ) ) )
{
#if defined(HAVE_QT_MOBILITY_LOCATION ) || defined(QT_POSITIONING_LIB)
#if defined(QT_POSITIONING_LIB)
mConn = std::make_unique< QgsQtLocationConnection >();
#else
qWarning( "QT_MOBILITY_LOCATION not found and mPortList matches internalGPS, this should never happen" );
qWarning( "QT_POSITIONING_LIB not found and mPortList matches internalGPS, this should never happen" );
#endif
}
else
@@ -104,11 +104,7 @@ void QgsQtLocationConnection::satellitesInViewUpdated(
QgsSatelliteInfo satelliteInfo;
satelliteInfo.azimuth = currentSatellite.attribute( QGeoSatelliteInfo::Azimuth );
satelliteInfo.elevation = currentSatellite.attribute( QGeoSatelliteInfo::Elevation );
#if defined(HAVE_QT_MOBILITY_LOCATION )
satelliteInfo.id = currentSatellite.prnNumber();
#else // QtPositioning
satelliteInfo.id = currentSatellite.satelliteIdentifier();
#endif
satelliteInfo.signal = currentSatellite.signalStrength();
mLastGPSInformation.satellitesInView.append( satelliteInfo );
}
@@ -127,20 +123,12 @@ void QgsQtLocationConnection::satellitesInUseUpdated(
for ( const QGeoSatelliteInfo &currentSatellite : satellites )
{
//add pnr to mLastGPSInformation.satPrn
#if defined(HAVE_QT_MOBILITY_LOCATION )
mLastGPSInformation.satPrn.append( currentSatellite.prnNumber() );
#else // QtPositioning
mLastGPSInformation.satPrn.append( currentSatellite.satelliteIdentifier() );
#endif

//set QgsSatelliteInfo.inuse to true for the satellites in use
for ( QgsSatelliteInfo &satInView : mLastGPSInformation.satellitesInView )
{
#if defined(HAVE_QT_MOBILITY_LOCATION )
if ( satInView.id == currentSatellite.prnNumber() )
#else // QtPositioning
if ( satInView.id == currentSatellite.satelliteIdentifier() )
#endif
{
satInView.inUse = true;
break;
Loading

0 comments on commit ff3be3d

Please sign in to comment.