Skip to content

Commit

Permalink
Remove QTMOBILITY
Browse files Browse the repository at this point in the history
It's days are gone
  • Loading branch information
m-kuhn authored and nyalldawson committed Jun 18, 2021
1 parent 564c892 commit ff3be3d
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 239 deletions.
12 changes: 0 additions & 12 deletions CMakeLists.txt
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
163 changes: 0 additions & 163 deletions cmake/FindQtMobility.cmake

This file was deleted.

4 changes: 0 additions & 4 deletions python/CMakeLists.txt
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions python/core/auto_generated/gps/qgsqtlocationconnection.sip.in
Expand Up @@ -11,10 +11,6 @@



%Feature MOBILITY_LOCATION

%If (MOBILITY_LOCATION)

class QgsQtLocationConnection: QgsGpsConnection
{
%Docstring(signature="appended")
Expand Down Expand Up @@ -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.
Expand All @@ -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 *
* *
Expand Down
1 change: 1 addition & 0 deletions python/core/core.sip.in
Expand Up @@ -97,6 +97,7 @@ done:

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

%Feature ANDROID
%Feature VECTOR_MAPPED_TYPE
Expand Down
3 changes: 0 additions & 3 deletions src/app/gps/qgsgpsinformationwidget.cpp
Expand Up @@ -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() );
Expand Down
10 changes: 3 additions & 7 deletions src/core/CMakeLists.txt
Expand Up @@ -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
)
Expand Down Expand Up @@ -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
)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions src/core/gps/qgsgpsdetector.cpp
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions src/core/gps/qgsqtlocationconnection.cpp
Expand Up @@ -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 );
}
Expand All @@ -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;
Expand Down

0 comments on commit ff3be3d

Please sign in to comment.