diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-06-02 15:54:59 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-06-03 05:59:59 +0000 |
commit | 9031ad19c4c662c719cd3012b41a64dfdfe8b31a (patch) | |
tree | b64a1c78d1509fc0d93b88bb917f5781cb4df52e /src/plugins/studiowelcome | |
parent | b07909d9fdfad0b2ae343433dcceab7bc55ac4ec (diff) |
StudioWelcome: Remove unused code and fix return value
The connection to visibleChanged of the main window doesn't do anything,
since its visibility doesn't change as long as the splash screen is
showing.
Also return false from delayedInitialize() if it doesn't do anything.
Returning true requests that the next plugin's delayedInitialize() is
actually delayed, which doesn't make sense it didn't do anything.
Change-Id: I96793ce6df517bf37b3b060e80daf8cc74d71247
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/studiowelcome')
-rw-r--r-- | src/plugins/studiowelcome/studiowelcomeplugin.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/plugins/studiowelcome/studiowelcomeplugin.cpp b/src/plugins/studiowelcome/studiowelcomeplugin.cpp index abdecb1180..b382bf1c76 100644 --- a/src/plugins/studiowelcome/studiowelcomeplugin.cpp +++ b/src/plugins/studiowelcome/studiowelcomeplugin.cpp @@ -259,21 +259,11 @@ void StudioWelcomePlugin::extensionsInitialized() bool StudioWelcomePlugin::delayedInitialize() { if (s_view.isNull()) - return true; + return false; QTC_ASSERT(s_view->rootObject() , return true); s_view->rootObject()->setProperty("loadingPlugins", false); - - QPointer<QQuickWidget> view = s_view; - - connect(Core::ICore::mainWindow()->windowHandle(), &QWindow::visibleChanged, this, [view](){ - if (!view.isNull()) { - view->close(); - view->deleteLater(); - } - }); - return false; } |