MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / buildStableKeyToWindowId

Function buildStableKeyToWindowId

app/src/UI/WindowManager.cpp:91–101  ·  view source on GitHub ↗

* @brief Builds a (widgetType, relativeIndex) -> windowId map from the live * Dashboard widget map. */

Source from the content-addressed store, hash-verified

89 * Dashboard widget map.
90 */
91[[nodiscard]] static QHash<StableKey, int> buildStableKeyToWindowId()
92{
93 QHash<StableKey, int> out;
94 const auto& widgetMap = UI::Dashboard::instance().widgetMap();
95 out.reserve(widgetMap.size());
96 for (auto it = widgetMap.cbegin(); it != widgetMap.cend(); ++it) {
97 const StableKey key{static_cast<int>(it.value().first), it.value().second};
98 out.insert(key, it.key());
99 }
100 return out;
101}
102
103/**
104 * @brief Reads the stable key from a serialized geometry entry. Returns an

Callers 2

restoreLayoutMethod · 0.85

Calls 5

cbeginMethod · 0.80
cendMethod · 0.80
keyMethod · 0.80
sizeMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected