Skip to content

Commit

Permalink
Validation hint shouldn't be shared
Browse files Browse the repository at this point in the history
(cherry picked from commit b01f0ec2d1ddd0614f0ac7032133439c979fc32e)
  • Loading branch information
nyalldawson committed Jan 22, 2020
1 parent 934b767 commit d5eb523
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/core/qgscoordinatereferencesystem.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -126,12 +126,14 @@ QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const long id, CrsTy


QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const QgsCoordinateReferenceSystem &srs ) //NOLINT QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const QgsCoordinateReferenceSystem &srs ) //NOLINT
: d( srs.d ) : d( srs.d )
, mValidationHint( srs.mValidationHint )
{ {
} }


QgsCoordinateReferenceSystem &QgsCoordinateReferenceSystem::operator=( const QgsCoordinateReferenceSystem &srs ) //NOLINT QgsCoordinateReferenceSystem &QgsCoordinateReferenceSystem::operator=( const QgsCoordinateReferenceSystem &srs ) //NOLINT
{ {
d = srs.d; d = srs.d;
mValidationHint = srs.mValidationHint;
return *this; return *this;
} }


Expand Down Expand Up @@ -2235,13 +2237,12 @@ void QgsCoordinateReferenceSystem::debugPrint()


void QgsCoordinateReferenceSystem::setValidationHint( const QString &html ) void QgsCoordinateReferenceSystem::setValidationHint( const QString &html )
{ {
d.detach(); mValidationHint = html;
d->mValidationHint = html;
} }


QString QgsCoordinateReferenceSystem::validationHint() QString QgsCoordinateReferenceSystem::validationHint()
{ {
return d->mValidationHint; return mValidationHint;
} }


/// Copied from QgsCustomProjectionDialog /// /// Copied from QgsCustomProjectionDialog ///
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgscoordinatereferencesystem.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -960,6 +960,8 @@ class CORE_EXPORT QgsCoordinateReferenceSystem


QExplicitlySharedDataPointer<QgsCoordinateReferenceSystemPrivate> d; QExplicitlySharedDataPointer<QgsCoordinateReferenceSystemPrivate> d;


QString mValidationHint;

#if PROJ_VERSION_MAJOR>=6 #if PROJ_VERSION_MAJOR>=6
friend class QgsProjContext; friend class QgsProjContext;


Expand Down
1 change: 0 additions & 1 deletion src/core/qgscoordinatereferencesystem_p.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
OGRSpatialReferenceH mCRS; OGRSpatialReferenceH mCRS;
#endif #endif


QString mValidationHint;
mutable QString mProj4; mutable QString mProj4;


//! True if presence of an inverted axis needs to be recalculated //! True if presence of an inverted axis needs to be recalculated
Expand Down

0 comments on commit d5eb523

Please sign in to comment.