1
0

Ranking: Prioritizee name before command/binary name

This seems to work better for flatpak apps and should
argueably be more natural.
Este cometimento está contido em:
Albert S. 2021-04-28 23:15:24 +02:00
ascendente 4315de0e76
cometimento f1b17c0842

Ver ficheiro

@ -405,19 +405,19 @@ void Window::keyPressEvent(QKeyEvent *event)
int Window::rankConfig(const EntryConfig &config, QString filter) const
{
if(config.command.startsWith(filter, Qt::CaseInsensitive))
if(config.name.startsWith(filter, Qt::CaseInsensitive))
{
return 0;
}
else if(config.command.contains(filter, Qt::CaseInsensitive))
else if(config.command.startsWith(filter, Qt::CaseInsensitive))
{
return 1;
}
else if(config.name.startsWith(filter, Qt::CaseInsensitive))
else if(config.name.contains(filter, Qt::CaseInsensitive))
{
return 2;
}
else if(config.name.contains(filter, Qt::CaseInsensitive))
else if(config.command.contains(filter, Qt::CaseInsensitive))
{
return 3;
}