Skip to content

Commit

Permalink
[QgsQuick] Fix overlaped variable name with QT widget's variable
Browse files Browse the repository at this point in the history
Qt 5.14 introduced currentValue variable for combobox widget which clashes with qgsquick variable
  • Loading branch information
vsklencar authored and wonder-sk committed Apr 28, 2020
1 parent e89b728 commit 35576d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/quickgui/plugin/editor/qgsquickvaluemap.qml
Expand Up @@ -38,7 +38,7 @@ Item {
QgsQuick.EditorWidgetComboBox {
// Reversed to model's key-value map. It is used to find index according current value
property var reverseConfig: ({})
property var currentValue: value
property var currentEditorValue: value

comboStyle: customStyle.fields
textRole: 'display'
Expand Down Expand Up @@ -81,7 +81,7 @@ Item {
}

// Workaround to get a signal when the value has changed
onCurrentValueChanged: {
onCurrentEditorValueChanged: {
currentIndex = find(reverseConfig[value])
}

Expand Down
4 changes: 2 additions & 2 deletions src/quickgui/plugin/editor/qgsquickvaluerelation.qml
Expand Up @@ -37,7 +37,7 @@ Item {

QgsQuick.EditorWidgetComboBox {

property var currentValue: value
property var currentEditorValue: value

comboStyle: customStyle.fields
textRole: 'display'
Expand All @@ -58,7 +58,7 @@ Item {
}

// Called when the same form is used for a different feature
onCurrentValueChanged: {
onCurrentEditorValueChanged: {
currentIndex = vrModel.rowForKey(value);
}

Expand Down

0 comments on commit 35576d7

Please sign in to comment.