Delay initialization of SettingsDialog
authorMichael Schuster <michael@schuster.ms>
Thu, 22 Oct 2020 01:57:29 +0000 (03:57 +0200)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Thu, 22 Oct 2020 11:29:38 +0000 (11:29 +0000)
commit0fb10163a3b8ae08f0c149570a3c0705734c3511
tree5f238aa5d0a0f9cb5513e4b3a1b3f1339d3069c3
parent40aa53bf7656e68a440bc649597957e39908f13c
Delay initialization of SettingsDialog

ownCloudGui::slotShowSettings already got what it takes to create it only when we try to show it for the first time.

This however has some implications:

Pros:
- Only created when needed, while testing saved ca. 20 MB of RAM and got freed again after closing the dialog.
- Since we defaulted to the new Tray UI from 3.0, this is an added bonus for users don't opening the settings.

Cons:
- Resources like the avatar image have to be refetched everytime the dialog is recreated.
  This may be desired as well, because it ensures displaying no outdated info (e.g. on connection issues).

Signed-off-by: Michael Schuster <michael@schuster.ms>
src/gui/owncloudgui.cpp