diff --git a/linphone-desktop/ui/modules/Common/Form/ComboBox.js b/linphone-desktop/ui/modules/Common/Form/ComboBox.js index d20fa966c..885863251 100644 --- a/linphone-desktop/ui/modules/Common/Form/ComboBox.js +++ b/linphone-desktop/ui/modules/Common/Form/ComboBox.js @@ -25,8 +25,3 @@ function getEntryIcon () { var iconRole = comboBox.iconRole return (iconRole.length && item.flattenedModel[iconRole]) || '' } - -function getFlattenedModel () { - return comboBox.textRole.length && - (typeof modelData !== 'undefined' ? modelData : model) -} diff --git a/linphone-desktop/ui/modules/Common/Form/ComboBox.qml b/linphone-desktop/ui/modules/Common/Form/ComboBox.qml index 5056ea81d..019a48018 100644 --- a/linphone-desktop/ui/modules/Common/Form/ComboBox.qml +++ b/linphone-desktop/ui/modules/Common/Form/ComboBox.qml @@ -74,7 +74,8 @@ ComboBox { delegate: ItemDelegate { id: item - readonly property var flattenedModel: Logic.getFlattenedModel() + readonly property var flattenedModel: comboBox.textRole.length && + (typeof modelData !== 'undefined' ? modelData : model) hoverEnabled: true width: comboBox.width