Skip to content
Permalink
Browse files

Make the expression btn click event a private slot

  • Loading branch information
suricactus committed Sep 9, 2020
1 parent 54a4dd5 commit 58183595ce845e07d0e99ea84cec91a59c53a2cd
@@ -60,11 +60,11 @@ QgsRelationReferenceConfigDlg::QgsRelationReferenceConfigDlg( QgsVectorLayer *vl
connect( mFilterFieldsList, &QListWidget::itemChanged, this, &QgsEditorConfigWidget::changed );
connect( mCbxChainFilters, &QAbstractButton::toggled, this, &QgsEditorConfigWidget::changed );
connect( mExpressionWidget, static_cast<void ( QgsFieldExpressionWidget::* )( const QString & )>( &QgsFieldExpressionWidget::fieldChanged ), this, &QgsEditorConfigWidget::changed );
connect( mEditExpression, &QAbstractButton::clicked, this, &QgsRelationReferenceConfigDlg::editExpression );
connect( mEditExpression, &QAbstractButton::clicked, this, &QgsRelationReferenceConfigDlg::mEditExpression_clicked );
connect( mFilterExpression, &QTextEdit::textChanged, this, &QgsEditorConfigWidget::changed );
}

void QgsRelationReferenceConfigDlg::editExpression()
void QgsRelationReferenceConfigDlg::mEditExpression_clicked()
{
QgsVectorLayer *vl = qobject_cast<QgsVectorLayer *>( layer() );
if ( !vl )
@@ -39,13 +39,6 @@ class GUI_EXPORT QgsRelationReferenceConfigDlg : public QgsEditorConfigWidget, p
QVariantMap config() override;
void setConfig( const QVariantMap &config ) override;

public slots:

/**
* Opens an expression dialog and sets its value as filter expression for the relation reference.
*/
void editExpression();

private:
void loadFields();
void addFilterField( const QString &field );
@@ -58,6 +51,11 @@ class GUI_EXPORT QgsRelationReferenceConfigDlg : public QgsEditorConfigWidget, p
void relationChanged( int idx );
void mAddFilterButton_clicked();
void mRemoveFilterButton_clicked();

/**
* Opens an expression dialog and sets its value as filter expression for the relation reference.
*/
void mEditExpression_clicked();
};

#endif // QGSRELATIONREFERENCECONFIGDLGBASE_H

0 comments on commit 5818359

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