Skip to content
Permalink
Browse files

Remove QgsCRSCache

No longer required now that QgsCoordinateReferenceSystem
internally uses caches for CRS initialization.
  • Loading branch information
nyalldawson committed Jul 24, 2016
1 parent ac36cb5 commit bb36c6048d0a0d711b50613c2b5a062156a18284
Showing with 136 additions and 656 deletions.
  1. +3 −0 doc/api_break.dox
  2. +0 −78 python/core/qgscrscache.sip
  3. +1 −2 src/app/gps/qgsgpsinformationwidget.cpp
  4. +1 −2 src/app/gps/qgsgpsmarker.cpp
  5. +1 −2 src/app/ogr/qgsvectorlayersaveasdialog.cpp
  6. +2 −3 src/app/openstreetmap/qgsosmdownloaddialog.cpp
  7. +5 −6 src/app/qgisapp.cpp
  8. +1 −2 src/app/qgsbookmarks.cpp
  9. +2 −2 src/app/qgscustomprojectiondialog.cpp
  10. +1 −2 src/app/qgsdecorationnortharrow.cpp
  11. +2 −3 src/app/qgsnewspatialitelayerdialog.cpp
  12. +2 −3 src/app/qgsoptions.cpp
  13. +4 −5 src/app/qgsprojectproperties.cpp
  14. +1 −2 src/app/qgswelcomepageitemsmodel.cpp
  15. +1 −2 src/browser/qgsbrowser.cpp
  16. +1 −2 src/core/composer/qgscomposermap.cpp
  17. +0 −1 src/core/qgsapplication.cpp
  18. +3 −4 src/core/qgscoordinatereferencesystem.cpp
  19. +7 −8 src/core/qgscoordinatetransform.cpp
  20. +2 −162 src/core/qgscrscache.cpp
  21. +0 −89 src/core/qgscrscache.h
  22. +3 −4 src/core/qgsdistancearea.cpp
  23. +2 −3 src/core/qgsexpression.cpp
  24. +2 −3 src/core/qgsgml.cpp
  25. +0 −1 src/core/qgsmaprendererjob.cpp
  26. +1 −2 src/core/qgsmapsettings.cpp
  27. +2 −3 src/core/qgsogcutils.cpp
  28. +2 −3 src/gui/qgsmapcanvas.cpp
  29. +2 −3 src/gui/qgsnewgeopackagelayerdialog.cpp
  30. +1 −2 src/gui/qgsnewmemorylayerdialog.cpp
  31. +2 −3 src/gui/qgsnewvectorlayerdialog.cpp
  32. +3 −4 src/gui/qgsowssourceselect.cpp
  33. +6 −7 src/gui/qgsprojectionselectionwidget.cpp
  34. +2 −3 src/gui/qgssourceselectdialog.cpp
  35. +1 −2 src/plugins/georeferencer/qgstransformsettingsdialog.cpp
  36. +2 −2 src/plugins/globe/qgsglobetilesource.cpp
  37. +4 −5 src/plugins/grass/qgsgrassnewmapset.cpp
  38. +1 −2 src/providers/arcgisrest/qgsafsprovider.cpp
  39. +0 −1 src/providers/arcgisrest/qgsamsprovider.cpp
  40. +0 −1 src/providers/arcgisrest/qgsarcgisrestutils.cpp
  41. +1 −2 src/providers/db2/qgsdb2provider.cpp
  42. +3 −4 src/providers/gdal/qgsgdalprovider.cpp
  43. +2 −3 src/providers/grass/qgsgrass.cpp
  44. +2 −3 src/providers/mssql/qgsmssqlprovider.cpp
  45. +2 −3 src/providers/ogr/qgsogrprovider.cpp
  46. +1 −2 src/providers/postgres/qgspostgresprovider.cpp
  47. +2 −3 src/providers/spatialite/qgsspatialiteprovider.cpp
  48. +1 −2 src/providers/virtual/qgsvirtuallayersourceselect.cpp
  49. +1 −2 src/providers/wcs/qgswcscapabilities.cpp
  50. +1 −2 src/providers/wcs/qgswcsdataitems.cpp
  51. +4 −5 src/providers/wcs/qgswcsprovider.cpp
  52. +2 −3 src/providers/wfs/qgswfscapabilities.cpp
  53. +1 −2 src/providers/wfs/qgswfsfeatureiterator.cpp
  54. +4 −5 src/providers/wfs/qgswfsprovider.cpp
  55. +2 −3 src/providers/wfs/qgswfssourceselect.cpp
  56. +7 −8 src/providers/wms/qgswmscapabilities.cpp
  57. +1 −2 src/providers/wms/qgswmsdataitems.cpp
  58. +7 −8 src/providers/wms/qgswmsprovider.cpp
  59. +3 −4 src/providers/wms/qgswmssourceselect.cpp
  60. +2 −3 src/server/qgsconfigparserutils.cpp
  61. +1 −2 src/server/qgshostedrdsbuilder.cpp
  62. +1 −2 src/server/qgshostedvdsbuilder.cpp
  63. +1 −1 src/server/qgsmaprenderer.cpp
  64. +3 −4 src/server/qgsserverprojectparser.cpp
  65. +2 −3 src/server/qgssldconfigparser.cpp
  66. +2 −3 src/server/qgswcsserver.cpp
  67. +0 −1 src/server/qgswfsserver.cpp
  68. +1 −2 src/server/qgswmsserver.cpp
  69. +0 −1 tests/src/python/CMakeLists.txt
  70. +0 −2 tests/src/python/acceptable_missing_doc.py
  71. +0 −132 tests/src/python/test_qgscrscache.py
