Commit Graph

318 Commits

Author SHA1 Message Date
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
396c619cf1 submodules: exile.h: Update 2022-06-04 17:09:26 +02:00
1108a138f4 gui: mainwindow: Also resize mtime column to fit content 2022-06-04 17:09:26 +02:00
b6926d510f FileSaver: Don't add files in blacklisted paths
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
2022-06-04 17:09:26 +02:00
483ea04638 update README 2022-05-29 11:20:28 +02:00
aeafa9560e mainwindow: Disable page switcher while generation is running
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.
2022-05-29 11:20:28 +02:00
a82818dc43 gui: init previewProcessBar with 0 on start 2022-05-29 11:20:28 +02:00
c867652b6f gui: IPCPreviewWorker(): Don't allocate mapfunctor on heap 2022-05-29 11:20:28 +02:00
f8fe21d50b gui: Add label showing total number of preview pages 2022-05-29 11:20:28 +02:00
1e97f8dd26 gui: mainwindow: Fix preview page number calculation
The paging now works on the actual pages to be rendered.
2022-05-29 11:20:28 +02:00
ad0fc74439 ipc: Place socket in /tmp/.looqs/, remove ipc path settings 2022-05-29 11:20:28 +02:00
e44fb1a942 gui: main: Enable exile.h for IPC preview generation 2022-05-29 11:20:28 +02:00
472661bff6 gui: Begin simple IPC error reporting 2022-05-29 11:20:28 +02:00
4aa6d43674 gui: Open files/previews directly without IPC again
Since the main GUI process is not sandboxed again
2022-05-29 11:20:28 +02:00
2591a4ccba gui: ipc: Support cancellation of preview generation 2022-05-29 11:20:28 +02:00
d66e395fda gui: main: Kill IPCServer process on exit 2022-05-29 11:20:28 +02:00
0d6fb1d482 gui: mainwindow: Use new IPCPreviewClient 2022-05-29 11:20:28 +02:00
8f2e77b152 gui: Introduce IPCPreviewClient 2022-05-29 10:44:19 +02:00
3bdcb76d8e gui: PreviewResult: Add serialization() methods for IPC 2022-05-27 09:29:28 +02:00
ee18142e36 gui: PreviewGenerator*: Wrap PreviewResult in QSharedPointer 2022-05-27 09:28:21 +02:00
3e03fed1a2 gui: IpcServer: Use IPCPreviewWorker 2022-05-27 09:26:37 +02:00
6439adffc6 gui: Begin IPCPreviewWorker 2022-05-27 09:26:03 +02:00
02642a147a gui: Retire IPCClient and PreviewWorker 2022-05-27 09:24:42 +02:00