ProjectWizardPage: Fix warnings about disconnecting from destroyed()

Disconnect explicitily from connected signals.

The warnings were issued after pressing Next button on Kits page.

Change-Id: I9b265289034dd47917332c2b78033aeb5b47d6f0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2025-06-12 13:30:24 +02:00
parent 5730f13a74
commit 28927bb12b

View File

@@ -379,7 +379,8 @@ void ProjectWizardPage::initializeVersionControls()
// 2) Directory is managed and VCS does not support "Add" -> None available
// 3) Directory is not managed -> Offer all VCS that support "CreateRepository"
m_addToVersionControlComboBox->disconnect();
disconnect(m_addToVersionControlComboBox, &QComboBox::currentIndexChanged,
this, &ProjectWizardPage::versionControlChanged);
QList<IVersionControl *> versionControls = VcsManager::versionControls();
if (versionControls.isEmpty())
setVersionControlUiElementsVisible(false);
@@ -462,7 +463,8 @@ void ProjectWizardPage::initializeProjectTree(Node *context, const FilePaths &pa
IWizardFactory::WizardKind kind,
ProjectAction action, bool limitToSubproject)
{
m_projectComboBox->disconnect();
disconnect(m_projectComboBox, &QComboBox::currentIndexChanged,
this, &ProjectWizardPage::projectChanged);
Internal::BestNodeSelector selector(m_commonDirectory, paths);
Project *parentProject = static_cast<Project *>(
wizard()->property(Constants::PROJECT_POINTER).value<void *>());