Skip to content

Commit cac9c9e

Browse files
committedNov 24, 2015
Avoid some deprecated warnings
1 parent 3624d7b commit cac9c9e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed
 

‎src/core/qgsvectorlayer.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2754,10 +2754,10 @@ void QgsVectorLayer::setEditType( int idx, EditType type )
27542754

27552755
Q_NOWARN_DEPRECATED_PUSH
27562756
const QString widgetType = QgsLegacyHelpers::convertEditType( type, cfg, this, mUpdatedFields[idx].name() );
2757-
Q_NOWARN_DEPRECATED_POP
27582757

27592758
setEditorWidgetV2( idx, widgetType );
27602759
setEditorWidgetV2Config( idx, cfg );
2760+
Q_NOWARN_DEPRECATED_POP
27612761
}
27622762

27632763
void QgsVectorLayer::setAnnotationForm( const QString& ui )
@@ -2767,28 +2767,36 @@ void QgsVectorLayer::setAnnotationForm( const QString& ui )
27672767

27682768
QMap< QString, QVariant > QgsVectorLayer::valueMap( int idx )
27692769
{
2770+
Q_NOWARN_DEPRECATED_PUSH
27702771
return editorWidgetV2Config( idx );
2772+
Q_NOWARN_DEPRECATED_POP
27712773
}
27722774

27732775
QgsVectorLayer::RangeData QgsVectorLayer::range( int idx )
27742776
{
2777+
Q_NOWARN_DEPRECATED_PUSH
27752778
const QgsEditorWidgetConfig cfg = editorWidgetV2Config( idx );
27762779
return RangeData(
27772780
cfg.value( "Min" ),
27782781
cfg.value( "Max" ),
27792782
cfg.value( "Step" )
27802783
);
2784+
Q_NOWARN_DEPRECATED_POP
27812785
}
27822786

27832787
QString QgsVectorLayer::dateFormat( int idx )
27842788
{
2789+
Q_NOWARN_DEPRECATED_PUSH
27852790
return editorWidgetV2Config( idx ).value( "DateFormat" ).toString();
2791+
Q_NOWARN_DEPRECATED_POP
27862792
}
27872793

27882794
QSize QgsVectorLayer::widgetSize( int idx )
27892795
{
2796+
Q_NOWARN_DEPRECATED_PUSH
27902797
const QgsEditorWidgetConfig cfg = editorWidgetV2Config( idx );
27912798
return QSize( cfg.value( "Width" ).toInt(), cfg.value( "Height" ).toInt() );
2799+
Q_NOWARN_DEPRECATED_POP
27922800
}
27932801

27942802
void QgsVectorLayer::setRendererV2( QgsFeatureRendererV2 *r )
@@ -2859,10 +2867,12 @@ void QgsVectorLayer::destroyEditCommand()
28592867

28602868
void QgsVectorLayer::setCheckedState( int idx, const QString& checked, const QString& unchecked )
28612869
{
2870+
Q_NOWARN_DEPRECATED_PUSH
28622871
QgsEditorWidgetConfig cfg = editorWidgetV2Config( idx );
28632872
cfg["CheckedState"] = checked;
28642873
cfg["UncheckedState"] = unchecked;
28652874
setEditorWidgetV2Config( idx, cfg );
2875+
Q_NOWARN_DEPRECATED_POP
28662876
}
28672877

28682878
int QgsVectorLayer::fieldNameIndex( const QString& fieldName ) const

0 commit comments

Comments
 (0)
Please sign in to comment.