From 28927bb12be2f5624286e6bc7e57bf3893e8ba29 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 12 Jun 2025 13:30:24 +0200 Subject: [PATCH] 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 --- src/plugins/projectexplorer/projectwizardpage.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/projectwizardpage.cpp b/src/plugins/projectexplorer/projectwizardpage.cpp index e0316903c07..6021737e15a 100644 --- a/src/plugins/projectexplorer/projectwizardpage.cpp +++ b/src/plugins/projectexplorer/projectwizardpage.cpp @@ -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 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( wizard()->property(Constants::PROJECT_POINTER).value());