sqlitesearch: escapeFtsArgument: Fix handling of '*' prefix search
The * must not be in quotes
This commit is contained in:
parent
46c52afe59
commit
c0f4087937
@ -78,12 +78,17 @@ QString SqliteSearch::escapeFtsArgument(QString ftsArg)
|
|||||||
if(value.isEmpty())
|
if(value.isEmpty())
|
||||||
{
|
{
|
||||||
value = m.captured(2);
|
value = m.captured(2);
|
||||||
|
if(value.endsWith('*'))
|
||||||
|
{
|
||||||
|
value = value.mid(0, value.size() - 1);
|
||||||
|
}
|
||||||
|
result += "\"" + value + "\"*";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
value = "\"\"" + value + "\"\"";
|
value = "\"\"" + value + "\"\"";
|
||||||
|
result += "\"" + value + "\" ";
|
||||||
}
|
}
|
||||||
result += "\"" + value + "\" ";
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user