UIAbstractView::findRowWithText now accepts FindRowWithTextMatchKind instead of a boolean to force equal comparison.

Refactor of some examples, added a new hello world example but using UIApplication.
ecode: Fixed how it filters the `sbt`, `srt` and `sb` universal locator switches.
This commit is contained in:
Martín Lucas Golini
2026-02-26 00:32:48 -03:00
parent d1ad9527a9
commit 677aab8e0c
20 changed files with 362 additions and 300 deletions

View File

@@ -447,7 +447,8 @@ void App::openFontDialog( std::string& fontPath, bool loadingMonoFont, bool term
FileSystem::fileRemoveFileName( absoluteFontPath ) );
if ( dialog->getMultiView() ) {
ModelIndex index = dialog->getMultiView()->getListView()->findRowWithText(
FileSystem::fileNameFromPath( fontPath ), true, true );
FileSystem::fileNameFromPath( fontPath ), true,
UIAbstractView::FindRowWithTextMatchKind::Equals );
if ( index.isValid() )
dialog->runOnMainThread(
[dialog, index]() { dialog->getMultiView()->setSelection( index ); } );

View File

@@ -778,8 +778,7 @@ UniversalLocator::openBuildModel( const std::string& pattern ) {
return ItemListOwnerModel<std::string>::create( {} );
buildNames.reserve( builds.size() );
for ( const auto& build : builds ) {
if ( pattern.empty() ||
String::startsWith( String::toLower( build.first ), String::toLower( pattern ) ) )
if ( pattern.empty() || String::icontains( build.first, pattern ) )
buildNames.push_back( build.first );
}
std::sort( buildNames.begin(), buildNames.end() );
@@ -839,8 +838,7 @@ UniversalLocator::openBuildTypeModel( const std::string& pattern ) {
std::vector<std::string> buildTypeNames;
buildTypeNames.reserve( buildTypes.size() );
for ( const auto& build : buildTypes ) {
if ( pattern.empty() ||
String::startsWith( String::toLower( build ), String::toLower( pattern ) ) )
if ( pattern.empty() || String::icontains( build, pattern ) )
buildTypeNames.push_back( build );
}
std::sort( buildTypeNames.begin(), buildTypeNames.end() );
@@ -864,8 +862,7 @@ UniversalLocator::openRunTargetModel( const std::string& pattern ) {
std::vector<std::string> runTargetNames;
runTargetNames.reserve( runs.size() );
for ( const auto& run : runs ) {
if ( pattern.empty() ||
String::startsWith( String::toLower( run->name ), String::toLower( pattern ) ) )
if ( pattern.empty() || String::icontains( run->name, pattern ) )
runTargetNames.push_back( run->name );
}
std::sort( runTargetNames.begin(), runTargetNames.end() );