Skip to content

Commit

Permalink
fix in listwidgetfactory and set method of ogrprovider to const not c…
Browse files Browse the repository at this point in the history
…hanging class values
  • Loading branch information
signedav committed Jan 2, 2019
1 parent a62867d commit 386c16f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgslistwidgetfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ QgsEditorConfigWidget *QgsListWidgetFactory::configWidget( QgsVectorLayer *vl, i
unsigned int QgsListWidgetFactory::fieldScore( const QgsVectorLayer *vl, int fieldIdx ) const
{
const QgsField field = vl->fields().field( fieldIdx );
return ( field.type() == QVariant::List || field.type() == QVariant::StringList || QVariant::Map ) && field.subType() != QVariant::Invalid ? 20 : 0;
return ( field.type() == QVariant::List || field.type() == QVariant::StringList || field.type() == QVariant::Map ) && field.subType() != QVariant::Invalid ? 20 : 0;
}
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ OGRGeometryH QgsOgrProvider::ConvertGeometryIfNecessary( OGRGeometryH hGeom )
return OGR_G_ForceTo( hGeom, layerGeomType, nullptr );
}

QString QgsOgrProvider::jsonStringValue( const QVariant &value, const QVariant::Type &type )
QString QgsOgrProvider::jsonStringValue( const QVariant &value, const QVariant::Type &type ) const
{
switch ( type )
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class QgsOgrProvider : public QgsVectorDataProvider
mutable QStringList mSubLayerList;

//! converts \a value from json QVariant to QString regarding to \a type
QString jsonStringValue( const QVariant &value, const QVariant::Type &type );
QString jsonStringValue( const QVariant &value, const QVariant::Type &type ) const;

bool addFeaturePrivate( QgsFeature &f, QgsFeatureSink::Flags flags );
//! Deletes one feature
Expand Down

0 comments on commit 386c16f

Please sign in to comment.