Skip to content

Commit

Permalink
qt-cpp: Do not show No CMake kit selected popup when on startup
Browse files Browse the repository at this point in the history
Fixes: VSCODEEXT-109
Change-Id: Ib565e7bbf13d4f44d94f0d67f14cdea3bc3214d5
Reviewed-by: Marcus Tillmanns <[email protected]>
  • Loading branch information
OrkunTokdemir committed Nov 29, 2024
1 parent 5826548 commit e2f85d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions qt-cpp/src/commands/register-qt-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion qt-cpp/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e2f85d5

Please sign in to comment.