diff options
| author | Orkun Tokdemir <orkun.tokdemir@qt.io> | 2024-10-02 17:04:35 +0200 |
|---|---|---|
| committer | Orkun Tokdemir <orkun.tokdemir@qt.io> | 2024-10-14 13:31:17 +0000 |
| commit | f958c7f7fe20533c5308a723aeee2b20ed09f301 (patch) | |
| tree | 67813f8556ae3b5189a7f6ca62b3a15ad71a23fb /qt-cpp | |
| parent | 18554f90beb62c1b4868fcb86ec99690711f1abe (diff) | |
qt-cpp: Check if the toolchain file exists
Change-Id: Idf48d31ab3c615d521125303d2ecaf774af91a47
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Diffstat (limited to 'qt-cpp')
| -rw-r--r-- | qt-cpp/src/kit-manager.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/qt-cpp/src/kit-manager.ts b/qt-cpp/src/kit-manager.ts index aa37091..6ad938b 100644 --- a/qt-cpp/src/kit-manager.ts +++ b/qt-cpp/src/kit-manager.ts @@ -299,8 +299,16 @@ export class KitManager { const isQt6 = version?.startsWith('6') ?? false; if (isQt6) { - kit.toolchainFile = path.join(libs, 'cmake', 'Qt6', `qt.toolchain.cmake`); + const toolchainFile = path.join(libs, 'cmake', 'Qt6', `qt.toolchain.cmake`); + if (!fsSync.existsSync(toolchainFile)) { + const warn = `Toolchain file not found: ${toolchainFile}`; + void vscode.window.showWarningMessage(warn); + logger.error(warn); + return undefined; + } + kit.toolchainFile = toolchainFile; } + const tempPath: string[] = []; for (const [key, value] of qtInfo.data) { if (key.startsWith('QMAKE_') || key === 'QT_VERSION' || !value) { |
