indentation and minor sip updates

This commit is contained in:
Juergen E. Fischer 2015-05-03 17:10:32 +02:00
parent bae9cea4f9
commit edeafa95ac
16 changed files with 75 additions and 71 deletions

View File

@ -182,7 +182,7 @@ class QgsComposerMap : QgsComposerItem
/**Called when atlas preview is toggled, to force map item to update its extent and redraw
* @deprecated no longer required
*/
void toggleAtlasPreview();
void toggleAtlasPreview() /Deprecated/;
/**Returns a pointer to the current map extent, which is either the original user specified
* extent or the temporary atlas-driven feature extent depending on the current atlas state
@ -620,7 +620,7 @@ class QgsComposerMap : QgsComposerItem
/** Returns true if the extent is forced to center on the overview
* @deprecated use overview()->centered() or overviews() instead
*/
bool overviewCentered() const;
bool overviewCentered() const /Deprecated/;
/** Set the overview's centering mode
* @deprecated use overview()->setCentered() or overviews() instead

View File

@ -83,7 +83,7 @@ class QgsExpression
double scale();
//! Return the expression string that was given when created.
//! Alias for dump()
const QString expression() const;
//! Return the expression string that represents this QgsExpression.

View File

@ -57,14 +57,12 @@ public:
*/
const QString& typeName() const;
/**
Gets the length of the field.
@return int containing the length of the field
*/
int length() const;
/**
Gets the precision of the field. Not all field types have a related precision.
@return int containing the precision or zero if not applicable to the field type.
@ -105,7 +103,6 @@ public:
*/
void setPrecision( int precision );
/**
Set the field comment
*/
@ -239,7 +236,7 @@ class QgsFields
bool exists( int i ) const;
//! Get field at particular index (must be in range 0..N-1)
// inline const QgsField& operator[]( int i ) const;
// const QgsField& operator[]( int i ) const;
QgsField& operator[](int i) /Factory/;
%MethodCode
SIP_SSIZE_T idx = sipConvertFromSequenceIndex(a0, sipCpp->count());

View File

@ -38,7 +38,6 @@ class QgsStatisticalSummary
InterQuartileRange, //!< Inter quartile range (IQR)
All
};
typedef QFlags<QgsStatisticalSummary::Statistic> Statistics;
/** Constructor for QgsStatisticalSummary
@ -156,4 +155,3 @@ class QgsStatisticalSummary
QFlags<QgsStatisticalSummary::Statistic> operator|(QgsStatisticalSummary::Statistic f1, QFlags<QgsStatisticalSummary::Statistic> f2);

View File

@ -81,8 +81,8 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
%TypeHeaderCode
#include <qgsgraduatedsymbolrendererv2.h>
%End
public:
QgsGraduatedSymbolRendererV2( QString attrName = QString(), QgsRangeList ranges = QgsRangeList() );
virtual ~QgsGraduatedSymbolRendererV2();
@ -152,6 +152,7 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
//! @param nclasses The number of classes to calculate (approximate for some modes)
//! @note Added in 2.6
void updateClasses( QgsVectorLayer *vlayer, Mode mode, int nclasses );
//! Evaluates the data expression and returns the list of values from the layer
//! @param vlayer The layer for which to evaluate the expression
//! @note Added in 2.6
@ -180,7 +181,7 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
QgsSymbolV2* symbol /Transfer/,
QgsVectorColorRampV2* ramp /Transfer/,
bool inverted = false,
QgsRendererRangeV2LabelFormat labelFormat=QgsRendererRangeV2LabelFormat()
QgsRendererRangeV2LabelFormat legendFormat = QgsRendererRangeV2LabelFormat()
);
//! create renderer from XML element

View File

@ -243,7 +243,7 @@ class Eliminate(GeoAlgorithm):
# We have a candidate
iGeom = geom2Eliminate.intersection(selGeom)
if iGeom == None:
if iGeom is None:
continue
if boundary:

View File

@ -634,9 +634,12 @@ bool QgsPointLocator::rebuildIndex( int maxFeaturesToIndex )
QgsRectangle rect = *mExtent;
if ( mTransform )
{
try {
try
{
rect = mTransform->transformBoundingBox( rect, QgsCoordinateTransform::ReverseTransform );
} catch (const QgsException& e) {
}
catch ( const QgsException& e )
{
// See http://hub.qgis.org/issues/12634
QgsDebugMsg( QString( "could not transform bounding box to map, skipping the snap filter (%1)" ).arg( e.what() ) );
}
@ -652,9 +655,12 @@ bool QgsPointLocator::rebuildIndex( int maxFeaturesToIndex )
if ( mTransform )
{
try {
try
{
f.geometry()->transform( *mTransform );
} catch (const QgsException& e) {
}
catch ( const QgsException& e )
{
// See http://hub.qgis.org/issues/12634
QgsDebugMsg( QString( "could not transform geometry to map, skipping the snap for it (%1)" ).arg( e.what() ) );
continue;
@ -724,9 +730,12 @@ void QgsPointLocator::onFeatureAdded( QgsFeatureId fid )
if ( mTransform )
{
try {
try
{
f.geometry()->transform( *mTransform );
} catch (const QgsException& e) {
}
catch ( const QgsException& e )
{
// See http://hub.qgis.org/issues/12634
QgsDebugMsg( QString( "could not transform geometry to map, skipping the snap for it (%1)" ).arg( e.what() ) );
return;

View File

@ -269,7 +269,6 @@ class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV2
//! @note added in 2.10
void setGraduatedMethod( GraduatedMethod method ) { mGraduatedMethod = method; }
void setRotationField( QString fieldOrExpression ) override;
QString rotationField() const override;