커밋 그래프

290 커밋

작성자 SHA1 메시지 날짜
3903f18854 Begin HACKING.md 2022-06-06 14:49:24 +02:00
60a91967bb Begin USAGE.md 2022-06-06 14:49:17 +02:00
c6550e81bb submodules: exile.h: Update 2022-06-06 14:19:17 +02:00
744fa2ec7a cli: CommandAdd: Set keepGoing, Remove verbose for now 2022-06-06 09:34:37 +02:00
f8542dc96a shared: Indexer: Handle keepGoing, set verbose 2022-06-06 09:34:37 +02:00
fdae7fd065 shared: LooqsQuery: Use unicode category class in regex 2022-06-06 09:34:37 +02:00
f8d6a1a586 gui: mainwindow: Use Unicode category class to extract highlight words 2022-06-06 09:34:37 +02:00
61fa7ca16d shared: IndexSyncer: Check whether file is located in a mountpath 2022-06-06 09:34:37 +02:00
61a446ec2d shared: common: Add mountPaths()
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.
2022-06-06 09:34:37 +02:00
0e5abf96c8 shared: indexer: Don't dispatch DirScanner if no dirs given
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.
2022-06-05 20:35:21 +02:00
52b296ff01 gui: mainwindow: Set default query limit to 1000 2022-06-05 14:39:57 +02:00
e5e43c8bfb shared: SqliteSearch: Append LIMIT statement if need be 2022-06-05 14:39:57 +02:00
862168418b gui: mainwindow: Reword warning for inaccessible files 2022-06-05 14:39:57 +02:00
a6ddcef0c0 shared: LooqsQuery: Fix logic of implicit AND booleans. Add 'limit:' support
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:'
2022-06-05 14:39:57 +02:00
821bed6706 shared: LooqsQuery: Add 'p', 'pb', 'pe' aliases
Because this way the user has to type significantly less
2022-06-05 14:39:57 +02:00
8f69be229b gui: mainwindow: Exclude HTML files from previews until we can do it properly 2022-06-05 14:39:57 +02:00
4187c3bfca gui: mainwindow: Switch to results tab when searching from indexer tab 2022-06-04 17:09:26 +02:00
1ec42e4949 gui: mainwindow: Add 'sync index' menu option
Opens a progress dialog while syncing takes place.
2022-06-04 17:09:26 +02:00
1ec7a5a865 gui: main: Ensure a clean exit 2022-06-04 17:09:26 +02:00
d7b93d11d8 shared: IndexSyncer: Support cancellation 2022-06-04 17:09:26 +02:00
7d9c883abd shared: LooqsQuery: build(): Return empty query for empty expresion 2022-06-04 17:09:26 +02:00
49e408be50 cli: CommandUpdate: Use shared/IndexSyncer 2022-06-04 17:09:26 +02:00
abc126548b shared: Introduce IndexSyncer, containing logic of cli/CommandUpdate
IndexSyncer contains most of the logic of cli/CommandUpdate, so
it can be reused in the GUI where we need it too
2022-06-04 17:09:26 +02:00
86d629c957 shared: SqliteDbService: Changed getFiles() return to unsigned int 2022-06-04 17:09:26 +02:00
05fad3be17 shared: ParallelDirScanner: Delete DirScanWorkers after they are done 2022-06-04 17:09:26 +02:00
5d702c9a95 cli: main: Wire up CommandList 2022-06-04 17:09:26 +02:00
45505e4447 cli: CommandList: Rework, implement pattern, remove count, reverse 2022-06-04 17:09:26 +02:00
51ead5e171 cli: CommandSearch: Improve error handling, helptext fixes 2022-06-04 17:09:26 +02:00
6f11a5e662 shared: FileSaver: Adjust message as it's confusing on updates 2022-06-04 17:09:26 +02:00
a1be088b7a cli: CommandAdd: Remove unimplemented -a 2022-06-04 17:09:26 +02:00
d2885af463 cli: CommandUpdate: Print total of updated/delete files, minor improvements 2022-06-04 17:09:26 +02:00
26930c0022 cli: CommandUpdate: Remove unimplemented -a 2022-06-04 17:09:26 +02:00
05606dd502 cli: CommandUpdate: When path is a dir, don't do anything (no deletion or updates) 2022-06-04 17:09:26 +02:00
db029dd915 shared: shared.pro: Add git commit id to build 2022-06-04 17:09:26 +02:00
3f85f214e3 gui: mainwindow: Add menu opening config and About dialogs 2022-06-04 17:09:26 +02:00
f14e2e77cd shared: common: Add versionText() function 2022-06-04 17:09:26 +02:00
15615776d3 shared: SandboxedProcessor: Fix scope issue with readablePathLocation
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.
2022-06-04 17:09:26 +02:00
5ed82a7dda README: update 2022-06-04 17:09:26 +02:00
ae57a22078 gui: MainWindow: Set, save and restore ignore patterns 2022-06-04 17:09:26 +02:00
c2bd1b526b shared: Indexer: Use WildcardMatcher to ignore paths 2022-06-04 17:09:26 +02:00
a3666f283e shared: DirscanWorker: Use WildcardMatcher to ignore paths 2022-06-04 17:09:26 +02:00
edc41d6f59 shared: Introduce WildcardMatcher 2022-06-04 17:09:26 +02:00
145cd150b1 gui: PreviewGenerator: Make previews for all text files 2022-06-04 17:09:26 +02:00
26c7cdbc5f shared: Move textfile detector to common 2022-06-04 17:09:26 +02:00
aed0ca31f7 shared: SandboxedProcessor: Perform MIME-type detection
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).
2022-06-04 17:09:26 +02:00
40207c3399 gui: Remove enableSandbox() for general GUI
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.
2022-06-04 17:09:26 +02:00
e715be9787 gui: Fix dispatch of SandboxedProcessor
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.
2022-06-04 17:09:26 +02:00
bb1e653690 gui: PreviewGeneratorPlainText: Truncate dirtily to avoid lags
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.
2022-06-04 17:09:26 +02:00
4aa850d5ed gui: IPCPreviewClient: Raise error signal() instead of exception 2022-06-04 17:09:26 +02:00
11af6e530e gui: sandbox: Add 'error' to vow_promises to avoid getting killed on ioctl() with TIOCSTI 2022-06-04 17:09:26 +02:00