MCPcopy Create free account
hub / github.com/SpartanJ/eepp / openRunTargetModel

Method openRunTargetModel

src/tools/ecode/universallocator.cpp:849–871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

847}
848
849std::shared_ptr<ItemListOwnerModel<std::string>>
850UniversalLocator::openRunTargetModel( const std::string& pattern ) {
851 if ( nullptr == mApp->getProjectBuildManager() )
852 return ItemListOwnerModel<std::string>::create( {} );
853 const auto& builds = mApp->getProjectBuildManager()->getBuilds();
854 const auto& cfg = mApp->getProjectBuildManager()->getConfig();
855 auto buildIt = builds.find( cfg.buildName );
856 if ( buildIt == builds.end() )
857 return ItemListOwnerModel<std::string>::create( {} );
858 const auto& build = buildIt->second;
859 const auto& runs = build.runConfigs();
860 if ( runs.empty() )
861 return ItemListOwnerModel<std::string>::create( {} );
862
863 std::vector<std::string> runTargetNames;
864 runTargetNames.reserve( runs.size() );
865 for ( const auto& run : runs ) {
866 if ( pattern.empty() || String::icontains( run->name, pattern ) )
867 runTargetNames.push_back( run->name );
868 }
869 std::sort( runTargetNames.begin(), runTargetNames.end() );
870 return ItemListOwnerModel<std::string>::create( runTargetNames );
871}
872
873void UniversalLocator::updateSwitchBuildTypeTable() {
874 mLocateTable->setModel(

Callers

nothing calls this directly

Calls 10

sortFunction · 0.85
getConfigMethod · 0.80
reserveMethod · 0.80
push_backMethod · 0.80
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected