Skip to content

Commit

Permalink
Support empty enum name.
Browse files Browse the repository at this point in the history
  • Loading branch information
wengxt committed Apr 20, 2024
1 parent eaa3dcc commit 80e9d3f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/kcm/package/contents/ui/EnumOption.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ Row {
Component.onCompleted: {
var i = 0;
while (true) {
var value = properties["Enum"][i.toString()];
if (!value) {
if (!properties.hasOwnProperty("Enum")) {
break;
}
if (!properties["Enum"].hasOwnProperty(i.toString())) {
break;
}
var value = properties["Enum"][i.toString()];
var text = "";
if (properties.hasOwnProperty("EnumI18n")) {
if (properties["EnumI18n"].hasOwnProperty(i.toString())) {
Expand Down
7 changes: 5 additions & 2 deletions src/kcm/ui/EnumOption.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ Row {
Component.onCompleted: {
var i = 0;
while (true) {
var value = properties["Enum"][i.toString()];
if (!value) {
if (!properties.hasOwnProperty("Enum")) {
break;
}
if (!properties["Enum"].hasOwnProperty(i.toString())) {
break;
}
var value = properties["Enum"][i.toString()];
var text = "";
if (properties.hasOwnProperty("EnumI18n")) {
if (properties["EnumI18n"].hasOwnProperty(i.toString())) {
Expand Down

0 comments on commit 80e9d3f

Please sign in to comment.