We don't need to configure the (default) profile each time we create a
new web page.
Let's create a specific profile for the application and use it everywhere.
This is the profile who is responsible to :
- configure itself with the schemeHandler for "zim"
- handle the download (this probably fix a bug if a user close the page
while a download associated to the page is running)
Display the "local kiwix server" option in the menu
This option opens a Qdialog that have options to control the server (run, open
in browser, stop).
The KiwixServe::run() method use execvp to run the kiwix-serve binary.
Using Curl fct of the kiwix library is synchrone, so when the server accepts
the request but doesn't answer, the kiwix-desktop app is unresponsive.
To avoid that, this is a new architecture based on the Qt network request
management.
There is a new member in the contentmanager based on the new class
OpdsRequestManagerManager. It has two members : m_networkManager sends the
request and return a pointer stored in mp_reply which will receive the answer
of the request.
When the remote library has to be update, it calls
the doUpdate method. It checks if there already is a running request and
aborts it if yes. Then m_networkManager sends the
request and return a pointer stored in mp_reply which will receive the answer
of the request. The signal 'finished' of the mp_reply is connected to the slot
receiveContent. In this slot it checks if the signal 'finished' was emit
because of an abort, if not it reads and emit a signal bookChanged with the
content in parameter. This signal in connected in the ContentManager class
to the slot 'updateRemoteLibrary' which update the remote library member.
It appears that setting `INCLUDEPATH` in qmake break things.
Because qmake add the include path using `-isystem`.
We don't need to extract include path and define from PKGCONFIG_CFLAGS.
Updating `CFLAGS` and `CXXFLAGS` is enough. No need for complex things.
Fix#90Fixkiwix/kiwix-build#260
flatpack doesn't export files that aren't prefixed like the app (org.kiwix.desktop)
so it has to be renamed and to be precised in the mimetype.xml file because it doesn't matched to the mimetype's name anymore
This is useless. It was use to rewrite http request to zim request and
have the custumUrlShemeHandler handle the request.
However, we now want to open http request in a external browser.
And it is already the case, the http requests are never intercepted.
Move all methods used by contentManager html into the contentManager class.
We do not export anymore the kiwixapp, the library or the downloader.
As the downloader was use only to export the methods to html, we can
remove it (and use kiwix::Downloader).
- Create a TOCSideBar (name TOC because it will also show TOC)
- Remove `FindNextAction` and `FindPreviousAction`. They are handle
directly by a button in the sidebar.
All action of the menu are created but none is associated with an action.
Actions needed for the alpha are disabled.
Actions not needed for the alpha are hidden.
Mainly remove the `Kiwix` part in the name :
- KiwixSchemeHandler -> UrlSchemeHandler
- KiwixRequestInterceptor -> RequestInterceptor
- KiwixWebView -> WebView
- KTabWidget -> TabWidget
When a user <Ctrl+LeftClick> or <MiddleClick> on a link, `QWebEngineView`
try to open a new window using the `createWindow` method.
By overloading it, we can create our own tab as we want.