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>
ownCloudGui::ownCloudGui(Application *parent)
: QObject(parent)
, _tray(nullptr)
- , _settingsDialog(new SettingsDialog(this))
+ , _settingsDialog(nullptr)
, _logBrowser(nullptr)
#ifdef WITH_LIBCLOUDPROVIDERS
, _bus(QDBusConnection::sessionBus())