Use layer method for unique values in query builder and old symbology

git-svn-id: http://svn.osgeo.org/qgis/trunk@15311 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2011-03-02 14:55:42 +00:00
parent 2c0e214df0
commit dafc6db95f
2 changed files with 3 additions and 4 deletions

View File

@ -98,7 +98,7 @@ void QgsQueryBuilder::fillValues( int idx, int limit )
// determine the field type
QList<QVariant> values;
mLayer->dataProvider()->uniqueValues( idx, values, limit );
mLayer->uniqueValues( idx, values, limit );
for ( int i = 0; i < values.size(); i++ )
{

View File

@ -293,8 +293,7 @@ void QgsUniqueValueDialog::changeClassificationAttribute()
}
mOldClassificationAttribute = attributeName;
QgsVectorDataProvider *provider = dynamic_cast<QgsVectorDataProvider *>( mVectorLayer->dataProvider() );
if ( provider )
if ( mVectorLayer )
{
int nr = mClassificationComboBox->itemData( mClassificationComboBox->currentIndex() ).toInt();
if ( nr == -1 )
@ -303,7 +302,7 @@ void QgsUniqueValueDialog::changeClassificationAttribute()
}
QList<QVariant> values;
provider->uniqueValues( nr, values );
mVectorLayer->uniqueValues( nr, values );
for ( int i = 0; i < values.size(); i++ )
{