Mountpaths indicate mount points of external devices. Files
located under such paths should not be removed on sync, because
they may have not been deleted, but are just inaccessible right now.
This makes sense in general, however it also avoids a race condition.
The dirscanner may finish before the filescanworkers for the files
run, this then signals the whole indexer has finished.
Add implicit AND booleans at the end.
This fixes a number of issues in LooqsQuery:
(1) A query like a b c p:(something) would fail, because
a b c get merged into one word. This happens at the end.
lonewords are special and do not become a token immediatly. So previous
logic to add implicit ANDs does not apply.
(2) Negations were also broken with lonewords.
(3) The TokenType enum fields were too narrow to be useful for the bitmask
Independent of that, add support for 'limit:'
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).
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
Strictly speaking a hack, and we may probably need to
add more chars here.
This mainly fixes the difference between:
"one two"
and c:("one two")
In the first case they are "lonewords", the " does
not get picked up. Then, the search results are something
not expected.
The qt sqlite3 driver only accepts a single statement
per exec().
We can't split by ; due to the trigger statements.
Thus, the pragmatic and dirty solution is to simply
put a query per line.
If we had something like c:(test) sort:(mtime, desc), then
we would run into an sql error eventually, since we
would have added an implicit AND token before the sort
condition. This is wrong, as a sort is not a filter.
So, as a quick hack to fix this, just remove a preceeding
boolean (as dirty as it may be, but it does the job for now).
Purpose is to seperate certain logic from SQLite and generalize it more.
Even though we only have Sqlite atm, in general the database layers
must be stupid as possible, while QSSQuery should do most of the hard work.
Fixes in Tokenizer logic.
Switched to C++17.