CMake: Hide INTERNAL and STATIC configuration entries in Project UI

Task-number: QTCREATORBUG-18403
Change-Id: I6b69305ff0dc337da1d8b20e0321be5ce1b1f595
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2017-06-20 12:07:07 +02:00
parent 4dc3ef8034
commit 7e81d330d9
3 changed files with 11 additions and 3 deletions

View File

@@ -257,7 +257,9 @@ void ConfigModel::setConfiguration(const QList<ConfigModel::DataItem> &config)
QList<InternalDataItem> result;
while (newIt != newEndIt && oldIt != oldEndIt) {
if (newIt->key < oldIt->key) {
if (newIt->isHidden) {
++newIt;
} else if (newIt->key < oldIt->key) {
// Add new entry:
result << InternalDataItem(*newIt);
++newIt;
@@ -279,8 +281,11 @@ void ConfigModel::setConfiguration(const QList<ConfigModel::DataItem> &config)
}
// Add remaining new entries:
for (; newIt != newEndIt; ++newIt)
for (; newIt != newEndIt; ++newIt) {
if (newIt->isHidden)
continue;
result << InternalDataItem(*newIt);
}
beginResetModel();
m_configuration = result;