@@ -24,6 +24,9 @@ This page tries to maintain a list with incompatible changes that happened in pr
<li>QgsLabel and QgsLabelAttributes. Replaced by labeling based on PAL library, see QgsLabelingEngineV2.</li>
<li>QgsMapCanvasMap. It is an internal class used by map canvas.</li>
<li>QgsMapRenderer. It has been replaced by QgsMapRendererJob with subclasses and QgsMapSettings.</li>
<li>QgsCRSCache was removed. QgsCoordinateReferenceSystem now internally uses a cache for CRS creation,
so there is no longer a need for the separate cache class. Code which previously called QgsCRSCache::updateCRSCache()
should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinateTransformCache::instance()->invalidateCrs( authid ).</li>
</ul>

\subsection qgis_api_break_3_0_global General changes
@@ -25,81 +25,3 @@ class QgsCoordinateTransformCache
QgsCoordinateTransformCache( const QgsCoordinateTransformCache& rh );
};

/** \ingroup core
* \class QgsCrsCache
* \brief Caches QgsCoordinateReferenceSystem construction, which may be expensive.
*
* QgsCRSCache maintains a cache of previously constructed coordinate systems, so that
* creating a new CRS from the cache can reuse previously calculated parameters. The
* constructors for QgsCoordinateReferenceSystem can be expensive, so it's recommended
* to use QgsCRSCache instead of directly calling the QgsCoordinateReferenceSystem
* constructors.
*/

