MCPcopy Create free account
hub / github.com/KDE/kdevelop / updateLabel

Function updateLabel

kdevplatform/shell/sourceformatterselectionedit.cpp:50–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48constexpr QLatin1String userStyleNamePrefix("User", 4);
49
50void 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.

Callers 2

updatePreviewMethod · 0.85

Calls 3

showMethod · 0.80
isEmptyMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected