For some mysterious reason the dependency requirement "libkiwix-dev (>= 14.0.0)"
in the Debian control file results in PPA build failure. After unpacking
`kiwix-build-deps_2.4.0~focal_all.deb` the 'apt-get -o
Debug::pkgProblemResolver=yes --no-install-recommends --yes install -f'
commands reports:
Reading package lists...
Building dependency tree...
Reading state information...
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) kiwix-build-deps:amd64 < 2.4.0~focal @iU mK Nb Ib >
Broken kiwix-build-deps:amd64 Depends on libkiwix-dev:amd64 < none -> 14.0.0~focal @un uN > (>= 14.0.0)
Removing kiwix-build-deps:amd64 because I can't find libkiwix-dev:amd64
Done
Shortening the libkiwix-dev minimal version string to "14.0"
(libkiwix-dev (>= 14.0)) works around that issue.
The maximal version of libkiwix-dev, as well as the version range of the
libzim dependency have been shortened too for consistency.
QWebEngineDownloadItem of Qt 5 was replaced with
QWebEngineDownloadRequest in Qt 6. Besides the API of
QWebEngineDownloadItem has slightly changed in Qt 5.14.
This commit reduces the pollution of the code by conditional
compilation needed to support all those versions of Qt.
It started as a simple yes/no box but is now being used as an InfoBox,
ConfirmBox and a customized MessageBox (in further commits) - this
sounds better!
Before this fix tabs could be restored before the user approved
disabling the QWebEngine sandbox (when the app is launched from a remote
location/network folder). If disabling the web browser sandbox in
kiwix-desktop has any real risk for the user then we shouldn't expose
them to it before notifying about implications and receiving their
confirmation to proceed.
Before this fix the settings and session information should have been
written to the Windows registry however for some reason it didn't work.
In any case we want the settings to be saved in files so that it plays
better with portable mode (when we start supporting it for Windows
builds too).
Explicit settings (those configurable through the settings dialog, and
library filters) are saved in
"C:/Users/<USER>/AppData/Local/kiwix-desktop/Kiwix-desktop.conf"
Session info (window size, list of open tabs, last directory used for
opening a ZIM file) are saved in
"C:/Users/<USER>/AppData/Roaming/kiwix-desktop/kiwix-desktop.session"
The bug itself happens due to initialization&update of MultiZimButton (via
established signal/slot connections) at a time when the main application
window hasn't yet been shown and the dimensions of various widgets are
bogus. The end result is that a too narrow menu leads to the elided text
string being empty which was outside of the assumptions of the
getElidedText() function.