mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:46:03 +00:00
UI: Programs: Fix "Filters" menu with "Search" text applying
This commit is contained in:
parent
a094b1214a
commit
272a4e74a7
@ -568,14 +568,14 @@ QString AppListModel::sqlWhere() const
|
||||
QString sql = FtsTableSqlModel::sqlWhere();
|
||||
|
||||
if (filters() != FilterNone) {
|
||||
if (sql.isEmpty()) {
|
||||
sql = " WHERE ";
|
||||
}
|
||||
QStringList list;
|
||||
|
||||
if (filters().testFlag(FilterWildcard)) {
|
||||
sql += QString("t.is_wildcard = %1")
|
||||
.arg(filterValues().testFlag(FilterWildcard) ? "1" : "0");
|
||||
list << QString("t.is_wildcard = %1")
|
||||
.arg(filterValues().testFlag(FilterWildcard) ? "1" : "0");
|
||||
}
|
||||
|
||||
sql += (sql.isEmpty() ? " WHERE " : " AND ") + list.join(" AND ");
|
||||
}
|
||||
|
||||
return sql;
|
||||
|
Loading…
Reference in New Issue
Block a user