20 changes: 14 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,18 +308,26 @@ IF (PEDANTIC)
ADD_DEFINITIONS( /wd4610 ) # user defined constructor required (sqlite3_index_info)
ADD_DEFINITIONS( /wd4706 ) # assignment within conditional expression (pal)
ELSE (MSVC)
IF (APPLE_CLANG AND NOT APPLE_CLANG_WARNINGS)
SET(CMAKE_C_FLAGS "-Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing ")
SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wno-return-type-c-linkage -Wno-overloaded-virtual ")
ELSE (APPLE_CLANG AND NOT APPLE_CLANG_WARNINGS)
ADD_DEFINITIONS( -Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing )
ENDIF (APPLE_CLANG AND NOT APPLE_CLANG_WARNINGS)
ADD_DEFINITIONS( -Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing )
# Qt produces lots of warnings with strict aliasing (as of Qt 4.4.0 & GCC 4.3)
# There are redundant declarations in Qt and GDAL
# ADD_DEFINITIONS( -fstrict-aliasing -Wstrict-aliasing=1 -Wredundant-decls )

IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
ADD_DEFINITIONS(-Wno-return-type-c-linkage) # used in plugins and providers
ENDIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
ENDIF (MSVC)

ENDIF (PEDANTIC)

IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Qunused-arguments")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Qunused-arguments")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Qunused-arguments")
ENDIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")

IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
# spatialite crashes on ppc - see bugs.debian.org/603986
ADD_DEFINITIONS( -fno-strict-aliasing )
Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsvectorlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ class QgsVectorLayer : QgsMapLayer
/** Draw layer with renderer V2.
* @note added in 1.4
*/
void drawRendererV2( QgsRenderContext& rendererContext, bool labeling );
void drawRendererV2( QgsFeatureIterator &fit, QgsRenderContext& rendererContext, bool labeling );

/** Draw layer with renderer V2 using symbol levels.
* @note added in 1.4
*/
void drawRendererV2Levels( QgsRenderContext& rendererContext, bool labeling );
void drawRendererV2Levels( QgsFeatureIterator &fit, QgsRenderContext& rendererContext, bool labeling );

/** Returns point, line or polygon */
QGis::GeometryType geometryType() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ class QgsCategorizedSymbolRendererV2Widget : QgsRendererV2Widget

void showSymbolLevels();

void rowsMoved();

protected:

void updateUiFromRenderer();

void updateCategorizedSymbolIcon();

//! populate categories view
// Called by virtual refreshSymbolView()
void populateCategories();

//! populate column combo
Expand All @@ -42,6 +44,12 @@ class QgsCategorizedSymbolRendererV2Widget : QgsRendererV2Widget
//! return row index for the currently selected category (-1 if on no selection)
int currentCategoryRow();

//! return a list of indexes for the categories unders selection
QList<int> selectedCategories();

//! change the selected symbols alone for the change button, if there is a selection
void changeSelectedSymbols();

void changeCategorySymbol();

QList<QgsSymbolV2*> selectedSymbols();
Expand Down
11 changes: 10 additions & 1 deletion python/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,35 @@ class QgsGraduatedSymbolRendererV2Widget : QgsRendererV2Widget

/**Adds a class manually to the classification*/
void addClass();
/**Removes selected classes*/
/**Removes currently selected classes */
void deleteClasses();
/**Removes all classes from the classification*/
void deleteAllClasses();

void rotationFieldChanged( QString fldName );
void sizeScaleFieldChanged( QString fldName );
void scaleMethodChanged( QgsSymbolV2::ScaleMethod scaleMethod );

void showSymbolLevels();

void rowsMoved();

protected:
void updateUiFromRenderer();

void updateGraduatedSymbolIcon();

//! return a list of indexes for the classes under selection
QList<int> selectedClasses();

//! populate column combos in categorized and graduated page
void populateColumns();

void changeRangeSymbol( int rangeIdx );
void changeRange( int rangeIdx );

void changeSelectedSymbols();

QList<QgsSymbolV2*> selectedSymbols();
QgsSymbolV2* findSymbolForRange( double lowerBound, double upperBound, const QgsRangeList& ranges ) const;
void refreshSymbolView();
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fi

