From 9f38b3f1a76b3da3d6098fa126766b191b32ad97 Mon Sep 17 00:00:00 2001 From: Weixuan XIAO Date: Sat, 16 Nov 2019 13:58:32 +0100 Subject: [PATCH] Remove splash screen after init --- indicator/indicatorhelper.cpp | 14 +++++++++++++- indicator/indicatorhelper.h | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/indicator/indicatorhelper.cpp b/indicator/indicatorhelper.cpp index 13b4110be..eb5bd51c6 100644 --- a/indicator/indicatorhelper.cpp +++ b/indicator/indicatorhelper.cpp @@ -70,7 +70,19 @@ MacOSIndicatorHelper::MacOSIndicatorHelper() m_splashScreen->show(); } -MacOSIndicatorHelper::~MacOSIndicatorHelper() {} +MacOSIndicatorHelper::~MacOSIndicatorHelper() +{ + if (m_splashScreen) { + delete m_splashScreen; + } +} + +void MacOSIndicatorHelper::postInit() +{ + if (m_splashScreen) { + m_splashScreen->finish(nullptr); + } +} void MacOSIndicatorHelper::iconPathHook() { diff --git a/indicator/indicatorhelper.h b/indicator/indicatorhelper.h index dfb68df43..46bdeb24f 100644 --- a/indicator/indicatorhelper.h +++ b/indicator/indicatorhelper.h @@ -54,6 +54,8 @@ public: MacOSIndicatorHelper(); ~MacOSIndicatorHelper(); + void postInit(); + void iconPathHook(); int daemonHook(QProcess &kdeconnectd);