PE: Wizard - Do no open project file when selecting <None>

`JsonSummaryPage::updateProjectData` is called when the user selects the
desired target project to add new files.

When selecting `<None>` the desired project was not serialized in the
Wizard, and the initial project value was used.

Fixes: QTCREATORBUG-32184
Change-Id: I3972dc579db5c31464e5ddb4f4316907e7e9bd5f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2024-12-17 22:58:40 +01:00
parent 6ba42154f4
commit b27ed3dc41

View File

@@ -279,7 +279,9 @@ void JsonSummaryPage::updateProjectData(FolderNode *node)
m_wizard->setValue(QLatin1String(KEY_SELECTED_PROJECT), QVariant::fromValue(project));
m_wizard->setValue(QLatin1String(KEY_SELECTED_NODE), QVariant::fromValue(node));
m_wizard->setValue(QLatin1String(Constants::PROJECT_ISSUBPROJECT), node ? true : false);
m_wizard->setValue(Constants::PROJECT_ISSUBPROJECT, node ? true : false);
m_wizard->setValue(Constants::PREFERRED_PROJECT_NODE, QVariant::fromValue(node));
m_wizard->setValue(Constants::PREFERRED_PROJECT_NODE_PATH, node ? node->filePath().toString() : QString());
bool qtKeyWordsEnabled = true;
if (ProjectTree::hasNode(node)) {
const ProjectNode *projectNode = node->asProjectNode();