diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp index e766a64835..a62c6862b4 100644 --- a/utils/themeeditor/gui/devicestate.cpp +++ b/utils/themeeditor/gui/devicestate.cpp @@ -362,8 +362,17 @@ QVariant DeviceState::data(QString tag, int paramCount, } else if(tag == "ca") { - QString day = data("cw").toString(); - return day.left(3); + switch(data("cw").toInt()) + { + case 0: return "Sun"; + case 1: return "Mon"; + case 2: return "Tue"; + case 3: return "Wed"; + case 4: return "Thu"; + case 5: return "Fri"; + case 6: return "Sat"; + case 7: return tr("Error, invalid weekday number"); + } } else if(tag == "cb") {