Skip to content

Commit

Permalink
Avoid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 10, 2015
1 parent c6c076b commit f93fce7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/core/symbology-ng/qgssymbollayerv2registry.cpp
Expand Up @@ -108,6 +108,8 @@ QgsSymbolLayerV2* QgsSymbolLayerV2Registry::defaultSymbolLayer( QgsSymbolV2::Sym
case QgsSymbolV2::Hybrid:
return 0;
}

return 0;
}


Expand Down
5 changes: 4 additions & 1 deletion src/providers/oracle/CMakeLists.txt
Expand Up @@ -26,6 +26,9 @@ SET(ORACLE_MOC_HDRS
qgsoracletablemodel.h
qgsoraclecolumntypethread.h
qgsoracleconnpool.h
)

SET(ORACLE_HDRS
qgsoracleexpressioncompiler.h
)

Expand All @@ -51,7 +54,7 @@ INCLUDE_DIRECTORIES(SYSTEM
${QSCINTILLA_INCLUDE_DIR}
)

ADD_LIBRARY (oracleprovider MODULE ${ORACLE_SRCS} ${ORACLE_MOC_SRCS})
ADD_LIBRARY (oracleprovider MODULE ${ORACLE_SRCS} ${ORACLE_HDRS} ${ORACLE_MOC_SRCS})

TARGET_LINK_LIBRARIES (oracleprovider
qgis_core
Expand Down
6 changes: 4 additions & 2 deletions src/providers/oracle/qgsoraclefeatureiterator.cpp
Expand Up @@ -180,7 +180,9 @@ bool QgsOracleFeatureIterator::fetchFeature( QgsFeature& feature )
unsigned char *copy = new unsigned char[ba->size()];
memcpy( copy, ba->constData(), ba->size() );

feature.setGeometryAndOwnership( copy, ba->size() );
QgsGeometry *g = new QgsGeometry();
g->fromWkb( copy, ba->size() );
feature.setGeometry( g );

if (( mRequest.flags() & QgsFeatureRequest::ExactIntersect ) != 0 && ( !mConnection->hasSpatial() || !mSource->mHasSpatialIndex ) &&
mRequest.filterType() == QgsFeatureRequest::FilterRect &&
Expand All @@ -194,7 +196,7 @@ bool QgsOracleFeatureIterator::fetchFeature( QgsFeature& feature )

if (( mRequest.flags() & QgsFeatureRequest::NoGeometry ) != 0 )
{
feature.setGeometryAndOwnership( 0, 0 );
feature.setGeometry( 0 );
}
}

Expand Down

0 comments on commit f93fce7

Please sign in to comment.