if [ "$1" = "-c" ]; then
echo "Cleaning..."
find . \( -name "*.prepare" -o -name "*.astyle" -o -name "astyle.*.diff" -o -name "sha-*.diff" \) -print -delete
find . \( -name "*.prepare" -o -name "*.astyle" -o -name "*.nocopyright" -o -name "astyle.*.diff" -o -name "sha-*.diff" \) -print -delete
fi

set -e
Expand Down
26 changes: 18 additions & 8 deletions src/analysis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,24 @@ ADD_FLEX_FILES_PREFIX(QGIS_ANALYSIS_SRCS raster raster/qgsrastercalclexer.ll)

ADD_BISON_FILES_PREFIX(QGIS_ANALYSIS_SRCS raster raster/qgsrastercalcparser.yy)

IF (MSVC AND PEDANTIC)
# disable warnings
# 4065 switch with default and no case
# 4702 unreachable code
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_BINARY_DIR}/src/analysis/qgsrastercalcparser.cpp
PROPERTIES COMPILE_FLAGS "-wd4065 -wd4702")
ENDIF (MSVC AND PEDANTIC)
IF (PEDANTIC AND MSVC)
# disable warnings
# 4065 switch with default and no case
# 4702 unreachable code
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_BINARY_DIR}/src/analysis/qgsrastercalcparser.cpp
PROPERTIES COMPILE_FLAGS "-wd4065 -wd4702"
)
ENDIF (PEDANTIC AND MSVC)

IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET_SOURCE_FILES_PROPERTIES(
interpolation/qgstininterpolator.cpp
interpolation/NormVecDecorator.cc
interpolation/CloughTocherInterpolator.cc
PROPERTIES COMPILE_FLAGS "-Wno-overloaded-virtual"
)
ENDIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")

SET(QGIS_ANALYSIS_MOC_HDRS
)
Expand Down
5 changes: 5 additions & 0 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ SET(QGIS_CORE_SRCS
qgsscaleutils.cpp
)

IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# spatialindex headers produce warnings
SET_SOURCE_FILES_PROPERTIES(qgsspatialindex.cpp PROPERTIES COMPILE_FLAGS -Wno-overloaded-virtual)
ENDIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")

IF (WITH_INTERNAL_QEXTSERIALPORT)
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qextserialport/qextserialport.cpp
Expand Down
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposertable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void QgsComposerTable::paint( QPainter* painter, const QStyleOptionGraphicsItem*

//getFeatureAttributes
QList<QgsAttributeMap> attributeList;
if ( !getFeatureAttributes( attributeList ) )
if ( !getFeatureAttributeMap( attributeList ) )
{
return;
}
Expand Down Expand Up @@ -119,7 +119,7 @@ void QgsComposerTable::paint( QPainter* painter, const QStyleOptionGraphicsItem*
void QgsComposerTable::adjustFrameToSize()
{
QList<QgsAttributeMap> attributes;
if ( !getFeatureAttributes( attributes ) )
if ( !getFeatureAttributeMap( attributes ) )
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposertable.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem

/**Retrieves feature attributes*/
//! @note not available in python bindings
virtual bool getFeatureAttributes( QList<QgsAttributeMap>& attributes )
virtual bool getFeatureAttributeMap( QList<QgsAttributeMap>& attributes )
{ Q_UNUSED( attributes ); return false; } //= 0;
virtual QMap<int, QString> getHeaderLabels() const { return QMap<int, QString>(); } //= 0;
/**Calculate the maximum width values of the vector attributes*/
Expand Down
5 changes: 3 additions & 2 deletions src/core/qgsvectorfilewriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ class CORE_EXPORT QgsVectorFileWriter
@param datasourceOptions list of OGR data source creation options
@param layerOptions list of OGR layer creation options
@param skipAttributeCreation only write geometries
@param newFilename QString pointer which will contain the new file name created
(in case it is different to fileName).
@param newFilename QString pointer which will contain the new file name created (in case it is different to fileName).
@param symbologyExport symbology to export
@param symbologyScale scale of symbology
*/
static WriterError writeAsVectorFormat( QgsVectorLayer* layer,
const QString& fileName,
Expand Down
Loading