forked from qt-creator/qt-creator
C++: Add child items to ModelItemInfo.
Change-Id: I849e0819a54dc8d6c49675c78d6668daf5c40af4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -125,10 +125,8 @@ public:
|
||||
break;
|
||||
if (m_fileNames.isEmpty() || m_fileNames.contains(it.value()->fileName())) {
|
||||
QVector<Core::SearchResultItem> resultItems;
|
||||
QList<ModelItemInfo::Ptr> modelInfos = search(it.value());
|
||||
foreach (const ModelItemInfo::Ptr &info, modelInfos) {
|
||||
int index = matcher.indexIn(info->symbolName());
|
||||
if (index != -1) {
|
||||
search(it.value())->visitAllChildren([&](const ModelItemInfo::Ptr &info) {
|
||||
if (matcher.indexIn(info->symbolName()) != -1) {
|
||||
QString text = info->symbolName();
|
||||
QString scope = info->symbolScope();
|
||||
if (info->type() == ModelItemInfo::Function) {
|
||||
@@ -150,7 +148,7 @@ public:
|
||||
item.userData = qVariantFromValue(info);
|
||||
resultItems << item;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!resultItems.isEmpty())
|
||||
future.reportResults(resultItems);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user