Skip to content

Commit 7c0d3b5

Browse files
committedMay 14, 2020
const of QgsProperty and some styling
1 parent 8824d06 commit 7c0d3b5

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed
 

‎python/core/auto_generated/qgsproject.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ implying a hierarchy of keys and corresponding values
430430
int readNumEntry( const QString &scope, const QString &key, int def = 0, bool *ok = 0 ) const;
431431
double readDoubleEntry( const QString &scope, const QString &key, double def = 0, bool *ok = 0 ) const;
432432
bool readBoolEntry( const QString &scope, const QString &key, bool def = false, bool *ok = 0 ) const;
433-
QgsProperty readPropertyEntry( const QString &scope, const QString &key, QgsProperty def = QgsProperty(), bool *ok = 0 ) const;
433+
QgsProperty readPropertyEntry( const QString &scope, const QString &key, const QgsProperty &def = QgsProperty(), bool *ok = 0 ) const;
434434

435435

436436
bool removeEntry( const QString &scope, const QString &key );

‎src/core/qgsproject.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2488,20 +2488,20 @@ bool QgsProject::readBoolEntry( const QString &scope, const QString &key, bool d
24882488
return def;
24892489
}
24902490

2491-
QgsProperty QgsProject::readPropertyEntry( const QString &scope, const QString &key, QgsProperty def, bool *ok ) const
2491+
QgsProperty QgsProject::readPropertyEntry( const QString &scope, const QString &key, const QgsProperty &def, bool *ok ) const
24922492
{
24932493
QgsProjectProperty *property = findKey_( scope, key, mProperties );
24942494

24952495
if ( property )
24962496
{
2497-
QgsProperty qgsproperty;
2497+
QgsProperty propertyValue;
24982498
QVariant value = property->value();
2499-
bool loaded = qgsproperty.loadVariant( value );
2499+
bool loaded = propertyValue.loadVariant( value );
25002500
if ( ok )
25012501
*ok = loaded;
25022502

25032503
if ( loaded )
2504-
return qgsproperty;
2504+
return propertyValue;
25052505
}
25062506

25072507
return def;

‎src/core/qgsproject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
445445
int readNumEntry( const QString &scope, const QString &key, int def = 0, bool *ok = nullptr ) const;
446446
double readDoubleEntry( const QString &scope, const QString &key, double def = 0, bool *ok = nullptr ) const;
447447
bool readBoolEntry( const QString &scope, const QString &key, bool def = false, bool *ok = nullptr ) const;
448-
QgsProperty readPropertyEntry( const QString &scope, const QString &key, QgsProperty def = QgsProperty(), bool *ok = nullptr ) const;
448+
QgsProperty readPropertyEntry( const QString &scope, const QString &key, const QgsProperty &def = QgsProperty(), bool *ok = nullptr ) const;
449449

450450

451451
//! Remove the given key

‎src/core/qgsprojectproperty.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ bool QgsProjectPropertyValue::readXml( const QDomNode &keyNode )
8888
return false;
8989

9090
case QVariant::Map:
91-
//it's a property
9291
mValue = QgsXmlUtils::readVariant( subkeyElement.firstChild().toElement() ).toMap();
9392
break;
9493

0 commit comments

Comments
 (0)
Please sign in to comment.