StudioWelcome: Always initialize new project dialog

If the SplashScreen was disabled the new factory was not registered.

Change-Id: I3ab04510c33cb4ccfd2d85d3059ecafcc41fa654
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2021-11-11 12:30:14 +01:00
committed by Tim Jenssen
parent 2d1e4bcc5f
commit 5cc183e0f7

View File

@@ -353,6 +353,10 @@ bool StudioWelcomePlugin::initialize(const QStringList &arguments, QString *erro
void StudioWelcomePlugin::extensionsInitialized()
{
Core::ModeManager::activateMode(m_welcomeMode->id());
// Enable QDS new project dialog
Core::ICore::setNewDialogFactory([](QWidget *parent) { return new QdsNewDialog(parent); });
if (Utils::CheckableMessageBox::shouldAskAgain(Core::ICore::settings(),
DO_NOT_SHOW_SPLASHSCREEN_AGAIN_KEY)) {
connect(Core::ICore::instance(), &Core::ICore::coreOpened, this, [this] {
@@ -370,8 +374,6 @@ void StudioWelcomePlugin::extensionsInitialized()
s_view->setSource(QUrl("qrc:/qml/splashscreen/main.qml"));
#endif
// disabled by default
Core::ICore::setNewDialogFactory([](QWidget *parent) { return new QdsNewDialog(parent); });
QTC_ASSERT(s_view->rootObject(),
qWarning() << "The StudioWelcomePlugin has a runtime depdendency on "