Fix checkboxes in General Config (#1543) (#1793)

* GeneralConf.cpp: Remove redundant initializations

Removed unnecessary setChecked and setValue calls in init* methods which
get called inside updateComponents anyway. Also added missing function
calls in updateComponents. This has exposed more bugs.

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Merge updateComponents and setActualFormData

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix useJpgForClipboard checkbox

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix crash when 'Automatic updates' is checked

The config window used to crash when 'Automatic updates' check box was
interacted with, if the application started with the system tray
disabled.

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Some cleanup

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
Haris Gušić
2021-08-02 15:56:09 +02:00
committed by GitHub
parent 2608d1ecc0
commit b2ecb70e38
3 changed files with 21 additions and 62 deletions

View File

@@ -134,8 +134,10 @@ void Controller::enableExports()
void Controller::setCheckForUpdatesEnabled(const bool enabled)
{
m_appUpdates->setVisible(enabled);
m_appUpdates->setEnabled(enabled);
if (m_appUpdates != nullptr) {
m_appUpdates->setVisible(enabled);
m_appUpdates->setEnabled(enabled);
}
if (enabled) {
getLatestAvailableVersion();
}