Skip to content

Commit

Permalink
First steps towards expression context
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 21, 2018
1 parent 7af13f6 commit 5cf0433
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/gui/processing/qgsprocessingmodelerparameterwidget.cpp
Expand Up @@ -81,6 +81,7 @@ QgsProcessingModelerParameterWidget::QgsProcessingModelerParameterWidget( QgsPro
}

mExpressionWidget = new QgsExpressionLineEdit();
mExpressionWidget->registerExpressionContextGenerator( this );
mStackedWidget->addWidget( mExpressionWidget );

mModelInputCombo = new QComboBox();
Expand Down Expand Up @@ -169,6 +170,11 @@ QgsProcessingModelChildParameterSource QgsProcessingModelerParameterWidget::valu
return QgsProcessingModelChildParameterSource();
}

QgsExpressionContext QgsProcessingModelerParameterWidget::createExpressionContext() const
{
return QgsExpressionContext();
}

void QgsProcessingModelerParameterWidget::sourceMenuAboutToShow()
{
mSourceMenu->clear();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/processing/qgsprocessingmodelerparameterwidget.h
Expand Up @@ -56,7 +56,7 @@ class QComboBox;
* \ingroup gui
* \since QGIS 3.4
*/
class GUI_EXPORT QgsProcessingModelerParameterWidget : public QWidget
class GUI_EXPORT QgsProcessingModelerParameterWidget : public QWidget, public QgsExpressionContextGenerator
{
Q_OBJECT

Expand Down

0 comments on commit 5cf0433

Please sign in to comment.