| 48 | constexpr QLatin1String userStyleNamePrefix("User", 4); |
| 49 | |
| 50 | void updateLabel(QLabel& label, const QString& text) |
| 51 | { |
| 52 | if (text.isEmpty()) { |
| 53 | label.hide(); // save UI space |
| 54 | } else { |
| 55 | label.setText(text); |
| 56 | label.show(); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // std::map is chosen for iterator and reference stability relied upon by code in this file. |
| 61 | // Besides, std::map's interface is convenient for searching by name and iterating in order. |
no test coverage detected