diff --git a/src/libs/utils/macroexpander.cpp b/src/libs/utils/macroexpander.cpp index c4edccbdd60..bee4a473c2b 100644 --- a/src/libs/utils/macroexpander.cpp +++ b/src/libs/utils/macroexpander.cpp @@ -108,7 +108,6 @@ public: QHash m_map; QHash m_prefixMap; - QSet m_invisbleInChooser; QVector m_extraResolvers; QMap m_descriptions; QString m_displayName; @@ -336,9 +335,8 @@ void MacroExpander::registerPrefix(const QByteArray &prefix, const QString &desc void MacroExpander::registerVariable(const QByteArray &variable, const QString &description, const StringFunction &value, bool visibleInChooser) { - if (!visibleInChooser) - d->m_invisbleInChooser.insert(variable); - d->m_descriptions.insert(variable, description); + if (visibleInChooser) + d->m_descriptions.insert(variable, description); d->m_map.insert(variable, value); } @@ -419,13 +417,7 @@ void MacroExpander::registerExtraResolver(const MacroExpander::ResolverFunction */ QList MacroExpander::visibleVariables() const { - QList res; - for (auto it = d->m_descriptions.begin(), end = d->m_descriptions.end(); it != end; ++it) { - if (!d->m_invisbleInChooser.contains(it.key())) - res.append(it.key()); - } - - return res; + return d->m_descriptions.keys(); } /*!