Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -19,6 +19,7 @@ | ||
|
||
const QString QgsLegacyHelpers::convertEditType( QgsVectorLayer::EditType editType, QgsEditorWidgetConfig& cfg, QgsVectorLayer* vl, const QString& name, const QDomElement &editTypeElement ) | ||
{ | ||
Q_NOWARN_DEPRECATED_PUSH | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nyalldawson
Author
Collaborator
|
||
QString widgetType = "TextEdit"; // Fallback | ||
|
||
switch ( editType ) | ||
@@ -202,10 +203,13 @@ const QString QgsLegacyHelpers::convertEditType( QgsVectorLayer::EditType editTy | ||
} | ||
|
||
return widgetType; | ||
Q_NOWARN_DEPRECATED_POP | ||
} | ||
|
||
QgsVectorLayer::EditType QgsLegacyHelpers::convertEditType( const QString& editType, const QgsEditorWidgetConfig& cfg, QgsVectorLayer* vl, const QString& name ) | ||
{ | ||
Q_NOWARN_DEPRECATED_PUSH | ||
|
||
int idx = vl->fieldNameIndex( name ); | ||
|
||
if ( !vl->fieldEditable( idx ) ) | ||
@@ -310,4 +314,5 @@ QgsVectorLayer::EditType QgsLegacyHelpers::convertEditType( const QString& editT | ||
} | ||
|
||
return QgsVectorLayer::EditorWidgetV2; | ||
Q_NOWARN_DEPRECATED_POP | ||
} |
shouldn't this be better ported to the new API?