10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ ENDIF (WITH_POSTGRESQL)

SET (WITH_INTERNAL_QWTPOLAR TRUE CACHE BOOL "Use internal build of QwtPolar")

SET (WITH_INTERNAL_QEXTSERIALPORT TRUE CACHE BOOL "Use internal build of Qextserialport")

SET (WITH_SPATIALITE TRUE CACHE BOOL "Determines whether SPATIALITE support should be built")
IF (WITH_SPATIALITE)
SET (WITH_INTERNAL_SPATIALITE FALSE CACHE BOOL "Determines whether SPATIALITE support should be built internally")
Expand Down Expand Up @@ -157,12 +159,18 @@ FIND_PACKAGE(GEOS)
FIND_PACKAGE(GDAL)
FIND_PACKAGE(Expat)
FIND_PACKAGE(Spatialindex REQUIRED)

FIND_PACKAGE(Qwt REQUIRED)

IF (NOT WITH_INTERNAL_QWTPOLAR)
FIND_PACKAGE(QwtPolar REQUIRED)
ENDIF(NOT WITH_INTERNAL_QWTPOLAR)

IF (WITH_INTERNAL_QEXTSERIALPORT)
SET(QEXTSERIALPORT_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/gps/qextserialport)
ELSE (WITH_INTERNAL_QEXTSERIALPORT)
FIND_PACKAGE(Qextserialport REQUIRED)
ENDIF(WITH_INTERNAL_QEXTSERIALPORT)

IF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(Sqlite3)
IF (NOT SQLITE3_FOUND)
Expand Down
87 changes: 43 additions & 44 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY})
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY})

INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_PATH}
${SIP_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_QTNETWORK_INCLUDE_DIR}
${QT_QTSVG_INCLUDE_DIR}
${QT_QTXML_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${QWT_INCLUDE_DIR}

../src/core
../src/core/pal
../src/core/composer
../src/core/diagram
../src/core/gps
../src/core/gps/qextserialport
../src/core/raster
../src/core/renderer
../src/core/symbology
../src/core/symbology-ng

../src/gui/raster
../src/gui/attributetable

${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
${PYTHON_INCLUDE_PATH}
${SIP_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_QTNETWORK_INCLUDE_DIR}
${QT_QTSVG_INCLUDE_DIR}
${QT_QTXML_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${QWT_INCLUDE_DIR}
${QEXTSERIALPORT_INCLUDE_DIR}

../src/core
../src/core/pal
../src/core/composer
../src/core/diagram
../src/core/gps
../src/core/raster
../src/core/renderer
../src/core/symbology
../src/core/symbology-ng

../src/gui/raster
../src/gui/attributetable

${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
)

IF(NOT WITH_TOUCH)
Expand Down Expand Up @@ -80,11 +80,11 @@ ADD_SIP_PYTHON_MODULE(qgis.core core/core.sip qgis_core)

# additional gui includes
INCLUDE_DIRECTORIES(
../src/gui
../src/gui/symbology-ng
../src/plugins
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
../src/gui
../src/gui/symbology-ng
../src/plugins
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)

# gui module
Expand All @@ -95,22 +95,22 @@ ADD_SIP_PYTHON_MODULE(qgis.gui gui/gui.sip qgis_core qgis_gui)

# additional analysis includes
INCLUDE_DIRECTORIES(
../src/analysis/vector
../src/analysis/raster
../src/analysis/network
../src/analysis/interpolation
${CMAKE_BINARY_DIR}/src/analysis/vector
${CMAKE_BINARY_DIR}/src/analysis/network
${CMAKE_BINARY_DIR}/src/analysis/raster
${CMAKE_BINARY_DIR}/src/analysis/interpolation
../src/analysis/vector
../src/analysis/raster
../src/analysis/network
../src/analysis/interpolation
${CMAKE_BINARY_DIR}/src/analysis/vector
${CMAKE_BINARY_DIR}/src/analysis/network
${CMAKE_BINARY_DIR}/src/analysis/raster
${CMAKE_BINARY_DIR}/src/analysis/interpolation
)

# analysis module
FILE(GLOB sip_files_analysis
analysis/*.sip
analysis/raster/*.sip
analysis/vector/*.sip
analysis/interpolation/*.sip
analysis/*.sip
analysis/raster/*.sip
analysis/vector/*.sip
analysis/interpolation/*.sip
)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_analysis})
SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.analysis.api)
Expand Down Expand Up @@ -170,4 +170,3 @@ IF(WITH_PY_COMPILE)
DEPENDS pyutils
)
ENDIF(WITH_PY_COMPILE)

5 changes: 3 additions & 2 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,10 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/../ui
${QWT_INCLUDE_DIR}
${QT_QTUITOOLS_INCLUDE_DIR}
${QEXTSERIALPORT_INCLUDE_DIR}
../analysis/raster
../core
../core/gps ../core/gps/qextserialport
../core/gps
../core/composer ../core/raster ../core/renderer ../core/symbology ../core/symbology-ng
../gui ../gui/symbology-ng ../gui/attributetable ../gui/raster
../plugins
Expand All @@ -420,7 +421,7 @@ INCLUDE_DIRECTORIES(
)

IF (ANDROID)
INCLUDE_DIRECTORIES(${ANDROID_NDK_TOOLCHAIN_ROOT}/sysroot/usr/include)
INCLUDE_DIRECTORIES(${ANDROID_NDK_TOOLCHAIN_ROOT}/sysroot/usr/include)
ENDIF (ANDROID)

IF (HAVE_SPATIALITE)
Expand Down
58 changes: 33 additions & 25 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

SET(QGIS_CORE_SRCS

gps/qextserialport/qextserialport.cpp
gps/qextserialport/qextserialenumerator.cpp

gps/qgsgpsconnection.cpp
gps/qgsgpsconnectionregistry.cpp
gps/qgsnmeaconnection.cpp
Expand Down Expand Up @@ -212,23 +209,29 @@ SET(QGIS_CORE_SRCS
qgsscaleutils.cpp
)

IF(WIN32)
SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
gps/qextserialport/win_qextserialport.cpp
)
ADD_DEFINITIONS(-D_TTY_WIN_)
ELSE(WIN32)
SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
gps/qextserialport/posix_qextserialport.cpp
IF (WITH_INTERNAL_QEXTSERIALPORT)
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qextserialport/qextserialport.cpp
gps/qextserialport/qextserialenumerator.cpp
)
ADD_DEFINITIONS(-D_TTY_POSIX_)
ENDIF(WIN32)

IF(WIN32)
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qextserialport/win_qextserialport.cpp
)
ADD_DEFINITIONS(-D_TTY_WIN_)
ELSE(WIN32)
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qextserialport/posix_qextserialport.cpp
)
ADD_DEFINITIONS(-D_TTY_POSIX_)
ENDIF(WIN32)
ELSE (WITH_INTERNAL_QEXTSERIALPORT)
INCLUDE_DIRECTORIES(${QEXTSERIALPORT_INCLUDE_DIR})
ENDIF (WITH_INTERNAL_QEXTSERIALPORT)

IF (QT_MOBILITY_LOCATION_FOUND)
SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qgsqtlocationconnection.cpp
)
ENDIF (QT_MOBILITY_LOCATION_FOUND)
Expand All @@ -250,8 +253,7 @@ IF (WITH_INTERNAL_SPATIALITE)
ADD_DEFINITIONS(-D_LARGE_FILE=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1)
ADD_DEFINITIONS(-DSQLITE_ENABLE_RTREE=1)

SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
spatialite/sqlite3.c
spatialite/spatialite.c
)
Expand Down Expand Up @@ -316,16 +318,19 @@ SET(QGIS_CORE_MOC_HDRS
gps/qgsgpsdetector.h
gps/qgsnmeaconnection.h
gps/qgsgpsdconnection.h
gps/qextserialport/qextserialport.h
gps/qextserialport/qextserialenumerator.h

symbology-ng/qgscptcityarchive.h
)

IF (WITH_INTERNAL_QEXTSERIALPORT)
SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS}
gps/qextserialport/qextserialport.h
gps/qextserialport/qextserialenumerator.h
)
ENDIF (WITH_INTERNAL_QEXTSERIALPORT)

IF (QT_MOBILITY_LOCATION_FOUND)
SET(QGIS_CORE_MOC_HDRS
${QGIS_CORE_MOC_HDRS}
SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS}
gps/qgsqtlocationconnection.h
)
ENDIF (QT_MOBILITY_LOCATION_FOUND)
Expand Down Expand Up @@ -474,8 +479,7 @@ SET(QGIS_CORE_HDRS
)

IF (QT_MOBILITY_LOCATION_FOUND)
SET(QGIS_CORE_HDRS
${QGIS_CORE_HDRS}
SET(QGIS_CORE_HDRS ${QGIS_CORE_HDRS}
gps/qgsqtlocationconnection.h
)
ENDIF (QT_MOBILITY_LOCATION_FOUND)
Expand Down Expand Up @@ -558,6 +562,10 @@ IF(APPLE)
TARGET_LINK_LIBRARIES(qgis_core "-framework CoreFoundation -framework IOKit")
ENDIF(APPLE)

IF (NOT WITH_INTERNAL_QEXTSERIALPORT)
TARGET_LINK_LIBRARIES(qgis_core ${QEXTSERIALPORT_LIBRARY})
ENDIF (NOT WITH_INTERNAL_QEXTSERIALPORT)

IF (QT_MOBILITY_LOCATION_FOUND)
TARGET_LINK_LIBRARIES(qgis_core ${QT_MOBILITY_LOCATION_LIBRARY})
ENDIF (QT_MOBILITY_LOCATION_FOUND)
Expand Down
6 changes: 1 addition & 5 deletions src/core/raster/qgsrasterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,12 +919,12 @@ bool QgsRasterLayer::hasStatistics( int theBandNo )
}
#endif

#if 0
/**
* @param thePoint the QgsPoint for which to obtain pixel values
* @param theResults QMap to hold the pixel values at thePoint for each layer in the raster file
* @return False if WMS layer and true otherwise
*/
#if 0
bool QgsRasterLayer::identify( const QgsPoint& thePoint, QMap<QString, QString>& theResults )
{
theResults.clear();
Expand Down Expand Up @@ -1019,10 +1019,6 @@ QString QgsRasterLayer::identifyAsHtml( const QgsPoint& thePoint )
}
#endif

/**
* @note Note implemented yet
* @return Always returns false
*/
bool QgsRasterLayer::isEditable() const
{
return false;
Expand Down
2 changes: 2 additions & 0 deletions src/core/symbology-ng/qgscptcityarchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,10 @@ QgsCptCityDirectoryItem::QgsCptCityDirectoryItem( QgsCptCityDataItem* parent,
mType = Directory;
mValid = QDir( QgsCptCityArchive::defaultBaseDir() ).exists();
if ( ! mValid )
{
QgsDebugMsg( "created invalid dir item, path = " + QgsCptCityArchive::defaultBaseDir()
+ QDir::separator() + mPath );
}

// parse DESC.xml to get mInfo
mInfo = "";
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgsstylev2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ bool QgsStyleV2::detagSymbol( StyleEntity type, QString symbol, QStringList tags
sqlite3_stmt *ppStmt;
int nErr = sqlite3_prepare_v2( mCurrentDB, query, -1, &ppStmt, NULL );

int symbolid;
int symbolid = 0;
if ( nErr == SQLITE_OK && sqlite3_step( ppStmt ) == SQLITE_ROW )
{
symbolid = sqlite3_column_int( ppStmt, 0 );
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgserrordialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class GUI_EXPORT QgsErrorDialog: public QDialog, private Ui::QgsErrorDialogBase

/** Show dialog with error
* @param theError error
* @param theTitle title
* @param parent parent object
* @param fl widget flags
*/
static void show( const QgsError & theError, const QString & theTitle, QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags );

Expand Down
2 changes: 1 addition & 1 deletion src/mapserver/qgsfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ QgsFilter* QgsFilter::createFilterFromXml( const QDomElement& filterElem, QgsVec
// if the filter is spatial
if ( filterName == "BBOX" || filterName == "CONTAINS" || filterName == "CROSSES" || filterName == "DISJOINT" || filterName == "EQUALS" || filterName == "INTERSECTS" || filterName == "OVERLAPS" || filterName == "TOUCHES" || filterName == "WITHIN" )
{
QgsGeometry* geom;
QgsGeometry *geom = 0;

QDomNodeList bNodes = filterElem.elementsByTagName( "Box" );
if ( bNodes.size() > 0 )
Expand Down
1 change: 1 addition & 0 deletions src/mapserver/qgswmsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,7 @@ void QgsWMSServer::drawLegendLayerItem( QgsComposerLayerItem* item, QPainter* p,
double layerTitleSpace, double symbolSpace, double iconLabelSpace, double symbolWidth, double symbolHeight, double fontOversamplingFactor,
double dpi ) const
{
Q_UNUSED( layerSpace );
if ( !item )
{
return;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/gps_importer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ ADD_LIBRARY (gpsimporterplugin MODULE ${GPS_SRCS} ${GPS_MOC_SRCS} ${GPS_RCC_SRCS
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
../../core ../../core/gps ../../core/gps/qextserialport

${QEXTSERIALPORT_INCLUDE_DIR}
../../core
../../core/gps
../../gui
..
${EXPAT_INCLUDE_DIR}
Expand All @@ -49,7 +50,6 @@ TARGET_LINK_LIBRARIES(gpsimporterplugin
qgis_gui
)


########################################################
# Install

Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspgsourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ void QgsPgSourceSelect::on_btnConnect_clicked()
QString srid = layer.srid;
if ( !layer.geometryColName.isNull() )
{
if ( type == "GEOMETRY" || type.isNull() || srid.isEmpty() )
if ( QgsPostgresConn::wkbTypeFromPostgis( type ) == QGis::WKBUnknown || srid.isEmpty() )
{
addSearchGeometryColumn( layer );
type = "";
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresdataitems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ QVector<QgsDataItem*> QgsPGConnectionItem::createChildren()
mSchemaMap[ layerProperty.schemaName ] = schemaItem;
}

if ( layerProperty.type == "GEOMETRY" )
if ( QgsPostgresConn::wkbTypeFromPostgis( layerProperty.type ) == QGis::WKBUnknown )
{
if ( !columnTypeThread )
{
Expand Down
Loading