class QgsCrsCache
{
%TypeHeaderCode
#include <qgscrscache.h>
%End

public:

//! Returns a pointer to the QgsCRSCache singleton
static QgsCrsCache* instance();

/** Returns the CRS for authid, e.g. 'EPSG:4326' (or an invalid CRS in case of error)
* @deprecated use crsByOgcWmsCrs() instead
*/
QgsCoordinateReferenceSystem crsByAuthId( const QString& authid ) /Deprecated/;

/** Returns the CRS from a given OGC WMS-format Coordinate Reference System string.
* @param ogcCrs OGR compliant CRS definition, eg "EPSG:4326"
* @returns matching CRS, or an invalid CRS if string could not be matched
* @note added in QGIS 2.16
* @see QgsCoordinateReferenceSystem::createFromOgcWmsCrs()
*/
QgsCoordinateReferenceSystem crsByOgcWmsCrs( const QString& ogcCrs ) const;

/** Returns the CRS from a given EPSG ID.
* @param epsg epsg CRS ID
* @returns matching CRS, or an invalid CRS if string could not be matched
*/
QgsCoordinateReferenceSystem crsByEpsgId( long epsg ) const;

/** Returns the CRS from a proj4 style formatted string.
* @param proj4 proj4 format string
* @returns matching CRS, or an invalid CRS if string could not be matched
* @note added in QGIS 2.16
* @see QgsCoordinateReferenceSystem::createFromProj4()
*/
QgsCoordinateReferenceSystem crsByProj4( const QString& proj4 ) const;

/** Returns the CRS from a WKT spatial ref sys definition string.
* @param wkt WKT for the desired spatial reference system.
* @returns matching CRS, or an invalid CRS if string could not be matched
* @note added in QGIS 2.16
* @see QgsCoordinateReferenceSystem::createFromWkt()
*/
QgsCoordinateReferenceSystem crsByWkt( const QString& wkt ) const;

/** Returns the CRS from a specified QGIS SRS ID.
* @param srsId internal QGIS SRS ID
* @returns matching CRS, or an invalid CRS if ID could not be found
* @note added in QGIS 2.16
* @see QgsCoordinateReferenceSystem::createFromSrsId()
*/
QgsCoordinateReferenceSystem crsBySrsId( long srsId ) const;

/** Updates the cached definition of a CRS. Should be called if the definition of a user-created
* CRS has been changed.
* @param authid CRS auth ID, eg "EPSG:4326" or "USER:100009"
*/
void updateCrsCache( const QString& authid );

protected:
QgsCrsCache();

private:

QgsCrsCache( const QgsCrsCache& other );
};
@@ -35,7 +35,6 @@
#include "qgsvectordataprovider.h"
#include "qgsvectorlayer.h"
#include "qgswkbptr.h"
#include "qgscrscache.h"

// QWT Charting widget

@@ -229,7 +228,7 @@ QgsGPSInformationWidget::QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWi
radRecenterWhenNeeded->setChecked( true );
}

mWgs84CRS = QgsCrsCache::instance()->crsByOgcWmsCrs( "EPSG:4326" );
mWgs84CRS = QgsCoordinateReferenceSystem::fromOgcWmsCrs( "EPSG:4326" );

mBtnDebug->setVisible( mySettings.value( "/gps/showDebug", "false" ).toBool() ); // use a registry setting to control - power users/devs could set it

@@ -18,14 +18,13 @@
#include "qgsgpsmarker.h"
#include "qgscoordinatetransform.h"
#include "qgsmapcanvas.h"
#include "qgscrscache.h"
#include "qgscsexception.h"

