Commit Graph

395 Commits

Author SHA1 Message Date
d8205a0da4 gui: Disable search box as long as previews are being generated
Otherwise "spamming" queries can cause high load and
many outstanding may arrive only to be discarded anyway
for not being part of the recent query.
2022-08-23 17:37:05 +02:00
877224b6e1 gui: mainwindow: Only trigger preview generation when in tab
Indirectly generation would fire when we set combobox index
programitcally. So it's slot should only trigger the generation
when the user is viewing the preview tab
2022-08-23 17:35:52 +02:00
14730ed208 gui: mainwindow: Add vertical scroll option, default to it
Seems horizontal mode is too unusual according to multiple
feedback.

Allow choosing this the mode in the settings
2022-08-21 22:57:48 +02:00
fe610d3068 mainwindow: Allow CTRL + mouse wheel to zoom on previews 2022-08-21 18:42:32 +02:00
0c1b57d911 mainwindow: Save/Restore history 2022-08-21 17:48:43 +02:00
2885e40a3a mainwindow: Add search history. Allow going up/down with arrow keys 2022-08-21 17:47:11 +02:00
c0f4087937 sqlitesearch: escapeFtsArgument: Fix handling of '*' prefix search
The * must not be in quotes
2022-08-21 07:55:49 +02:00
46c52afe59 Release v0.6 2022-08-14 23:15:19 +02:00
431abfe7c0 USAGE.md: Update 2022-08-14 20:28:17 +02:00
47c19d121a gui: mainwindow: Add CTRL(+Shift+)Tab shortcut to switch between tabs 2022-08-14 20:25:44 +02:00
166c051cfb gui: mainwindow: Add CTRL+F and CTRL+W shortcuts
Add shortcuts to make entering queries more efficient

CTRL+F: Highlights rightmost filter, e. g. c:(word1 word2) would
highlight everything between (), so "word1 word" here. Alternatively,
highlights lone words, so p:(docs) word1, would highlight word1.

CTRL+W: Removes last filter or words.
2022-08-14 20:25:44 +02:00
47d0440ffb gui: mainwindow: Add checkbox to remove current database 2022-08-14 20:25:44 +02:00
d900d58f26 shared: migrations: Add 3.sql: Drop potentailly harmful trigger
In [1] it's stated that "If the values "inserted" into the text
columns as part of a 'delete' command are not the same as those
currently stored within the table, the results may be unpredictable."

It's to be assumed only inserting ftsid is unpredictable. We
have no way for a proper delete because files are not immutable
or may have been deleted.

For now the index will contain entries for files that don't exist.
They won't appear in search results as they won't be joined
in the query.

[1] https://www.sqlite.org/fts5.html#the_delete_command
2022-08-14 20:24:21 +02:00
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