@@ -283,9 +283,9 @@ void QgsCoordinateTransformContext::readSettings()
283
283
d->mDestDatumTransforms.clear();
284
284
#endif
285
285
286
- QgsSettings * settings = new QgsSettings () ;
287
- settings-> beginGroup ( QStringLiteral ( " /Projections" ) );
288
- QStringList projectionKeys = settings-> allKeys ();
286
+ QgsSettings settings;
287
+ settings. beginGroup ( QStringLiteral ( " /Projections" ) );
288
+ QStringList projectionKeys = settings. allKeys ();
289
289
290
290
// collect src and dest entries that belong together
291
291
QMap< QPair< QString, QString >, QPair< int , int > > transforms;
@@ -307,11 +307,11 @@ void QgsCoordinateTransformContext::readSettings()
307
307
308
308
if ( pkeyIt->contains ( QLatin1String ( " srcTransform" ) ) )
309
309
{
310
- transforms[ qMakePair ( srcAuthId, destAuthId )].first = settings-> value ( *pkeyIt ).toInt ();
310
+ transforms[ qMakePair ( srcAuthId, destAuthId )].first = settings. value ( *pkeyIt ).toInt ();
311
311
}
312
312
else if ( pkeyIt->contains ( QLatin1String ( " destTransform" ) ) )
313
313
{
314
- transforms[ qMakePair ( srcAuthId, destAuthId )].second = settings-> value ( *pkeyIt ).toInt ();
314
+ transforms[ qMakePair ( srcAuthId, destAuthId )].second = settings. value ( *pkeyIt ).toInt ();
315
315
}
316
316
}
317
317
}
@@ -324,20 +324,20 @@ void QgsCoordinateTransformContext::readSettings()
324
324
}
325
325
326
326
d->mLock .unlock ();
327
- settings-> endGroup ();
327
+ settings. endGroup ();
328
328
}
329
329
330
330
void QgsCoordinateTransformContext::writeSettings ()
331
331
{
332
- QgsSettings * settings = new QgsSettings () ;
333
- settings-> beginGroup ( QStringLiteral ( " /Projections" ) );
334
- QStringList groupKeys = settings-> allKeys ();
332
+ QgsSettings settings;
333
+ settings. beginGroup ( QStringLiteral ( " /Projections" ) );
334
+ QStringList groupKeys = settings. allKeys ();
335
335
QStringList::const_iterator groupKeyIt = groupKeys.constBegin ();
336
336
for ( ; groupKeyIt != groupKeys.constEnd (); ++groupKeyIt )
337
337
{
338
338
if ( groupKeyIt->contains ( QLatin1String ( " srcTransform" ) ) || groupKeyIt->contains ( QLatin1String ( " destTransform" ) ) )
339
339
{
340
- settings-> remove ( *groupKeyIt );
340
+ settings. remove ( *groupKeyIt );
341
341
}
342
342
}
343
343
@@ -348,9 +348,9 @@ void QgsCoordinateTransformContext::writeSettings()
348
348
int sourceDatumTransform = transformIt.value ().sourceTransformId ;
349
349
int destinationDatumTransform = transformIt.value ().destinationTransformId ;
350
350
351
- settings-> setValue ( srcAuthId + " //" + destAuthId + " _srcTransform" , sourceDatumTransform );
352
- settings-> setValue ( srcAuthId + " //" + destAuthId + " _destTransform" , destinationDatumTransform );
351
+ settings. setValue ( srcAuthId + " //" + destAuthId + " _srcTransform" , sourceDatumTransform );
352
+ settings. setValue ( srcAuthId + " //" + destAuthId + " _destTransform" , destinationDatumTransform );
353
353
}
354
354
355
- settings-> endGroup ();
355
+ settings. endGroup ();
356
356
}
0 commit comments