Commit Graph

382 Commits

Author SHA1 Message Date
eb58b8f770 gui: Clear previews always on new search results
If a first search generates previews and the next one does
not, old entries would still have been visible.

So we just clear them once we get results.
2022-08-06 10:10:45 +02:00
9a70a821bd gui: PreviewGeneratorPlainText: Show line numbers
Generate previews that show the line number and surrounding
lines (like grep -C) for context.
2022-08-06 10:01:24 +02:00
89bf65d9bb gui: PreviewGeneratorPlaintext: Add MAX_SNIPPETS const, remove redundant loop 2022-08-06 09:35:00 +02:00
ad06497b4b shared: Add LimitQueue which discards oldest entry once limit hit 2022-08-06 09:06:00 +02:00
00abc6bc1b gui, shared: Fix and simplify word extraction regexes
They did not work for chars like '-', causing errors.

We can actually just extract non-space chars for these cases.
2022-08-06 08:57:39 +02:00
e8b89b77ab Release v0.5.1 2022-07-30 10:11:44 +02:00
77f5c7e39d gui: mainwindow: Revert pathsQuery to original behaviour
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()
2022-07-30 10:01:51 +02:00
052f169ef2 Release v0.5 2022-07-29 10:17:04 +02:00
ffdb326045 USAGE.md: Update 2022-07-29 10:17:04 +02:00
7c5c91ef10 gui: search: Avoid double results + minor improvements
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
2022-07-29 10:17:04 +02:00
076c3c4c7f shared: LooqsQuery: Add implicit AND also for lone words 2022-07-29 10:17:04 +02:00
c11fd1a9ff shared: LooqsQuery: Allow constructing from tokens and sort conditions 2022-07-29 10:17:04 +02:00
1849eba190 shared: sqlitesearch: Escape FTS arguments
Most users are not to be expected to be familiar with
sqlite's FTS syntax. It also leads to unnnecessary
arrows in some instances.

So wrap every space separated word in quotes, unless
it's already in quotes. Then we just escape those with
double-quotes.
2022-07-28 17:49:40 +02:00
1188e51c35 cli: Run migrations if necessary 2022-07-28 14:28:45 +02:00
1da8344295 shared: Adjust queries to db revision 2 2022-07-28 14:00:46 +02:00
78f38fa418 shared: migrations: Add 2.sql: Change to contentless FTS
We never used the content copy we stored. It only wasted space.

Update scheme so we do not store the content anymore. Switch
to contentless FTS approach
2022-07-28 14:00:46 +02:00
7fa266e5e8 gui: main: Execute migrations. Show migration progress dialog
We don't do silent upgrades anymore because they might take considerable
time.
2022-07-28 13:43:02 +02:00
c03d7da821 shared: common: Remove migration logic from ensureConfigured()
Running migrations is okay for initialization. However, doing
it here might take ages, so the GUI simply would not show up.

Therefore, migration must be done by the CLI or GUI and they
should show that migrations are running
2022-07-28 13:31:13 +02:00
49b57e1740 shared: DBMigrator: Take DatabaseFactory, run vacuum, add error() sig, start() slot 2022-07-28 13:27:37 +02:00
5996971195 shared: common: setPdfViewer(): Fix misplaced QSettings 2022-07-24 23:57:38 +02:00
bf1265fe3a shared: Retire Common::findInPath() for builtin Qt function 2022-07-24 18:19:38 +02:00
43a0f08579 gui: PreviewGeneratorPlainText: Fix case of empty preview when word found on pos 0 2022-07-24 12:25:38 +02:00
1aa5ae0ccc gui: Introduce PreviewGeneratorOdt for basic previews of .odt files 2022-07-24 11:43:00 +02:00
20d42a66a6 gui: Begin PreviewResultOdt 2022-07-24 11:41:25 +02:00
cba4df3eac gui: previews: Add label with file path below every preview 2022-07-24 11:40:38 +02:00
fdbf3a7358 gui: PreviewGeneratorPlainText: Move snippet gen to own function for reuse 2022-07-24 11:34:52 +02:00
ac4d7dd0a5 gui: mainwindow: Obey scale settings for plaintext previews too 2022-07-23 20:21:45 +02:00
ab064c3e3b gui: mainwindow: Add menu action to open web user manual 2022-07-23 20:16:19 +02:00
a33c7f1859 gui: MainWindow: Move all connect() calls from constructor to connectSignals() 2022-07-16 23:35:40 +02:00
4ce14a7284 README.md: Remove Ubuntu 21.10 as it is EOL so we won't care anymore about it 2022-07-15 16:31:12 +02:00
cc9dae37e5 shared: Indexer: Use isErrorSaveFileResult() to check for non-successful results 2022-07-11 17:14:45 +02:00
64a9638d1e shared: SaveFileResult: Introduce isErrorSaveFileResult() 2022-07-11 17:13:58 +02:00
5f19328679 Release v0.4 2022-06-29 19:31:40 +02:00
5ffd7ae97e shared: common: setPdfViewer(): Fix missing spaces between viewer and args 2022-06-29 19:31:40 +02:00
9ed28df09c README.me: Minor changes 2022-06-29 18:00:05 +02:00
69e028daf5 gui: mainwindow: Open new AboutDialog 2022-06-29 18:00:05 +02:00
d4b0c1feae gui: Add new AboutDialog to show our licenses "paperwork" 2022-06-29 18:00:05 +02:00
990888efc1 shared: Include license texts as resource 2022-06-29 18:00:05 +02:00
3f8c147182 Add LICENSE-3RD-PARTY 2022-06-29 18:00:05 +02:00
ba030169aa gui: previews: Allow filtering file for which to show preview 2022-06-29 18:00:05 +02:00
1636e39c5b shared: ParallelDirScanner: Fix missing progress report from top-level scan 2022-06-27 23:11:26 +02:00
bda23670e3 shared: ParallelDirScanner: Correct filter to 'NoDotAndDotDot' from 'NoDotDot' 2022-06-27 23:10:53 +02:00
d0fe51c666 README: Mention prebuilt tarball, add sig verification, minor improvements 2022-06-24 19:17:50 +02:00
a561032668 shared: Indexer: Adjust for OK_WASEMPTY 2022-06-24 19:17:50 +02:00
b8006bde7b shared: FileSaver: Don't launch SandboxedProcessor for empty files 2022-06-24 19:17:50 +02:00
614238edda shared: FileSaver: Print message for OK_WASEMPTY 2022-06-24 19:17:50 +02:00
83ed935790 shared: FileSaver: Return OK_WASEMPTY
We get OK_WASEMPTY from the processor when there
usually should be something. Rarely, this is not the case.

Let the callers know about this state at least
2022-06-24 19:17:50 +02:00
69837ed60f shared: SaveFileResult: Add OK_WASEMPTY when processor could not extract anything 2022-06-24 19:17:50 +02:00
2ad99699bf shared: FileSaver: Adjust to SandboxedProcessor new SaveFileResult value 2022-06-24 19:17:50 +02:00
b6b3e2f3c0 shared SandBoxedProcessor: Return SaveFileResult, remove defines
Not entirely ideal as SandboxedProcessor does not save anything,
but an improvement nevertheless over the current mess
2022-06-24 19:17:50 +02:00