aboutsummaryrefslogtreecommitdiffstats
path: root/qt-cpp
diff options
context:
space:
mode:
authorOrkun Tokdemir <orkun.tokdemir@qt.io>2024-12-13 13:41:16 +0100
committerOrkun Tokdemir <orkun.tokdemir@qt.io>2024-12-13 14:47:41 +0000
commit4acc9e68af4f1932e0fcd499aee3574e098de96e (patch)
treeb6b45f8dbf46b03f10298eaba240c6bdc36611d5 /qt-cpp
parentf7fa5e7812861967a91e51831528ca60e6a09756 (diff)
Enhance logging for coreAPI notifications and config initialization
* Improve logging for coreAPI notifications * Introduce `toString()` method for `QtWorkspaceConfigMessage` Change-Id: I7e82196ca641a93ea2a960230203fe21a38c8b4e Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Diffstat (limited to 'qt-cpp')
-rw-r--r--qt-cpp/src/project.ts18
1 files changed, 16 insertions, 2 deletions
diff --git a/qt-cpp/src/project.ts b/qt-cpp/src/project.ts
index 38e3550..b326642 100644
--- a/qt-cpp/src/project.ts
+++ b/qt-cpp/src/project.ts
@@ -78,6 +78,9 @@ export class CppProject implements Project {
selectedQtPaths
);
message.config.add('selectedQtPaths');
+ logger.info(
+ `Notifying coreAPI with message: ${message.toString()}`
+ );
coreAPI?.notify(message);
}
}
@@ -95,6 +98,9 @@ export class CppProject implements Project {
const message = new QtWorkspaceConfigMessage(this.folder);
coreAPI?.setValue(this.folder, 'buildDir', currentBuildDir);
message.config.add('buildDir');
+ logger.info(
+ `Notifying coreAPI with message: ${message.toString()}`
+ );
coreAPI?.notify(message);
}
}
@@ -109,7 +115,6 @@ export class CppProject implements Project {
}
const folder = this.folder;
const kit = await getSelectedKit(folder, true);
- const message = new QtWorkspaceConfigMessage(folder);
const selectedKitPath = kit ? getQtInsRoot(kit) : undefined;
logger.info(
`Setting selected kit path for ${folder.uri.fsPath} to ${selectedKitPath}`
@@ -117,9 +122,18 @@ export class CppProject implements Project {
coreAPI.setValue(folder, 'selectedKitPath', selectedKitPath);
const selectedQtPaths = kit ? getQtPathsExe(kit) : undefined;
coreAPI.setValue(folder, 'selectedQtPaths', selectedQtPaths);
+ logger.info(
+ `Setting selected Qt paths for ${folder.uri.fsPath} to ${selectedQtPaths}`
+ );
coreAPI.setValue(folder, 'workspaceType', QtWorkspaceType.CMakeExt);
+ logger.info(
+ `Setting workspace type for ${folder.uri.fsPath} to ${QtWorkspaceType.CMakeExt}`
+ );
coreAPI.setValue(folder, 'buildDir', this.buildDir);
- logger.info('Updating coreAPI with message:', message as unknown as string);
+ logger.info(
+ `Setting build directory for ${folder.uri.fsPath} to ${this.buildDir}`
+ );
+ logger.info('Config values initialized for:', folder.uri.fsPath);
}
public getStateManager() {
return this._stateManager;