The current snippet selection is useless for many queries.
Attempt a more reasonable snippet selection by prioritizing
those where all words are contained. The more words a snippet
has, the more important it is considered.Therefore, those will
be at the top.
Only highlight whole words
Crashes were observed, faulting in libQtNetwork.
Those were rather rare. We also have no traces.
Probably depends on some order signal/slots were
processed. Remove shared states between connections,
such as the IPCPreviewWorker and socket instance in IPCServer.
group_concat() does not preserve order of the ORDRE BY rank,
making the ordering quite meaningless for pages inside a file.
The recently introduced combobox to filter on a per file basis
should anyway be prefered than any kind of grouping in queries.
So we just remove the groupings here.
"All files" in the previews tab thus should show the best results
first now, from any files part of the result set.
A GUI option to sort by page instead of rank can be considered.
Indirectly generation would fire when we set combobox index
programitcally. So it's slot should only trigger the generation
when the user is viewing the preview tab
Add shortcuts to make entering queries more efficient
CTRL+F: Highlights rightmost filter, e. g. c:(word1 word2) would
highlight everything between (), so "word1 word" here. Alternatively,
highlights lone words, so p:(docs) word1, would highlight word1.
CTRL+W: Removes last filter or words.
Since 7c5c91e we wrongly merge lone words for paths queries too.
This creates unintended behaviour.
Fix it by creating a new paths query without merged words, which
restores the original behaviour.
Also, get rid of some redundant calls to createFinalTokens()
Avoid double results in search by distinguishing whether
a filter was explicitly given. Previously, we could not
discern this.
Furthermore, if a content search is given, lone words will be
considered path searches. If a path search is given, we consider
lone words implicit content search filters. This simplifies
queries for the user
Sigh. quazip changed the lib name, include locations, etc. from version 1.
Some distributions only have 0.9. Some only 1.x and so some packages break,
so they simply patch it when building the package.
Luckily, nothing we use from quazip is affected from an API perspective.
So detect if there is quazip1, then use pkg-config to link that, else do it like before.
Not entirely ideal, since we may want to search for 'cake', and look at
a preview for 'cake.txt' even if there is no 'cake' inside.
But this will do for now
Switch to QCoreApplication, since the ipc worker is not a GUI application.
We can also remove some vows this ways. Furthermore, disable connect() syscall
explicitly.