Qt does not provide css style or API for modifying icon and text spacing in QTreeView. This is a long issue in buttons as well, as Qt draws icon and texts instead of having them as widgets that can be applied styles.
In CI build, dependencies are put in the build install location rather than
in the system libs directory, hence that path must be included in the
search for shared libraries.
The problem seems to have been triggered by recent change in the
libkiwix.pc pkg-config file which resulted in the version of some
of libkiwix dependencies (recorded in libkiwix.so) being bumped up.
As a result, previous/older versions of those dependencies embedded in
the CI build docker image
(ghcr.io/kiwix/kiwix-build_ci_focal:2024-06-03) no longer matched the
requirements of libkiwix.so, whereas the up-to-date versions of those
dependencies (that are downloaded during each build procedure) were not
used because they were not in the search path.
On Windows, static libraries are using "foo.lib" naming.
On Unix, they are in the form of "libfoo.a"
On Windows, "foo.lib" can also the definition of symbols in a foo.dll.
So you can link to "foo.lib", whatever you are doing static or dynamic linking and you are good.
However, meson is always creating static library as "libfoo.a"
'to avoid a potential name clash with shared libraries which also generate import libraries with a lib suffix.' [1]
On top of that, qmake is replacing all `-lfoo` in LIBS by `foo.lib` (on Windows).
So at the end, we try to link with `foo.lib` but we have `libfoo.a`
Solution could be :
- Rename `libfoo.a` to `foo.lib`, but it would mean modify deps libraries on the FS
- Don't use LIBS and directly set QMAKE_LFLAGS but we would have to handle different command line option format
between g++/clang and msvc
- Update meson build system of each projet to explicitly set the library naming.
- Replace `-lfoo` with absolute path to static library. This is what meson is doing internally and what
we are doing here
Any `-lfoo` is replace with absolute path to static library (`libfoo.a`) if we found one.
Else, it is keep unchanged.
[1] https://mesonbuild.com/Reference-manual_functions.html#library_name_suffix
This change allows one to navigate through the choices using up and down arrow keys from keyboard
Enter/Return key can be pressed to select the current item
This change adds a new widget called KiwixChoiceBox
The design inspiration is taken from here: https://harvesthq.github.io/chosen/#multiple-select
setType() takes a string to put on the label
We can add possible choices using the setSelections() method
Splitted the views into RowNode and DescriptionNode for consistency
RowNode represents one row with thumbnail, name, data, size, etc.
DescriptionNode shows the description
created ContentManagerHeader, inherited from QHeaderView, to implement not showing the sort indicator for first column.
Changed sort indicator position to left of text
This implements a basic model for QTreeModel
Currently, it only shows 1 row with some random data.
In future commits, data from ContentManager::getBookInfos will be taken
* Fix the AppImage packaging. Now published AppImages work correctly on recent
distrubution (@mgautierfr #905)
* Improve zim file picker (@kelson42 #886)
* Do not show ServiceWorker zim file from the remote catalog (@kelson42 #887)
`GIT_VERSION` and `BUILD_DATE` are only displayed to the user.
It was useful pre-release to identify the exact version of the build in
bug report.
Now than, we are now releasing kiwix-desktop, we don't need the
`BUILD_DATE` and we must use the exact version instead of the git version.
Fix#476
- add a delay before searching suggestions
A timer of 100ms is started each time the text is edited, if the timer
time-outs the suggestion's search is executed.
- foreach search a worker with a token is launched in another thread
Once the search is done, the worker sends the suggestions list and the corresponding urls list to the main thread.
if the token of the worker matches with the last token used, the main thread displays the suggestions.
The ContentTypeFilter Class is a custom QCheckBox.
These are stored in a QList that is sended to the ContentManager each time they are clicked.
The ContentManager sets the acceptedTags according to the state of the ContentTypeFilters
The "All" button resets the filters