Skip to content

Commit d316cd8

Browse files
author
jef
committedOct 10, 2009
use qobject_cast instead of dynamic_cast where possible
git-svn-id: http://svn.osgeo.org/qgis/trunk@11790 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d650055 commit d316cd8

File tree

68 files changed

+343
-371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+343
-371
lines changed
 

‎src/analysis/vector/qgsgeometryanalyzer.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ bool QgsGeometryAnalyzer::exportGeometryInformation( QgsVectorLayer* layer,
195195
const QString& shapefileName,
196196
const QString& fileEncoding )
197197
{
198+
return false;
199+
#if 0
198200
QgsVectorDataProvider* provider = layer->dataProvider();
199201
QgsAttributeList allAttrs = provider->attributeIndexes();
200202
provider->select( allAttrs, QgsRectangle(), true );
@@ -223,7 +225,7 @@ bool QgsGeometryAnalyzer::exportGeometryInformation( QgsVectorLayer* layer,
223225
writer.addFeature( outFeat );
224226
}
225227
return true;
226-
228+
#endif
227229
}
228230
bool QgsGeometryAnalyzer::simplifyGeometry( QgsVectorLayer* layer,
229231
const QString shapefileName,

‎src/app/attributetable/qgsattributetabledelegate.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
QgsVectorLayer *QgsAttributeTableDelegate::layer( const QAbstractItemModel *model ) const
3030
{
31-
const QgsAttributeTableModel *tm = dynamic_cast<const QgsAttributeTableModel*>( model );
31+
const QgsAttributeTableModel *tm = qobject_cast<const QgsAttributeTableModel *>( model );
3232
if ( tm )
3333
return tm->layer();
3434

35-
const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel*>( model );
35+
const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel *>( model );
3636
if ( fm )
3737
return fm->layer();
3838

@@ -41,11 +41,11 @@ QgsVectorLayer *QgsAttributeTableDelegate::layer( const QAbstractItemModel *mode
4141

4242
int QgsAttributeTableDelegate::fieldIdx( const QModelIndex &index ) const
4343
{
44-
const QgsAttributeTableModel *tm = dynamic_cast<const QgsAttributeTableModel*>( index.model() );
44+
const QgsAttributeTableModel *tm = qobject_cast<const QgsAttributeTableModel *>( index.model() );
4545
if ( tm )
4646
return tm->fieldIdx( index.column() );
4747

48-
const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel*>( index.model() );
48+
const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel *>( index.model() );
4949
if ( fm )
5050
return fm->tableModel()->fieldIdx( index.column() );
5151

0 commit comments

Comments
 (0)