The pointer becomes invalid as readablePathLocation falls out of scope,
and exile.h quits with an error.
This may indicate exile API sucks, so something to think about there.
Detect mime types, and for text/*, run the default text processor.
The added benefit is that we can now add plaintext files without extensions,
or many other text files (e. g. source code).
While f67a37bc21 indicated the last remaining code could stay,
it can't because there is a launch failure of SandboxedProcessor.
This has been revealed by the changes of the previous commit,
aa03d0a4920e.
Hence, the GUI will be untouched by exile. We only sandbox
the preview generation and the indexing trough IPC.
There was an off-by-one, the SandboxedProcessor was only passed
'process', not the path to the file.
No processor was found for 'process', thus 'nothingProcessor' was
returned. Therefore, we never sandboxed (because we never had
to process anything).
The sandboxing would have failed though, because we need to launch
QCoreApplication, not QApplication.
The CLI was never affected.
It was possible the text was getting too big. The GUI
was lagging for previews of some text files. The first
assumption was that we would only have a couple of hits,
which is unreasonable for large .txt files and common
words.
We only ever see a handful of previews, it makes no sense
to get all snippets. So just allow 7 snippets, that's it.
Also, just cut after 1000 chars no matter what.
We now resolve symlinks when adding, so we can properly check
whether a path is excluded or not. This accidently also
helps with duplicates.
Excluded paths are hardcoded and can also be appended to
by the user using the settings.
Closes: #34
This prevents 'spam'. User may have scrolled 10 pages forward, while
we are still generating old pages. Then the user wonders why
they arrive so late.
So disable switching pages while the generation is still running
It is unlikely that a user will have to quickly go through search
results like that.