diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-10 20:47:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-11 11:20:43 +0200 |
commit | 2d582244680e7f6dec6e4a466e276f93ccb01dc9 (patch) | |
tree | b0e880ddfb3ce1ea2f47151b648e7fbb55132f08 /shell/source | |
parent | 74012c48d99634a7556a86f77e9522024f2afdb2 (diff) |
loplugin:flatten
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'shell/source')
-rw-r--r-- | shell/source/backends/kf5be/kf5backend.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/shell/source/backends/kf5be/kf5backend.cxx b/shell/source/backends/kf5be/kf5backend.cxx index 9948e41a9888..3d2041c334d8 100644 --- a/shell/source/backends/kf5be/kf5backend.cxx +++ b/shell/source/backends/kf5be/kf5backend.cxx @@ -190,22 +190,22 @@ void initQApp(std::map<OUString, css::beans::Optional<css::uno::Any>>& rSettings Service::Service() { css::uno::Reference<css::uno::XCurrentContext> context(css::uno::getCurrentContext()); - if (context.is()) - { - OUString desktop; - context->getValueByName("system.desktop-environment") >>= desktop; + if (!context.is()) + return; + + OUString desktop; + context->getValueByName("system.desktop-environment") >>= desktop; - if (desktop == "PLASMA5") + if (desktop == "PLASMA5") + { + if (!qApp) // no qt event loop yet { - if (!qApp) // no qt event loop yet - { - // so we start one and read KDE settings - initQApp(m_KDESettings); - } - else // someone else (most likely kde/qt vclplug) has started qt event loop - // all that is left to do is to read KDE settings - readKDESettings(m_KDESettings); + // so we start one and read KDE settings + initQApp(m_KDESettings); } + else // someone else (most likely kde/qt vclplug) has started qt event loop + // all that is left to do is to read KDE settings + readKDESettings(m_KDESettings); } } |