Skip to content

Commit 456ca00

Browse files
committedSep 6, 2017
Rename methods
1 parent 76b2b8e commit 456ca00

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed
 

‎python/core/qgsproject.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ Returns the number of registered layers.
785785
:rtype: QgsCoordinateReferenceSystem
786786
%End
787787

788-
void setTrust( bool trust );
788+
void setTrustLayerMetadata( bool trust );
789789
%Docstring
790790
Sets the trust option allowing to indicate if the extent has to be
791791
read from the XML document when data source has no metadata or if the
@@ -798,7 +798,7 @@ Returns the number of registered layers.
798798
.. versionadded:: 3.0
799799
%End
800800

801-
bool trust() const;
801+
bool trustLayerMetadata() const;
802802
%Docstring
803803
Returns true if the trust option is activated, false otherwise. This
804804
option allows indicateing if the extent has to be read from the XML

‎src/app/qgsprojectproperties.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
708708

709709
mAutoTransaction->setChecked( QgsProject::instance()->autoTransaction() );
710710
mEvaluateDefaultValues->setChecked( QgsProject::instance()->evaluateDefaultValues() );
711-
mTrustProjectCheckBox->setChecked( QgsProject::instance()->trust() );
711+
mTrustProjectCheckBox->setChecked( QgsProject::instance()->trustLayerMetadata() );
712712

713713
// Variables editor
714714
mVariableEditor->context()->appendScope( QgsExpressionContextUtils::globalScope() );
@@ -765,7 +765,7 @@ void QgsProjectProperties::apply()
765765
QgsProject::instance()->setTitle( title() );
766766
QgsProject::instance()->setAutoTransaction( mAutoTransaction->isChecked() );
767767
QgsProject::instance()->setEvaluateDefaultValues( mEvaluateDefaultValues->isChecked() );
768-
QgsProject::instance()->setTrust( mTrustProjectCheckBox->isChecked() );
768+
QgsProject::instance()->setTrustLayerMetadata( mTrustProjectCheckBox->isChecked() );
769769

770770
// set the mouse display precision method and the
771771
// number of decimal places for the manual option

‎src/core/qgsproject.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ void QgsProject::clear()
480480
mAutoTransaction = false;
481481
mEvaluateDefaultValues = false;
482482
mDirty = false;
483-
mTrust = false;
483+
mTrustLayerMetadata = false;
484484
mCustomVariables.clear();
485485

486486
mEmbeddedLayers.clear();
@@ -722,7 +722,7 @@ bool QgsProject::addLayer( const QDomElement &layerElem, QList<QDomNode> &broken
722722
// apply specific settings to vector layer
723723
if ( QgsVectorLayer *vl = qobject_cast<QgsVectorLayer *>( mapLayer ) )
724724
{
725-
vl->setReadExtentFromXml( mTrust );
725+
vl->setReadExtentFromXml( mTrustLayerMetadata );
726726
}
727727
}
728728
else if ( type == QLatin1String( "raster" ) )
@@ -904,7 +904,7 @@ bool QgsProject::readProjectFile( const QString &filename )
904904
{
905905
QDomElement trustElement = nl.at( 0 ).toElement();
906906
if ( trustElement.attribute( QStringLiteral( "active" ), QStringLiteral( "0" ) ).toInt() == 1 )
907-
mTrust = true;
907+
mTrustLayerMetadata = true;
908908
}
909909

910910
// read the layer tree from project file
@@ -1312,7 +1312,7 @@ bool QgsProject::writeProjectFile( const QString &filename )
13121312
qgisNode.appendChild( evaluateDefaultValuesNode );
13131313

13141314
QDomElement trustNode = doc->createElement( QStringLiteral( "trust" ) );
1315-
trustNode.setAttribute( QStringLiteral( "active" ), mTrust ? "1" : "0" );
1315+
trustNode.setAttribute( QStringLiteral( "active" ), mTrustLayerMetadata ? "1" : "0" );
13161316
qgisNode.appendChild( trustNode );
13171317

13181318
QDomText titleText = doc->createTextNode( title() ); // XXX why have title TWICE?
@@ -2280,9 +2280,9 @@ QgsCoordinateReferenceSystem QgsProject::defaultCrsForNewLayers() const
22802280
return defaultCrs;
22812281
}
22822282

2283-
void QgsProject::setTrust( bool trust )
2283+
void QgsProject::setTrustLayerMetadata( bool trust )
22842284
{
2285-
mTrust = trust;
2285+
mTrustLayerMetadata = trust;
22862286

22872287
Q_FOREACH ( QgsMapLayer *layer, mapLayers().values() )
22882288
{

‎src/core/qgsproject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
766766
*
767767
* \since QGIS 3.0
768768
*/
769-
void setTrust( bool trust );
769+
void setTrustLayerMetadata( bool trust );
770770

771771
/**
772772
* Returns true if the trust option is activated, false otherwise. This
@@ -778,7 +778,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
778778
*
779779
* \since QGIS 3.0
780780
*/
781-
bool trust() const { return mTrust; }
781+
bool trustLayerMetadata() const { return mTrustLayerMetadata; }
782782

783783
signals:
784784
//! emitted when project is being read
@@ -1107,7 +1107,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
11071107
bool mEvaluateDefaultValues; // evaluate default values immediately
11081108
QgsCoordinateReferenceSystem mCrs;
11091109
bool mDirty; // project has been modified since it has been read or saved
1110-
bool mTrust = false;
1110+
bool mTrustLayerMetadata = false;
11111111
};
11121112

11131113
/** Return the version string found in the given DOM document

0 commit comments

Comments
 (0)
Please sign in to comment.