diff --git a/qt-cpp/src/commands/register-qt-path.ts b/qt-cpp/src/commands/register-qt-path.ts index a644172..1e325fa 100644 --- a/qt-cpp/src/commands/register-qt-path.ts +++ b/qt-cpp/src/commands/register-qt-path.ts @@ -57,13 +57,18 @@ async function getSelectedKitName(folder?: vscode.WorkspaceFolder) { } return selectedKit; } -export async function getSelectedKit(folder?: vscode.WorkspaceFolder) { +export async function getSelectedKit( + folder?: vscode.WorkspaceFolder, + silent = false +) { if (folder === undefined) { folder = await getActiveFolder(); } const selectedKitName = await getSelectedKitName(folder); if (selectedKitName === undefined) { - askForKitSelection(); + if (!silent) { + askForKitSelection(); + } return undefined; } diff --git a/qt-cpp/src/extension.ts b/qt-cpp/src/extension.ts index a3bad17..9d0e645 100644 --- a/qt-cpp/src/extension.ts +++ b/qt-cpp/src/extension.ts @@ -109,7 +109,7 @@ export async function initCoreValues() { for (const project of projectManager.getProjects()) { const folder = project.folder; - const kit = await getSelectedKit(folder); + const kit = await getSelectedKit(folder, true); const message = new QtWorkspaceConfigMessage(folder); const selectedKitPath = kit ? getQtInsRoot(kit) : undefined; logger.info(