From fc101bd878ca36a81bcbbae7c5e75523ad35b2aa Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Wed, 15 Mar 2017 10:19:23 +0100 Subject: [PATCH] feat(ui/modules/Common/Form/ComboBox): remove `getFlattenedModel` function --- linphone-desktop/ui/modules/Common/Form/ComboBox.js | 5 ----- linphone-desktop/ui/modules/Common/Form/ComboBox.qml | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) 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