QgsGpsMarker::QgsGpsMarker( QgsMapCanvas* mapCanvas )
: QgsMapCanvasItem( mapCanvas )
{
mSize = 16;
mWgs84CRS = QgsCrsCache::instance()->crsByOgcWmsCrs( "EPSG:4326" );
mWgs84CRS = QgsCoordinateReferenceSystem::fromOgcWmsCrs( "EPSG:4326" );
mSvg.load( QString( ":/images/north_arrows/gpsarrow2.svg" ) );
if ( ! mSvg.isValid() )
{
@@ -16,7 +16,6 @@
* *
***************************************************************************/
#include "qgslogger.h"
#include "qgscrscache.h"
#include "qgsvectorlayersaveasdialog.h"
#include "qgsgenericprojectionselector.h"
#include "qgsvectordataprovider.h"
@@ -102,7 +101,7 @@ void QgsVectorLayerSaveAsDialog::setup()
idx = 0;
}

QgsCoordinateReferenceSystem srs = QgsCrsCache::instance()->crsBySrsId( mCRS );
QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromSrsId( mCRS );
mCrsSelector->setCrs( srs );
mCrsSelector->setLayerCrs( srs );
mCrsSelector->dialog()->setMessage( tr( "Select the coordinate reference system for the vector file. "
@@ -21,7 +21,6 @@

#include "qgis.h"
#include "qgisapp.h"
#include "qgscrscache.h"
#include "qgsmapcanvas.h"
#include "qgsmaplayer.h"
#include "qgsmaplayerregistry.h"
@@ -104,7 +103,7 @@ void QgsOSMDownloadDialog::onExtentCanvas()

if ( QgisApp::instance()->mapCanvas()->hasCrsTransformEnabled() )
{
QgsCoordinateReferenceSystem dst = QgsCrsCache::instance()->crsBySrsId( GEOCRS_ID );
QgsCoordinateReferenceSystem dst = QgsCoordinateReferenceSystem::fromSrsId( GEOCRS_ID );

QgsCoordinateTransform ct( QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs(), dst );
r = ct.transformBoundingBox( r );
@@ -143,7 +142,7 @@ void QgsOSMDownloadDialog::onCurrentLayerChanged( int index )
if ( !layer )
return;

QgsCoordinateReferenceSystem dst = QgsCrsCache::instance()->crsBySrsId( GEOCRS_ID );
QgsCoordinateReferenceSystem dst = QgsCoordinateReferenceSystem::fromSrsId( GEOCRS_ID );

QgsCoordinateTransform ct( layer->crs(), dst );
QgsRectangle rect( ct.transformBoundingBox( layer->extent() ) );
@@ -127,7 +127,6 @@
#include "qgscoordinatetransform.h"
#include "qgscoordinateutils.h"
#include "qgscredentialdialog.h"
#include "qgscrscache.h"
#include "qgscursors.h"
#include "qgscustomization.h"
#include "qgscustomlayerorderwidget.h"
@@ -513,7 +512,7 @@ void QgisApp::validateCrs( QgsCoordinateReferenceSystem &srs )
if ( authid.isNull() )
authid = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid();

QgsCoordinateReferenceSystem defaultCrs = QgsCrsCache::instance()->crsByOgcWmsCrs( authid );
QgsCoordinateReferenceSystem defaultCrs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( authid );
if ( defaultCrs.isValid() )
{
mySelector->setSelectedCrsId( defaultCrs.srsid() );
@@ -4413,7 +4412,7 @@ void QgisApp::fileNew( bool thePromptToSaveFlag, bool forceBlank )

// set project CRS
QString defCrs = settings.value( "/Projections/projectDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString();
QgsCoordinateReferenceSystem srs = QgsCrsCache::instance()->crsByOgcWmsCrs( defCrs );
QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( defCrs );
mMapCanvas->setDestinationCrs( srs );
// write the projections _proj string_ to project settings
prj->writeEntry( "SpatialRefSys", "/ProjectCRSProj4String", srs.toProj4() );
@@ -6171,7 +6170,7 @@ void QgisApp::saveAsVectorFileGeneral( QgsVectorLayer* vlayer, bool symbologyOpt
QgsWKBTypes::Type forcedGeometryType = dialog->geometryType();

QgsCoordinateTransform ct;
destCRS = QgsCrsCache::instance()->crsBySrsId( dialog->crs() );
destCRS = QgsCoordinateReferenceSystem::fromSrsId( dialog->crs() );

if ( destCRS.isValid() && destCRS != vlayer->crs() )
{
@@ -8469,7 +8468,7 @@ void QgisApp::setLayerCrs()
return;
}

QgsCoordinateReferenceSystem crs = QgsCrsCache::instance()->crsBySrsId( mySelector.selectedCrsId() );
QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem::fromSrsId( mySelector.selectedCrsId() );

Q_FOREACH ( QgsLayerTreeNode* node, mLayerTreeView->selectedNodes() )
{
@@ -8626,7 +8625,7 @@ void QgisApp::legendGroupSetCrs()
return;
}

QgsCoordinateReferenceSystem crs = QgsCrsCache::instance()->crsBySrsId( mySelector.selectedCrsId() );
QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem::fromSrsId( mySelector.selectedCrsId() );
Q_FOREACH ( QgsLayerTreeLayer* nodeLayer, currentGroup->findLayers() )
{
if ( nodeLayer->layer() )
@@ -21,7 +21,6 @@
#include "qgsmapcanvas.h"
#include "qgsproject.h"
#include "qgsmessagelog.h"
#include "qgscrscache.h"

#include "qgslogger.h"

@@ -232,7 +231,7 @@ void QgsBookmarks::zoomToBookmark()
if ( srid > 0 &&
srid != QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().srsid() )
{
QgsCoordinateTransform ct( QgsCrsCache::instance()->crsBySrsId( srid ),
QgsCoordinateTransform ct( QgsCoordinateReferenceSystem::fromSrsId( srid ),
QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs() );
rect = ct.transform( rect );
if ( rect.isEmpty() )
@@ -166,8 +166,8 @@ bool QgsCustomProjectionDialog::deleteCrs( const QString& id )
}
sqlite3_close( myDatabase );

QgsCrsCache::instance()->updateCrsCache( QString( "USER:%1" ).arg( id ) );
QgsCoordinateReferenceSystem::invalidateCache();
QgsCoordinateTransformCache::instance()->invalidateCrs( QString( "USER:%1" ).arg( id ) );

return myResult == SQLITE_OK;
}
@@ -292,8 +292,8 @@ bool QgsCustomProjectionDialog::saveCrs( QgsCoordinateReferenceSystem myCRS, con
existingCRSparameters[myId] = myCRS.toProj4();
existingCRSnames[myId] = myName;

QgsCrsCache::instance()->updateCrsCache( QString( "USER:%1" ).arg( myId ) );
QgsCoordinateReferenceSystem::invalidateCache();
QgsCoordinateTransformCache::instance()->invalidateCrs( QString( "USER:%1" ).arg( myId ) );

// If we have a projection acronym not in the user db previously, add it.
// This is a must, or else we can't select it from the vw_srs table.
@@ -30,7 +30,6 @@ email : tim@linfiniti.com
#include "qgsproject.h"
#include "qgslogger.h"
#include "qgsmapcanvas.h"
#include "qgscrscache.h"
#include "qgscsexception.h"

// qt includes
@@ -231,7 +230,7 @@ bool QgsDecorationNorthArrow::calculateNorthDirection()
if ( outputCRS.isValid() && !outputCRS.isGeographic() )
{
// Use a geographic CRS to get lat/long to work out direction
QgsCoordinateReferenceSystem ourCRS = QgsCrsCache::instance()->crsByOgcWmsCrs( GEO_EPSG_CRS_AUTHID );
QgsCoordinateReferenceSystem ourCRS = QgsCoordinateReferenceSystem::fromOgcWmsCrs( GEO_EPSG_CRS_AUTHID );
assert( ourCRS.isValid() );

QgsCoordinateTransform transform( outputCRS, ourCRS );
@@ -29,7 +29,6 @@
#include "qgscoordinatereferencesystem.h"
#include "qgsgenericprojectionselector.h"
#include "qgsslconnect.h"
#include "qgscrscache.h"

#include "qgslogger.h"

@@ -75,7 +74,7 @@ QgsNewSpatialiteLayerDialog::QgsNewSpatialiteLayerDialog( QWidget *parent, Qt::W
mOkButton->setEnabled( false );

// Set the SRID box to a default of WGS84
QgsCoordinateReferenceSystem srs = QgsCrsCache::instance()->crsByOgcWmsCrs( settings.value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString() );
QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( settings.value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString() );
srs.validate();
mCrsId = srs.authid();
leSRID->setText( srs.authid() + " - " + srs.description() );
@@ -244,7 +243,7 @@ void QgsNewSpatialiteLayerDialog::on_pbnFindSRID_clicked()

if ( mySelector->exec() )
{
QgsCoordinateReferenceSystem srs = QgsCrsCache::instance()->crsByOgcWmsCrs( mySelector->selectedAuthId() );
QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( mySelector->selectedAuthId() );
QString crsId = srs.authid();
if ( crsId != mCrsId )
{
@@ -30,7 +30,6 @@
#include "qgsnetworkaccessmanager.h"
#include "qgsproject.h"
#include "qgsdualview.h"
#include "qgscrscache.h"
#include "qgsrasterlayer.h"

#include "qgsattributetablefiltermodel.h"
@@ -387,7 +386,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl )
radUseGlobalProjection->setChecked( true );
}
QString myLayerDefaultCrs = mSettings->value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString();
mLayerDefaultCrs = QgsCrsCache::instance()->crsByOgcWmsCrs( myLayerDefaultCrs );
mLayerDefaultCrs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( myLayerDefaultCrs );
leLayerGlobalCrs->setCrs( mLayerDefaultCrs );

//on the fly CRS transformation settings
@@ -406,7 +405,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl )
}

QString myDefaultCrs = mSettings->value( "/Projections/projectDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString();
mDefaultCrs = QgsCrsCache::instance()->crsByOgcWmsCrs( myDefaultCrs );
mDefaultCrs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( myDefaultCrs );
leProjectGlobalCrs->setCrs( mDefaultCrs );
leProjectGlobalCrs->setOptionVisible( QgsProjectionSelectionWidget::DefaultCrs, false );

@@ -25,7 +25,6 @@
#include "qgscomposer.h"
#include "qgscontexthelp.h"
#include "qgscoordinatetransform.h"
#include "qgscrscache.h"
#include "qgslogger.h"
#include "qgsmapcanvas.h"
#include "qgsmaplayer.h"
@@ -129,7 +128,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
// slot triggered by setChecked() might use it.
mProjectSrsId = mMapCanvas->mapSettings().destinationCrs().srsid();

QgsCoordinateReferenceSystem srs = QgsCrsCache::instance()->crsBySrsId( mProjectSrsId );
QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromSrsId( mProjectSrsId );
updateGuiForMapUnits( srs.mapUnits() );

QgsDebugMsg( "Read project CRSID: " + QString::number( mProjectSrsId ) );
@@ -774,7 +773,7 @@ void QgsProjectProperties::apply()
long myCRSID = projectionSelector->selectedCrsId();
if ( myCRSID )
{
QgsCoordinateReferenceSystem srs = QgsCrsCache::instance()->crsBySrsId( myCRSID );
QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromSrsId( myCRSID );
mMapCanvas->setDestinationCrs( srs );
QgsDebugMsg( QString( "Selected CRS " ) + srs.description() );
// write the currently selected projections _proj string_ to project settings
@@ -1303,7 +1302,7 @@ void QgsProjectProperties::srIdUpdated()
if ( !isProjected() || !myCRSID )
return;

QgsCoordinateReferenceSystem srs = QgsCrsCache::instance()->crsBySrsId( myCRSID );
QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromSrsId( myCRSID );
//set radio button to crs map unit type
Qgis::UnitType units = srs.mapUnits();

@@ -1396,7 +1395,7 @@ void QgsProjectProperties::on_pbnWMSSetUsedSRS_clicked()

if ( cbxProjectionEnabled->isChecked() )
{
QgsCoordinateReferenceSystem srs = QgsCrsCache::instance()->crsBySrsId( projectionSelector->selectedCrsId() );
QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromSrsId( projectionSelector->selectedCrsId() );
crsList << srs.authid();
}

@@ -16,7 +16,6 @@
#include "qgswelcomepageitemsmodel.h"
#include "qgscoordinatereferencesystem.h"
#include "qgsmessagelog.h"
#include "qgscrscache.h"

#include <QApplication>
#include <QAbstractTextDocumentLayout>
@@ -150,7 +149,7 @@ QVariant QgsWelcomePageItemsModel::data( const QModelIndex& index, int role ) co
case CrsRole:
if ( mRecentProjects.at( index.row() ).crs != "" )
{
QgsCoordinateReferenceSystem crs = QgsCrsCache::instance()->crsByOgcWmsCrs( mRecentProjects.at( index.row() ).crs );
QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( mRecentProjects.at( index.row() ).crs );
return QString( "%1 (%2)" ).arg( mRecentProjects.at( index.row() ).crs, crs.description() );
}
else

0 comments on commit bb36c60

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