File tree 7 files changed +9
-15
lines changed
7 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,7 @@ class QgsAuxiliaryField : QgsField
46
46
:rtype: QgsPropertyDefinition
47
47
%End
48
48
49
-
50
- static QString name( const QgsPropertyDefinition &def, bool joined = false );
49
+ static QString nameFromProperty( const QgsPropertyDefinition &def, bool joined = false );
51
50
%Docstring
52
51
Returns the name of the auxiliary field for a property definition.
53
52
Original file line number Diff line number Diff line change @@ -1075,7 +1075,7 @@ void QgsDiagramProperties::createAuxiliaryField()
1075
1075
1076
1076
// update property with join field name from auxiliary storage
1077
1077
QgsProperty property = button->toProperty ();
1078
- property.setField ( QgsAuxiliaryField::name ( def, true ) );
1078
+ property.setField ( QgsAuxiliaryField::nameFromProperty ( def, true ) );
1079
1079
property.setActive ( true );
1080
1080
button->updateFieldLists ();
1081
1081
button->setToProperty ( property );
Original file line number Diff line number Diff line change @@ -645,7 +645,7 @@ void QgsLabelingGui::createAuxiliaryField()
645
645
646
646
// update property with join field name from auxiliary storage
647
647
QgsProperty property = button->toProperty ();
648
- property.setField ( QgsAuxiliaryField::name ( def, true ) );
648
+ property.setField ( QgsAuxiliaryField::nameFromProperty ( def, true ) );
649
649
property.setActive ( true );
650
650
button->updateFieldLists ();
651
651
button->setToProperty ( property );
Original file line number Diff line number Diff line change @@ -1645,7 +1645,7 @@ void QgsVectorLayerProperties::onAuxiliaryLayerDeleteField()
1645
1645
def.setOrigin ( item->text ( 0 ) );
1646
1646
def.setName ( item->text ( 1 ) );
1647
1647
1648
- const QString fieldName = QgsAuxiliaryField::name ( def );
1648
+ const QString fieldName = QgsAuxiliaryField::nameFromProperty ( def );
1649
1649
1650
1650
const int index = mLayer ->auxiliaryLayer ()->fields ().indexOf ( fieldName );
1651
1651
if ( index < 0 )
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ void QgsAuxiliaryField::init( const QgsPropertyDefinition &def )
107
107
}
108
108
109
109
setType ( type );
110
- setName ( name ( def ) );
110
+ setName ( nameFromProperty ( def ) );
111
111
setTypeName ( typeName );
112
112
setLength ( len );
113
113
setPrecision ( precision );
@@ -122,7 +122,7 @@ bool QgsAuxiliaryLayer::clear()
122
122
return rc;
123
123
}
124
124
125
- QString QgsAuxiliaryField::name ( const QgsPropertyDefinition &def, bool joined )
125
+ QString QgsAuxiliaryField::nameFromProperty ( const QgsPropertyDefinition &def, bool joined )
126
126
{
127
127
QString fieldName = QString ( " %2_%3" ).arg ( def.origin (), def.name ().toLower () );
128
128
@@ -194,7 +194,7 @@ QgsVectorLayerJoinInfo QgsAuxiliaryLayer::joinInfo() const
194
194
195
195
bool QgsAuxiliaryLayer::exists ( const QgsPropertyDefinition &definition ) const
196
196
{
197
- return ( fields ().indexOf ( QgsAuxiliaryField::name ( definition ) ) >= 0 );
197
+ return ( fields ().indexOf ( QgsAuxiliaryField::nameFromProperty ( definition ) ) >= 0 );
198
198
}
199
199
200
200
bool QgsAuxiliaryLayer::addAuxiliaryField ( const QgsPropertyDefinition &definition )
Original file line number Diff line number Diff line change @@ -60,18 +60,13 @@ class CORE_EXPORT QgsAuxiliaryField : public QgsField
60
60
*/
61
61
QgsPropertyDefinition propertyDefinition () const ;
62
62
63
- /* *
64
- * Returns the name of the field.
65
- */
66
- using QgsField::name SIP_SKIP;
67
-
68
63
/* *
69
64
* Returns the name of the auxiliary field for a property definition.
70
65
*
71
66
* \returns def The property definition
72
67
* \returns joined The join prefix is tok into account if true
73
68
*/
74
- static QString name ( const QgsPropertyDefinition &def, bool joined = false );
69
+ static QString nameFromProperty ( const QgsPropertyDefinition &def, bool joined = false );
75
70
76
71
private:
77
72
QgsAuxiliaryField ( const QgsField &f ); // only for auxiliary layer
Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ void QgsPropertyOverrideButton::aboutToShowMenu()
342
342
mActionCreateAuxiliaryField ->setChecked ( false );
343
343
if ( alayer && alayer->exists ( mDefinition ) )
344
344
{
345
- if ( mProperty .field () == QgsAuxiliaryField::name ( mDefinition , true ) )
345
+ if ( mProperty .field () == QgsAuxiliaryField::nameFromProperty ( mDefinition , true ) )
346
346
{
347
347
mActionCreateAuxiliaryField ->setEnabled ( false );
348
348
mActionCreateAuxiliaryField ->setChecked ( true );
You can’t perform that action at this time.
0 commit comments