Skip to content

Commit be7f85b

Browse files
committed
Remove some unused variables
1 parent 3837ddf commit be7f85b

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

src/app/qgisapp.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -4349,7 +4349,6 @@ void QgisApp::askUserForOGRSublayers( QgsVectorLayer *layer )
43494349
}
43504350

43514351
QStringList sublayers = layer->dataProvider()->subLayers();
4352-
QString layertype = layer->dataProvider()->storageType();
43534352

43544353
QgsSublayersDialog::LayerDefinitionList list;
43554354
Q_FOREACH ( const QString &sublayer, sublayers )

src/providers/db2/qgsdb2provider.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1106,10 +1106,10 @@ bool QgsDb2Provider::addFeatures( QgsFeatureList &flist, Flags flags )
11061106
query.bindValue( bindIdx, bytea, QSql::In | QSql::Binary );
11071107
}
11081108

1109-
QList<QVariant> list = query.boundValues().values();
1110-
11111109
// Show bound values
11121110
#if 0
1111+
QList<QVariant> list = query.boundValues().values();
1112+
11131113
for ( int i = 0; i < list.size(); ++i )
11141114
{
11151115
QgsDebugMsg( QString( "i: %1; value: %2; type: %3" )

src/providers/grass/qgsgrassimport.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,9 @@ bool QgsGrassVectorImport::import()
715715
QgsDebugMsg( "waitForFinished" );
716716
mProcess->waitForFinished( 30000 );
717717

718+
#ifdef QGISDEBUG
718719
QString stdoutString = mProcess->readAllStandardOutput().constData();
720+
#endif
719721
QString stderrString = mProcess->readAllStandardError().constData();
720722

721723
#ifdef QGISDEBUG

src/providers/wfs/qgswfsdataitems.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ void QgsWfsLayerItem::copyStyle()
8989

9090
if ( !connection )
9191
{
92+
#ifdef QGISDEBUG
9293
QString errorMsg( QStringLiteral( "Cannot get style for layer %1" ).arg( this->name() ) );
9394
QgsDebugMsg( " Cannot get style: " + errorMsg );
95+
#endif
9496
#if 0
9597
// TODO: how to emit message from provider (which does not know about QgisApp)
9698
QgisApp::instance()->messageBar()->pushMessage( tr( "Cannot copy style" ),
@@ -105,8 +107,10 @@ void QgsWfsLayerItem::copyStyle()
105107
QgsGeoNodeStyle style = geoNodeRequest.fetchDefaultStyleBlocking( this->name() );
106108
if ( style.name.isEmpty() )
107109
{
110+
#ifdef QGISDEBUG
108111
QString errorMsg( QStringLiteral( "Cannot get style for layer %1" ).arg( this->name() ) );
109112
QgsDebugMsg( " Cannot get style: " + errorMsg );
113+
#endif
110114
#if 0
111115
// TODO: how to emit message from provider (which does not know about QgisApp)
112116
QgisApp::instance()->messageBar()->pushMessage( tr( "Cannot copy style" ),

src/providers/wms/qgsxyzconnection.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ QStringList QgsXyzConnectionUtils::connectionList()
5454
{
5555
settings.beginGroup( "qgis/connections-xyz/" + s );
5656
bool isHidden = settings.value( QStringLiteral( "hidden" ), false ).toBool();
57-
QString url = settings.value( QStringLiteral( "url" ), "" ).toString();
5857
settings.endGroup();
5958
if ( isHidden )
6059
{

0 commit comments

Comments
 (0)