Skip to content

Commit

Permalink
Merge pull request #183 from mbernasocchi/android
Browse files Browse the repository at this point in the history
Android small patch
  • Loading branch information
jef-n committed Jun 22, 2012
2 parents 3599700 + 5445178 commit 50273b1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
37 changes: 18 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,6 @@ IF (WITH_QTMOBILITY)
FIND_PACKAGE(QtMobility 1.1.0)
ENDIF (WITH_QTMOBILITY)

IF (ANDROID)
SET (DEFAULT_WITH_TOUCH TRUE)
ELSE (ANDROID)
SET (DEFAULT_WITH_TOUCH FALSE)
ENDIF (ANDROID)
#Add a touch mode if Qt has Qt Gestures (starting from 4.6)
IF ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
SET (WITH_TOUCH ${DEFAULT_WITH_TOUCH} CACHE BOOL "Determines if touch interface related code should be build")
ELSE ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
SET (WITH_TOUCH FALSE)
ENDIF ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
IF (WITH_TOUCH)
ADD_DEFINITIONS(-DHAVE_TOUCH)
MESSAGE (STATUS "Touch support enabled")
ELSE (WITH_TOUCH)
MESSAGE (STATUS "Touch support disabled")
ENDIF (WITH_TOUCH)


SET (WITH_GLOBE FALSE CACHE BOOL "Determines whether Globe plugin should be built")
IF (WITH_GLOBE)
SET(QT_USE_QTOPENGL 1)
Expand Down Expand Up @@ -228,6 +209,24 @@ IF(WITH_DESKTOP)
ENDIF(NOT QT_QTWEBKIT_FOUND)
ENDIF(WITH_DESKTOP)

IF (ANDROID)
SET (DEFAULT_WITH_TOUCH TRUE)
ELSE (ANDROID)
SET (DEFAULT_WITH_TOUCH FALSE)
ENDIF (ANDROID)
#Add a touch mode if Qt has Qt Gestures (starting from 4.6)
IF ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
SET (WITH_TOUCH ${DEFAULT_WITH_TOUCH} CACHE BOOL "Determines if touch interface related code should be build")
ELSE ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
SET (WITH_TOUCH FALSE)
ENDIF ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
IF (WITH_TOUCH)
ADD_DEFINITIONS(-DHAVE_TOUCH)
MESSAGE (STATUS "Touch support enabled")
ELSE (WITH_TOUCH)
MESSAGE (STATUS "Touch support disabled")
ENDIF (WITH_TOUCH)

IF (ENABLE_TESTS)
SET( QT_USE_QTTEST TRUE )
ENABLE_TESTING()
Expand Down
3 changes: 2 additions & 1 deletion src/core/gps/qgsqtlocationconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ void QgsQtLocationConnection::parseData()

//TODO implement dop maybe by getting a
//http://developer.android.com/reference/android/location/GpsStatus.NmeaListener.html
//http://doc.qt.nokia.com/qtmobility-1.1/qnmeapositioninfosource.html
//into QtLocation and subclass QgsNMEAConnection directly?
mLastGPSInformation.pdop; //< Dilution of precision
mLastGPSInformation.hdop; //< Horizontal dilution of precision
Expand Down Expand Up @@ -157,7 +158,7 @@ void QgsQtLocationConnection::startGPS()
if ( locationDataSource )
{
locationDataSource->setPreferredPositioningMethods( QGeoPositionInfoSource::SatellitePositioningMethods ); //QGeoPositionInfoSource::AllPositioningMethods
// locationDataSource->setUpdateInterval(2000);
locationDataSource->setUpdateInterval(1000);
// Whenever the location data source signals that the current
// position is updated, the positionUpdated function is called.
QObject::connect( locationDataSource,
Expand Down

0 comments on commit 50273b1

Please sign in to comment.