Display an error messsage if Download* Downloader::startDownload(const std::string& uri)
fails because aria2 doesn't succeed to start the download.
Display an error message if a download get the "error status".
Each time the zoom of a zim is changed, it is saved in the QSettings.
The SettingsManager class has new methods that wrap QSettings method :
- void setSettings(const QString &key, const QVariant &value);
- void deleteSettings(const QString &key);
- bool settingsExists(const QString &key);
- QVariant getSettings(const QString &key);
The SettingsManager class has a new member m_zoomFactor with a getter and
a setter. Its value is set at launch and saved with the QSettings.
There is a new field in the settings page where the zoom factor can be
changed, it is multiplied by 100 to be displayed as a percentage.
Each time a file is opened, the zoomfactor of the view is set with the
member m_zoomFactor of the SettingsManager class.
Add an input in the settings page which allows the user to change the Kiwix
server port.
The SettingsManager sets the value(s) of the settings in the setSettings()
method at the start of the app. This method for now sets a default value
but it will use a config file later too.
The setKiwixServerPort() method is called when the user indicates a valid
port. It sets the m_kiwixServerPort member and emit the portChanged() signal
which is connected in the LocalKiwixServer class to update the m_port member.
The server port is now always set before its launch in the runOrStopServer method.
The LocalKiwixServer::openInBrowser() now uses the mp_server->getPort() to
always use the right port. In fact if the user changes the port in the
settings while the server is running the m_port member doesn't match anymore
the port used by the running server so the openInBrowser will use a wrong port.
The KiwixApp class uses now the SettingsManager::getKiwixServerPort() method
to set the port of the kiwix-server