QDSNewDialog: Don't delete this QObject

Use deleteLater() instead.

Amends a850b1b866

Change-Id: Ib4e5f06b6a052a7bde1a9de45de4288b0ce44fe6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2023-05-03 08:18:18 +02:00
parent 43e3b41afd
commit 2a5f2961a7

View File

@@ -88,10 +88,10 @@ QdsNewDialog::QdsNewDialog(QWidget *parent)
m_dialog->installEventFilter(this);
QObject::connect(&m_wizard, &WizardHandler::wizardCreationFailed, this, [this]() {
QObject::connect(&m_wizard, &WizardHandler::wizardCreationFailed, this, [this] {
QMessageBox::critical(m_dialog, tr("New Project"), tr("Failed to initialize data."));
reject();
delete this;
deleteLater();
});
QObject::connect(m_styleModel.data(), &StyleModel::modelAboutToBeReset, this, [this]() {