forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user