Skip to content

Commit a0405b8

Browse files
committed
Avoid deprecated warnings
1 parent ca362df commit a0405b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/qgslegacyhelpers.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
const QString QgsLegacyHelpers::convertEditType( QgsVectorLayer::EditType editType, QgsEditorWidgetConfig& cfg, QgsVectorLayer* vl, const QString& name, const QDomElement &editTypeElement )
2121
{
22+
Q_NOWARN_DEPRECATED_PUSH
2223
QString widgetType = "TextEdit"; // Fallback
2324

2425
switch ( editType )
@@ -202,10 +203,13 @@ const QString QgsLegacyHelpers::convertEditType( QgsVectorLayer::EditType editTy
202203
}
203204

204205
return widgetType;
206+
Q_NOWARN_DEPRECATED_POP
205207
}
206208

207209
QgsVectorLayer::EditType QgsLegacyHelpers::convertEditType( const QString& editType, const QgsEditorWidgetConfig& cfg, QgsVectorLayer* vl, const QString& name )
208210
{
211+
Q_NOWARN_DEPRECATED_PUSH
212+
209213
int idx = vl->fieldNameIndex( name );
210214

211215
if ( !vl->fieldEditable( idx ) )
@@ -310,4 +314,5 @@ QgsVectorLayer::EditType QgsLegacyHelpers::convertEditType( const QString& editT
310314
}
311315

312316
return QgsVectorLayer::EditorWidgetV2;
317+
Q_NOWARN_DEPRECATED_POP
313318
}

0 commit comments

Comments
 (0)