mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
fix warnings
This commit is contained in:
parent
8d8e56dce6
commit
c1f50db1ac
@ -310,11 +310,15 @@ IF (PEDANTIC)
|
|||||||
# disable warnings
|
# disable warnings
|
||||||
ADD_DEFINITIONS( /wd4100 ) # unused formal parameters
|
ADD_DEFINITIONS( /wd4100 ) # unused formal parameters
|
||||||
ADD_DEFINITIONS( /wd4127 ) # constant conditional expressions (used in Qt template classes)
|
ADD_DEFINITIONS( /wd4127 ) # constant conditional expressions (used in Qt template classes)
|
||||||
|
ADD_DEFINITIONS( /wd4231 ) # nonstandard extension used : 'identifier' before template explicit instantiation (used in Qt template classes)
|
||||||
|
ADD_DEFINITIONS( /wd4251 ) # needs to have dll-interface to be used by clients of class (occurs in Qt template classes)
|
||||||
|
ADD_DEFINITIONS( /wd4275 ) # non dll-interface class '...' used as base for dll-interface class '...'
|
||||||
ADD_DEFINITIONS( /wd4505 ) # unreferenced local function has been removed (QgsRasterDataProvider::extent)
|
ADD_DEFINITIONS( /wd4505 ) # unreferenced local function has been removed (QgsRasterDataProvider::extent)
|
||||||
ADD_DEFINITIONS( /wd4510 ) # default constructor could not be generated (sqlite3_index_info, QMap)
|
ADD_DEFINITIONS( /wd4510 ) # default constructor could not be generated (sqlite3_index_info, QMap)
|
||||||
ADD_DEFINITIONS( /wd4512 ) # assignment operator could not be generated (sqlite3_index_info)
|
ADD_DEFINITIONS( /wd4512 ) # assignment operator could not be generated (sqlite3_index_info)
|
||||||
ADD_DEFINITIONS( /wd4610 ) # user defined constructor required (sqlite3_index_info)
|
ADD_DEFINITIONS( /wd4610 ) # user defined constructor required (sqlite3_index_info)
|
||||||
ADD_DEFINITIONS( /wd4706 ) # assignment within conditional expression (pal)
|
ADD_DEFINITIONS( /wd4706 ) # assignment within conditional expression (pal)
|
||||||
|
ADD_DEFINITIONS( /wd4800 ) # 'int' : forcing value to bool 'true' or 'false' (performance warning)
|
||||||
ELSE (MSVC)
|
ELSE (MSVC)
|
||||||
# add warnings via flags (not as definitions as on Mac -Wall can not be overridden per language )
|
# add warnings via flags (not as definitions as on Mac -Wall can not be overridden per language )
|
||||||
SET(_warnings "-Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing")
|
SET(_warnings "-Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing")
|
||||||
|
@ -39,6 +39,11 @@ class QgsExpression
|
|||||||
//! @note this method does not expect that prepare() has been called on this instance
|
//! @note this method does not expect that prepare() has been called on this instance
|
||||||
QVariant evaluate( const QgsFeature* f, const QgsFields& fields );
|
QVariant evaluate( const QgsFeature* f, const QgsFields& fields );
|
||||||
|
|
||||||
|
//! Evaluate the feature and return the result
|
||||||
|
//! @note this method does not expect that prepare() has been called on this instance
|
||||||
|
//! @note not available in python bindings
|
||||||
|
// inline QVariant evaluate( const QgsFeature& f, const QgsFields& fields ) { return evaluate( &f, fields ); }
|
||||||
|
|
||||||
//! Returns true if an error occurred when evaluating last input
|
//! Returns true if an error occurred when evaluating last input
|
||||||
bool hasEvalError() const;
|
bool hasEvalError() const;
|
||||||
//! Returns evaluation error
|
//! Returns evaluation error
|
||||||
@ -63,7 +68,7 @@ class QgsExpression
|
|||||||
|
|
||||||
void setScale( double scale );
|
void setScale( double scale );
|
||||||
|
|
||||||
int scale();
|
double scale();
|
||||||
|
|
||||||
//! Return the expression string that was given when created.
|
//! Return the expression string that was given when created.
|
||||||
const QString expression() const;
|
const QString expression() const;
|
||||||
|
@ -693,6 +693,7 @@ class QgsPalLabeling : QgsLabelingEngineInterface
|
|||||||
virtual void drawLabeling( QgsRenderContext& context );
|
virtual void drawLabeling( QgsRenderContext& context );
|
||||||
//! called when we're done with rendering
|
//! called when we're done with rendering
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
//! return infos about labels at a given (map) position
|
//! return infos about labels at a given (map) position
|
||||||
//! @deprecated since 2.4 - use takeResults() and methods of QgsLabelingResults
|
//! @deprecated since 2.4 - use takeResults() and methods of QgsLabelingResults
|
||||||
virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p ) /Deprecated/;
|
virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p ) /Deprecated/;
|
||||||
|
@ -250,7 +250,7 @@ void QgsComposerMapWidget::on_mAtlasPredefinedScaleRadio_toggled( bool checked )
|
|||||||
{
|
{
|
||||||
// restore to fixed scale if no predefined scales exist
|
// restore to fixed scale if no predefined scales exist
|
||||||
mAtlasFixedScaleRadio->blockSignals( true );
|
mAtlasFixedScaleRadio->blockSignals( true );
|
||||||
mAtlasFixedScaleRadio->setChecked( Qt::Checked );
|
mAtlasFixedScaleRadio->setChecked( true );
|
||||||
mAtlasFixedScaleRadio->blockSignals( false );
|
mAtlasFixedScaleRadio->blockSignals( false );
|
||||||
mComposerMap->setAtlasScalingMode( QgsComposerMap::Fixed );
|
mComposerMap->setAtlasScalingMode( QgsComposerMap::Fixed );
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ class QgsMapLayer;
|
|||||||
* QgsLegendInterface
|
* QgsLegendInterface
|
||||||
* Abstract base class to make QgsLegend available to plugins.
|
* Abstract base class to make QgsLegend available to plugins.
|
||||||
*/
|
*/
|
||||||
|
Q_NOWARN_DEPRECATED_PUSH
|
||||||
class QgsAppLegendInterface : public QgsLegendInterface
|
class QgsAppLegendInterface : public QgsLegendInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -117,5 +118,6 @@ class QgsAppLegendInterface : public QgsLegendInterface
|
|||||||
int groupNodeToIndex( QgsLayerTreeGroup* group );
|
int groupNodeToIndex( QgsLayerTreeGroup* group );
|
||||||
void setExpanded( QgsLayerTreeNode *node, bool expand );
|
void setExpanded( QgsLayerTreeNode *node, bool expand );
|
||||||
};
|
};
|
||||||
|
Q_NOWARN_DEPRECATED_POP
|
||||||
|
|
||||||
#endif //QGSLEGENDAPPIFACE_H
|
#endif //QGSLEGENDAPPIFACE_H
|
||||||
|
@ -32,6 +32,7 @@ class QgisApp;
|
|||||||
* Only those functions "exposed" by QgisInterface can be called from within a
|
* Only those functions "exposed" by QgisInterface can be called from within a
|
||||||
* plugin.
|
* plugin.
|
||||||
*/
|
*/
|
||||||
|
Q_NOWARN_DEPRECATED_PUSH
|
||||||
class APP_EXPORT QgisAppInterface : public QgisInterface
|
class APP_EXPORT QgisAppInterface : public QgisInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -508,5 +509,6 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
|
|||||||
//! Pointer to the PluginManagerInterface object
|
//! Pointer to the PluginManagerInterface object
|
||||||
QgsAppPluginManagerInterface pluginManagerIface;
|
QgsAppPluginManagerInterface pluginManagerIface;
|
||||||
};
|
};
|
||||||
|
Q_NOWARN_DEPRECATED_POP
|
||||||
|
|
||||||
#endif //#define QGISAPPINTERFACE_H
|
#endif //#define QGISAPPINTERFACE_H
|
||||||
|
@ -111,7 +111,7 @@ void QgsMapToolDeletePart::canvasReleaseEvent( QMouseEvent *e )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QgsGeometry* QgsMapToolDeletePart::partUnderPoint( QPoint point, int& fid, int& partNum )
|
QgsGeometry* QgsMapToolDeletePart::partUnderPoint( QPoint point, QgsFeatureId& fid, int& partNum )
|
||||||
{
|
{
|
||||||
QgsFeature f;
|
QgsFeature f;
|
||||||
QgsGeometry* geomPart = new QgsGeometry();
|
QgsGeometry* geomPart = new QgsGeometry();
|
||||||
|
@ -43,14 +43,14 @@ class APP_EXPORT QgsMapToolDeletePart: public QgsMapToolEdit
|
|||||||
QgsVectorLayer* vlayer;
|
QgsVectorLayer* vlayer;
|
||||||
QList<QgsSnappingResult> mRecentSnappingResults;
|
QList<QgsSnappingResult> mRecentSnappingResults;
|
||||||
|
|
||||||
QgsGeometry* partUnderPoint( QPoint p, int &fid, int &partNum );
|
QgsGeometry* partUnderPoint( QPoint p, QgsFeatureId &fid, int &partNum );
|
||||||
|
|
||||||
/* Rubberband that shows the part being deleted*/
|
/* Rubberband that shows the part being deleted*/
|
||||||
QgsRubberBand* mRubberBand;
|
QgsRubberBand* mRubberBand;
|
||||||
|
|
||||||
//The feature and part where the mouse cursor was pressed
|
//The feature and part where the mouse cursor was pressed
|
||||||
//This is used to check whether we are still in the same part at cursor release
|
//This is used to check whether we are still in the same part at cursor release
|
||||||
int mPressedFid;
|
QgsFeatureId mPressedFid;
|
||||||
int mPressedPartNum;
|
int mPressedPartNum;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ void QgsMapToolDeleteRing::canvasReleaseEvent( QMouseEvent *e )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QgsGeometry* QgsMapToolDeleteRing::ringUnderPoint( QgsPoint p, int& fid, int& partNum, int& ringNum )
|
QgsGeometry* QgsMapToolDeleteRing::ringUnderPoint( QgsPoint p, QgsFeatureId& fid, int& partNum, int& ringNum )
|
||||||
{
|
{
|
||||||
//There is no clean way to find if we are inside the ring of a feature,
|
//There is no clean way to find if we are inside the ring of a feature,
|
||||||
//so we iterate over all the features visible in the canvas
|
//so we iterate over all the features visible in the canvas
|
||||||
@ -120,7 +120,7 @@ QgsGeometry* QgsMapToolDeleteRing::ringUnderPoint( QgsPoint p, int& fid, int& pa
|
|||||||
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( mCanvas->extent() ) );
|
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( mCanvas->extent() ) );
|
||||||
QgsFeature f;
|
QgsFeature f;
|
||||||
QgsGeometry* g;
|
QgsGeometry* g;
|
||||||
QgsGeometry* ringGeom;
|
QgsGeometry* ringGeom = 0;
|
||||||
QgsMultiPolygon pol;
|
QgsMultiPolygon pol;
|
||||||
QgsPolygon tempPol;
|
QgsPolygon tempPol;
|
||||||
QgsGeometry* tempGeom;
|
QgsGeometry* tempGeom;
|
||||||
|
@ -54,13 +54,13 @@ class APP_EXPORT QgsMapToolDeleteRing : public QgsMapToolVertexEdit
|
|||||||
/*! return the geometry of the ring under the point p and sets fid to the feature id,
|
/*! return the geometry of the ring under the point p and sets fid to the feature id,
|
||||||
* partNum to the part number in the feature and ringNum to the ring number in the part
|
* partNum to the part number in the feature and ringNum to the ring number in the part
|
||||||
*/
|
*/
|
||||||
QgsGeometry* ringUnderPoint( QgsPoint p, int& fid, int& partNum, int& ringNum );
|
QgsGeometry* ringUnderPoint( QgsPoint p, QgsFeatureId& fid, int& partNum, int& ringNum );
|
||||||
|
|
||||||
/* Rubberband that shows the ring being deleted*/
|
/* Rubberband that shows the ring being deleted*/
|
||||||
QgsRubberBand* mRubberBand;
|
QgsRubberBand* mRubberBand;
|
||||||
|
|
||||||
//The feature, part and ring the mouse was pressed in, to check we are still in the same ring at release
|
//The feature, part and ring the mouse was pressed in, to check we are still in the same ring at release
|
||||||
int mPressedFid;
|
QgsFeatureId mPressedFid;
|
||||||
int mPressedPartNum;
|
int mPressedPartNum;
|
||||||
int mPressedRingNum;
|
int mPressedRingNum;
|
||||||
};
|
};
|
||||||
|
@ -451,7 +451,7 @@ int QgsMapToolLabel::dataDefinedColumnIndex( QgsPalLayerSettings::DataDefinedPro
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QgsMapToolLabel::dataDefinedPosition( QgsVectorLayer* vlayer, int featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const
|
bool QgsMapToolLabel::dataDefinedPosition( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const
|
||||||
{
|
{
|
||||||
xSuccess = false;
|
xSuccess = false;
|
||||||
ySuccess = false;
|
ySuccess = false;
|
||||||
@ -504,7 +504,7 @@ bool QgsMapToolLabel::layerIsRotatable( QgsMapLayer* layer, int& rotationCol ) c
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QgsMapToolLabel::dataDefinedRotation( QgsVectorLayer* vlayer, int featureId, double& rotation, bool& rotationSuccess, bool ignoreXY ) const
|
bool QgsMapToolLabel::dataDefinedRotation( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, double& rotation, bool& rotationSuccess, bool ignoreXY ) const
|
||||||
{
|
{
|
||||||
rotationSuccess = false;
|
rotationSuccess = false;
|
||||||
if ( !vlayer )
|
if ( !vlayer )
|
||||||
@ -540,7 +540,7 @@ bool QgsMapToolLabel::dataDefinedRotation( QgsVectorLayer* vlayer, int featureId
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QgsMapToolLabel::dataDefinedShowHide( QgsVectorLayer* vlayer, int featureId, int& show, bool& showSuccess, int& showCol ) const
|
bool QgsMapToolLabel::dataDefinedShowHide( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, int& show, bool& showSuccess, int& showCol ) const
|
||||||
{
|
{
|
||||||
showSuccess = false;
|
showSuccess = false;
|
||||||
if ( !vlayer )
|
if ( !vlayer )
|
||||||
|
@ -126,7 +126,7 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapTool
|
|||||||
@param xCol out: index of the x position column
|
@param xCol out: index of the x position column
|
||||||
@param yCol out: index of the y position column
|
@param yCol out: index of the y position column
|
||||||
@return false if layer does not have data defined label position enabled*/
|
@return false if layer does not have data defined label position enabled*/
|
||||||
bool dataDefinedPosition( QgsVectorLayer* vlayer, int featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const;
|
bool dataDefinedPosition( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const;
|
||||||
|
|
||||||
/**Returns data defined rotation of a feature.
|
/**Returns data defined rotation of a feature.
|
||||||
@param vlayer vector layer
|
@param vlayer vector layer
|
||||||
@ -136,7 +136,7 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapTool
|
|||||||
@param ignoreXY ignore that x and y are required to be data-defined
|
@param ignoreXY ignore that x and y are required to be data-defined
|
||||||
@return true if data defined rotation is enabled on the layer
|
@return true if data defined rotation is enabled on the layer
|
||||||
*/
|
*/
|
||||||
bool dataDefinedRotation( QgsVectorLayer* vlayer, int featureId, double& rotation, bool& rotationSuccess, bool ignoreXY = false ) const;
|
bool dataDefinedRotation( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, double& rotation, bool& rotationSuccess, bool ignoreXY = false ) const;
|
||||||
|
|
||||||
/**Returns data defined show/hide of a feature.
|
/**Returns data defined show/hide of a feature.
|
||||||
@param vlayer vector layer
|
@param vlayer vector layer
|
||||||
@ -146,7 +146,7 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapTool
|
|||||||
@param showCol out: index of the show label column
|
@param showCol out: index of the show label column
|
||||||
@return true if data defined show/hide is enabled on the layer
|
@return true if data defined show/hide is enabled on the layer
|
||||||
*/
|
*/
|
||||||
bool dataDefinedShowHide( QgsVectorLayer* vlayer, int featureId, int& show, bool& showSuccess, int& showCol ) const;
|
bool dataDefinedShowHide( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, int& show, bool& showSuccess, int& showCol ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QgsPalLayerSettings mInvalidLabelSettings;
|
QgsPalLayerSettings mInvalidLabelSettings;
|
||||||
|
@ -260,7 +260,7 @@ bool QgsMapToolShowHideLabels::selectedLabelFeatures( QgsVectorLayer* vlayer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool QgsMapToolShowHideLabels::showHideLabel( QgsVectorLayer* vlayer,
|
bool QgsMapToolShowHideLabels::showHideLabel( QgsVectorLayer* vlayer,
|
||||||
int fid,
|
const QgsFeatureId &fid,
|
||||||
bool hide )
|
bool hide )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class APP_EXPORT QgsMapToolShowHideLabels : public QgsMapToolLabel
|
|||||||
|
|
||||||
//! Show or hide chosen label by setting data defined Show Label to 0
|
//! Show or hide chosen label by setting data defined Show Label to 0
|
||||||
bool showHideLabel( QgsVectorLayer* vlayer,
|
bool showHideLabel( QgsVectorLayer* vlayer,
|
||||||
int fid,
|
const QgsFeatureId &fid,
|
||||||
bool hide );
|
bool hide );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1516,7 +1516,7 @@ bool QgsCoordinateReferenceSystem::saveAsUserCRS( QString name )
|
|||||||
|
|
||||||
QgsMessageLog::logMessage( QObject::tr( "Saved user CRS [%1]" ).arg( toProj4() ), QObject::tr( "CRS" ) );
|
QgsMessageLog::logMessage( QObject::tr( "Saved user CRS [%1]" ).arg( toProj4() ), QObject::tr( "CRS" ) );
|
||||||
|
|
||||||
int return_id;
|
qint64 return_id;
|
||||||
if ( myResult == SQLITE_OK )
|
if ( myResult == SQLITE_OK )
|
||||||
{
|
{
|
||||||
return_id = sqlite3_last_insert_rowid( myDatabase );
|
return_id = sqlite3_last_insert_rowid( myDatabase );
|
||||||
|
@ -127,6 +127,7 @@ class CORE_EXPORT QgsExpression
|
|||||||
|
|
||||||
//! Evaluate the feature and return the result
|
//! Evaluate the feature and return the result
|
||||||
//! @note this method does not expect that prepare() has been called on this instance
|
//! @note this method does not expect that prepare() has been called on this instance
|
||||||
|
//! @note not available in python bindings
|
||||||
inline QVariant evaluate( const QgsFeature& f, const QgsFields& fields ) { return evaluate( &f, fields ); }
|
inline QVariant evaluate( const QgsFeature& f, const QgsFields& fields ) { return evaluate( &f, fields ); }
|
||||||
|
|
||||||
//! Returns true if an error occurred when evaluating last input
|
//! Returns true if an error occurred when evaluating last input
|
||||||
@ -153,7 +154,7 @@ class CORE_EXPORT QgsExpression
|
|||||||
|
|
||||||
void setScale( double scale ) { mScale = scale; }
|
void setScale( double scale ) { mScale = scale; }
|
||||||
|
|
||||||
int scale() {return mScale; }
|
double scale() { return mScale; }
|
||||||
|
|
||||||
//! Return the expression string that was given when created.
|
//! Return the expression string that was given when created.
|
||||||
const QString expression() const { return dump(); }
|
const QString expression() const { return dump(); }
|
||||||
|
@ -189,8 +189,8 @@ class CORE_EXPORT QgsMapRenderer : public QObject
|
|||||||
void setScale( double scale ) {mScale = scale;}
|
void setScale( double scale ) {mScale = scale;}
|
||||||
double mapUnitsPerPixel() const { return mMapUnitsPerPixel; }
|
double mapUnitsPerPixel() const { return mMapUnitsPerPixel; }
|
||||||
|
|
||||||
int width() const { return mSize.width(); }
|
int width() const { return ( int ) mSize.width(); }
|
||||||
int height() const { return mSize.height(); }
|
int height() const { return ( int ) mSize.height(); }
|
||||||
|
|
||||||
//! Recalculate the map scale
|
//! Recalculate the map scale
|
||||||
void updateScale();
|
void updateScale();
|
||||||
|
@ -64,10 +64,8 @@ class QgsVectorLayer;
|
|||||||
class CORE_EXPORT QgsPalLayerSettings
|
class CORE_EXPORT QgsPalLayerSettings
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Q_NOWARN_DEPRECATED_PUSH
|
|
||||||
QgsPalLayerSettings();
|
QgsPalLayerSettings();
|
||||||
QgsPalLayerSettings( const QgsPalLayerSettings& s );
|
QgsPalLayerSettings( const QgsPalLayerSettings& s );
|
||||||
Q_NOWARN_DEPRECATED_POP
|
|
||||||
~QgsPalLayerSettings();
|
~QgsPalLayerSettings();
|
||||||
|
|
||||||
//! @note added in 2.4
|
//! @note added in 2.4
|
||||||
@ -702,7 +700,7 @@ class CORE_EXPORT QgsLabelingResults
|
|||||||
friend class QgsPalLabeling;
|
friend class QgsPalLabeling;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_NOWARN_DEPRECATED_PUSH
|
||||||
class CORE_EXPORT QgsPalLabeling : public QgsLabelingEngineInterface
|
class CORE_EXPORT QgsPalLabeling : public QgsLabelingEngineInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -745,9 +743,7 @@ class CORE_EXPORT QgsPalLabeling : public QgsLabelingEngineInterface
|
|||||||
|
|
||||||
//! called when we're going to start with rendering
|
//! called when we're going to start with rendering
|
||||||
//! @deprecated since 2.4 - use override with QgsMapSettings
|
//! @deprecated since 2.4 - use override with QgsMapSettings
|
||||||
Q_NOWARN_DEPRECATED_PUSH
|
|
||||||
Q_DECL_DEPRECATED virtual void init( QgsMapRenderer* mr );
|
Q_DECL_DEPRECATED virtual void init( QgsMapRenderer* mr );
|
||||||
Q_NOWARN_DEPRECATED_POP
|
|
||||||
//! called when we're going to start with rendering
|
//! called when we're going to start with rendering
|
||||||
virtual void init( const QgsMapSettings& mapSettings );
|
virtual void init( const QgsMapSettings& mapSettings );
|
||||||
//! called to find out whether the layer is used for labeling
|
//! called to find out whether the layer is used for labeling
|
||||||
@ -776,14 +772,12 @@ class CORE_EXPORT QgsPalLabeling : public QgsLabelingEngineInterface
|
|||||||
//! called when we're done with rendering
|
//! called when we're done with rendering
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
Q_NOWARN_DEPRECATED_PUSH
|
|
||||||
//! return infos about labels at a given (map) position
|
//! return infos about labels at a given (map) position
|
||||||
//! @deprecated since 2.4 - use takeResults() and methods of QgsLabelingResults
|
//! @deprecated since 2.4 - use takeResults() and methods of QgsLabelingResults
|
||||||
Q_DECL_DEPRECATED virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p );
|
Q_DECL_DEPRECATED virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p );
|
||||||
//! return infos about labels within a given (map) rectangle
|
//! return infos about labels within a given (map) rectangle
|
||||||
//! @deprecated since 2.4 - use takeResults() and methods of QgsLabelingResults
|
//! @deprecated since 2.4 - use takeResults() and methods of QgsLabelingResults
|
||||||
Q_DECL_DEPRECATED virtual QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r );
|
Q_DECL_DEPRECATED virtual QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r );
|
||||||
Q_NOWARN_DEPRECATED_POP
|
|
||||||
|
|
||||||
//! Return pointer to recently computed results (in drawLabeling()) and pass the ownership of results to the caller
|
//! Return pointer to recently computed results (in drawLabeling()) and pass the ownership of results to the caller
|
||||||
//! @note added in 2.4
|
//! @note added in 2.4
|
||||||
@ -864,5 +858,7 @@ class CORE_EXPORT QgsPalLabeling : public QgsLabelingEngineInterface
|
|||||||
|
|
||||||
QgsLabelingResults* mResults;
|
QgsLabelingResults* mResults;
|
||||||
};
|
};
|
||||||
|
Q_NOWARN_DEPRECATED_POP
|
||||||
|
|
||||||
|
|
||||||
#endif // QGSPALLABELING_H
|
#endif // QGSPALLABELING_H
|
||||||
|
@ -315,7 +315,7 @@ ErrorList topolTest::checkDanglingLines( double tolerance, QgsVectorLayer* layer
|
|||||||
QgsPoint p = pointIt->first;
|
QgsPoint p = pointIt->first;
|
||||||
QgsFeatureId k = pointIt->second;
|
QgsFeatureId k = pointIt->second;
|
||||||
|
|
||||||
int repetitions = endVerticesMap.count( p );
|
size_t repetitions = endVerticesMap.count( p );
|
||||||
|
|
||||||
//QgsGeometry* extentPoly =
|
//QgsGeometry* extentPoly =
|
||||||
if ( repetitions == 1 )
|
if ( repetitions == 1 )
|
||||||
@ -359,21 +359,21 @@ ErrorList topolTest::checkDuplicates( double tolerance, QgsVectorLayer *layer1,
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
ErrorList errorList;
|
ErrorList errorList;
|
||||||
|
|
||||||
QList<int>* duplicateIds = new QList<int>();
|
QList<QgsFeatureId>* duplicateIds = new QList<QgsFeatureId>();
|
||||||
|
|
||||||
QgsSpatialIndex* index = mLayerIndexes[layer1->id()];
|
QgsSpatialIndex* index = mLayerIndexes[layer1->id()];
|
||||||
|
|
||||||
QgsGeometry* canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() );
|
QgsGeometry* canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() );
|
||||||
|
|
||||||
|
|
||||||
QMap<int, FeatureLayer>::Iterator it;
|
QMap<QgsFeatureId, FeatureLayer>::Iterator it;
|
||||||
QMap<int, FeatureLayer>::ConstIterator FeatureListEnd = mFeatureMap2.end();
|
QMap<QgsFeatureId, FeatureLayer>::ConstIterator FeatureListEnd = mFeatureMap2.end();
|
||||||
for ( it = mFeatureMap2.begin(); it != FeatureListEnd; ++it )
|
for ( it = mFeatureMap2.begin(); it != FeatureListEnd; ++it )
|
||||||
{
|
{
|
||||||
if ( !( ++i % 100 ) )
|
if ( !( ++i % 100 ) )
|
||||||
emit progress( i );
|
emit progress( i );
|
||||||
|
|
||||||
int currentId = it->feature.id();
|
QgsFeatureId currentId = it->feature.id();
|
||||||
|
|
||||||
if ( duplicateIds->contains( currentId ) )
|
if ( duplicateIds->contains( currentId ) )
|
||||||
{
|
{
|
||||||
@ -469,7 +469,7 @@ ErrorList topolTest::checkOverlaps( double tolerance, QgsVectorLayer *layer1, Qg
|
|||||||
return errorList;
|
return errorList;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<int>* duplicateIds = new QList<int>();
|
QList<QgsFeatureId>* duplicateIds = new QList<QgsFeatureId>();
|
||||||
|
|
||||||
QgsSpatialIndex* index;
|
QgsSpatialIndex* index;
|
||||||
index = mLayerIndexes[layer1->id()];
|
index = mLayerIndexes[layer1->id()];
|
||||||
@ -480,14 +480,14 @@ ErrorList topolTest::checkOverlaps( double tolerance, QgsVectorLayer *layer1, Qg
|
|||||||
return errorList;
|
return errorList;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<int, FeatureLayer>::Iterator it;
|
QMap<QgsFeatureId, FeatureLayer>::Iterator it;
|
||||||
QMap<int, FeatureLayer>::ConstIterator FeatureListEnd = mFeatureMap2.end();
|
QMap<QgsFeatureId, FeatureLayer>::ConstIterator FeatureListEnd = mFeatureMap2.end();
|
||||||
for ( it = mFeatureMap2.begin(); it != FeatureListEnd; ++it )
|
for ( it = mFeatureMap2.begin(); it != FeatureListEnd; ++it )
|
||||||
{
|
{
|
||||||
if ( !( ++i % 100 ) )
|
if ( !( ++i % 100 ) )
|
||||||
emit progress( i );
|
emit progress( i );
|
||||||
|
|
||||||
int currentId = it->feature.id();
|
QgsFeatureId currentId = it->feature.id();
|
||||||
|
|
||||||
if ( duplicateIds->contains( currentId ) )
|
if ( duplicateIds->contains( currentId ) )
|
||||||
{
|
{
|
||||||
@ -552,8 +552,6 @@ ErrorList topolTest::checkOverlaps( double tolerance, QgsVectorLayer *layer1, Qg
|
|||||||
duplicateIds->append( mFeatureMap2[*cit].feature.id() );
|
duplicateIds->append( mFeatureMap2[*cit].feature.id() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ( duplicate )
|
if ( duplicate )
|
||||||
{
|
{
|
||||||
QList<FeatureLayer> fls;
|
QList<FeatureLayer> fls;
|
||||||
@ -812,7 +810,7 @@ ErrorList topolTest::checkPseudos( double tolerance, QgsVectorLayer *layer1, Qgs
|
|||||||
QgsPoint p = pointIt->first;
|
QgsPoint p = pointIt->first;
|
||||||
QgsFeatureId k = pointIt->second;
|
QgsFeatureId k = pointIt->second;
|
||||||
|
|
||||||
int repetitions = endVerticesMap.count( p );
|
size_t repetitions = endVerticesMap.count( p );
|
||||||
|
|
||||||
if ( repetitions == 2 )
|
if ( repetitions == 2 )
|
||||||
{
|
{
|
||||||
|
@ -250,7 +250,7 @@ class topolTest: public QObject
|
|||||||
QMap<QString, TopologyRule> mTopologyRuleMap;
|
QMap<QString, TopologyRule> mTopologyRuleMap;
|
||||||
|
|
||||||
QList<FeatureLayer> mFeatureList1;
|
QList<FeatureLayer> mFeatureList1;
|
||||||
QMap<int, FeatureLayer> mFeatureMap2;
|
QMap<QgsFeatureId, FeatureLayer> mFeatureMap2;
|
||||||
|
|
||||||
QgisInterface* theQgsInterface;
|
QgisInterface* theQgsInterface;
|
||||||
bool mTestCancelled;
|
bool mTestCancelled;
|
||||||
|
@ -1695,7 +1695,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_41">
|
<spacer name="horizontalSpacer_46">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user