| 114 | } |
| 115 | |
| 116 | void WidgetContainer::setProperty(std::string_view _key, std::string_view _value, bool _eraseExist) |
| 117 | { |
| 118 | bool found = false; |
| 119 | |
| 120 | if (_eraseExist) |
| 121 | { |
| 122 | for (auto& item : mProperty) |
| 123 | { |
| 124 | if (item.first == _key) |
| 125 | { |
| 126 | found = true; |
| 127 | item.second = _value; |
| 128 | break; |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | if (!found) |
| 134 | mProperty.emplace_back(_key, _value); |
| 135 | } |
| 136 | |
| 137 | std::string_view WidgetContainer::getProperty(std::string_view _key) |
| 138 | { |
no outgoing calls
no test coverage detected