diff --git a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp index be57d155979..39b892d9660 100644 --- a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp @@ -64,9 +64,9 @@ void CMakeLocatorFilter::prepareSearch(const QString &entry) CMakeProject *cmakeProject = qobject_cast(p); if (!cmakeProject) continue; - foreach (const CMakeBuildTarget &ct, cmakeProject->buildTargets()) { - if (ct.title.contains(entry)) { - Core::LocatorFilterEntry entry(this, ct.title, cmakeProject->projectFilePath().toString()); + foreach (const QString &title, cmakeProject->buildTargetTitles()) { + if (title.contains(entry)) { + Core::LocatorFilterEntry entry(this, title, cmakeProject->projectFilePath().toString()); entry.extraInfo = FileUtils::shortNativePath(cmakeProject->projectFilePath()); m_result.append(entry); } diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.h b/src/plugins/cmakeprojectmanager/cmakeproject.h index 5e9fa7e159e..5deb30ebf07 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.h +++ b/src/plugins/cmakeprojectmanager/cmakeproject.h @@ -88,7 +88,6 @@ public: QStringList files(FilesMode fileMode) const final; QStringList buildTargetTitles(bool runnable = false) const; - QList buildTargets() const; bool hasBuildTarget(const QString &title) const; CMakeBuildTarget buildTargetForTitle(const QString &title); @@ -110,6 +109,8 @@ protected: bool setupTarget(ProjectExplorer::Target *t) final; private: + QList buildTargets() const; + void handleActiveTargetChanged(); void handleActiveBuildConfigurationChanged(); void handleParsingStarted();