From: APTX Date: Mon, 21 Feb 2022 14:50:36 +0000 (+0900) Subject: String properties can not be null X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=08f89a594ea9066ab9a75e99f0020dcef5f8b458;p=aniplayer.git String properties can not be null --- diff --git a/uiplugins/ui_desktop_qml_default/qml/ComboButton.qml b/uiplugins/ui_desktop_qml_default/qml/ComboButton.qml index 61f929b..185a637 100644 --- a/uiplugins/ui_desktop_qml_default/qml/ComboButton.qml +++ b/uiplugins/ui_desktop_qml_default/qml/ComboButton.qml @@ -3,7 +3,7 @@ import QtQuick 2.0 BasicButton { property var model: null property int currentIndex: 0 - property string textRole: null + property string textRole: "" signal activated(int index) @@ -15,7 +15,7 @@ BasicButton { text: { if (!model) return "-"; - if (textRole) return model.data(model.index(currentIndex, 0), textRole); + if (textRole.length) return model.data(model.index(currentIndex, 0), textRole); if (currentIndex) return "-"; return (currentIndex - 1); }