Skip to content
Permalink
Browse files

clean up the code to avoid deprecation and other warnings

  • Loading branch information
brushtyler committed Sep 15, 2011
1 parent c942ee4 commit 47f82ab044f324b015da46683a0ecc9203184506
@@ -4847,7 +4847,7 @@ void QgisApp::fullHistogramStretch()
tr( "To perform a full histogram stretch, you need to have a raster layer selected." ) );
return;
}
if ( rlayer->providerKey() == "wms" )
if ( rlayer->providerType() == "wms" )
{
return;
}
@@ -270,7 +270,7 @@ void QgsIdentifyResults::addFeature( QgsRasterLayer *layer,
featItem->setData( 0, Qt::UserRole, -1 );
layItem->addChild( featItem );

if ( layer && layer->providerKey() == "wms" )
if ( layer && layer->providerType() == "wms" )
{
QTreeWidgetItem *attrItem = new QTreeWidgetItem( QStringList() << attributes.begin().key() << "" );
featItem->addChild( attrItem );
@@ -327,7 +327,7 @@ bool QgsMapToolIdentify::identifyRasterLayer( QgsRasterLayer *layer, int x, int
idPoint = toLayerCoordinates( layer, idPoint );
QString type;

if ( layer->providerKey() == "wms" )
if ( layer->providerType() == "wms" )
{
type = tr( "WMS layer" );

@@ -142,7 +142,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
{
QgsRasterLayer *rl = qobject_cast<QgsRasterLayer *>( currentLayer );

if ( rl && rl->providerKey() == "wms" )
if ( rl && rl->providerType() == "wms" )
{
type = tr( "WMS" );
}
@@ -38,7 +38,7 @@ void QgsTileScaleWidget::layerChanged( QgsMapLayer *layer )
mResolutions.clear();
mSlider->setDisabled( true );

if ( !rl || rl->providerKey() != "wms" )
if ( !rl || rl->providerType() != "wms" )
return;

QString uri = rl->source();
@@ -93,7 +93,6 @@ class GUI_EXPORT QgsQueryBuilder : public QDialog, private Ui::QgsQueryBuilderBa
* The number of rows that would be returned is displayed in a message box.
* The test uses a "select count(*) from ..." query to test the SQL
* statement.
* @param showResults If true, the results are displayed in a QMessageBox
*/
void test();
/*!

0 comments on commit 47f82ab

Please sign in to comment.
You can’t perform that action at this time.