| 1932 | } |
| 1933 | |
| 1934 | QStringList ThemeManager::containerPaths() const |
| 1935 | { |
| 1936 | QStringList out; |
| 1937 | out.reserve(m_scopeByPath.size()); |
| 1938 | std::function<void(const ThemeScope*)> walk = [&](const ThemeScope* s) { |
| 1939 | if (s == m_rootScope.get()) { |
| 1940 | out.append(QString()); |
| 1941 | } else { |
| 1942 | out.append(s->path); |
| 1943 | } |
| 1944 | // Deterministic alphabetical order at each level. |
| 1945 | // std::map iterates in key order already — pass children |
| 1946 | // through directly. |
| 1947 | for (auto& kv : s->children) walk(kv.second.get()); |
| 1948 | }; |
| 1949 | walk(m_rootScope.get()); |
| 1950 | return out; |
| 1951 | } |
| 1952 | |
| 1953 | QColor ThemeManager::color(const QWidget* widget, const QString& token) const |
| 1954 | { |