From 2533b7a5f02f7dbb7e60f1df97d1b37cebdc7d39 Mon Sep 17 00:00:00 2001 From: Orkun Tokdemir Date: Thu, 11 Apr 2024 16:27:22 +0200 Subject: [PATCH] Use Qt Widget Designer Name Change-Id: I6ef1b62e71927ced3c0be3af158f69d5b8ebc825 Reviewed-by: Joerg Bornemann --- package.json | 4 ++-- src/project.ts | 30 ++++++++++++++++-------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index fc963da..dcb1197 100644 --- a/package.json +++ b/package.json @@ -298,10 +298,10 @@ "description": "Do not ask for default Qt folder", "scope": "machine" }, - "vscode-qt-tools.customUiDesignerExePath": { + "vscode-qt-tools.customWidgetDesignerExePath": { "type": "string", "default": "", - "description": "Specify the custom Qt Designer executable path", + "description": "Specify the custom Qt Widget Designer executable path", "scope": "machine-overridable" } } diff --git a/src/project.ts b/src/project.ts index f3ea32c..e7a6c5d 100644 --- a/src/project.ts +++ b/src/project.ts @@ -32,13 +32,13 @@ export class Project { this._designerServer.getPort() ); } - const customUiDesignerExePath = vscode.workspace + const customWidgetDesignerExePath = vscode.workspace .getConfiguration('vscode-qt-tools', this._folder) - .get('customUiDesignerExePath'); - if (customUiDesignerExePath) { - if (this.checkCustomDesignerExePath(customUiDesignerExePath)) { + .get('customWidgetDesignerExePath'); + if (customWidgetDesignerExePath) { + if (this.checkCustomDesignerExePath(customWidgetDesignerExePath)) { this._designerClient = new DesignerClient( - customUiDesignerExePath, + customWidgetDesignerExePath, this._designerServer.getPort() ); } @@ -46,20 +46,20 @@ export class Project { vscode.workspace.onDidChangeConfiguration(async (event) => { if ( event.affectsConfiguration( - 'vscode-qt-tools.customUiDesignerExePath', + 'vscode-qt-tools.customWidgetDesignerExePath', this._folder ) ) { - const customUiDesignerExePathConfig = vscode.workspace + const customWidgetDesignerExePathConfig = vscode.workspace .getConfiguration('vscode-qt-tools', this._folder) - .get('customUiDesignerExePath'); + .get('customWidgetDesignerExePath'); if ( - customUiDesignerExePathConfig && - this.checkCustomDesignerExePath(customUiDesignerExePathConfig) + customWidgetDesignerExePathConfig && + this.checkCustomDesignerExePath(customWidgetDesignerExePathConfig) ) { this._designerClient?.detach(); this._designerClient = new DesignerClient( - customUiDesignerExePathConfig, + customWidgetDesignerExePathConfig, this._designerServer.getPort() ); } else { @@ -100,10 +100,12 @@ export class Project { return this._folder; } - private checkCustomDesignerExePath(customUiDesignerExePath: string) { - if (!fs.existsSync(customUiDesignerExePath)) { + private checkCustomDesignerExePath(customWidgetDesignerExePath: string) { + if (!fs.existsSync(customWidgetDesignerExePath)) { void vscode.window.showWarningMessage( - 'Qt Designer executable not found at:"' + customUiDesignerExePath + '"' + 'Qt Designer executable not found at:"' + + customWidgetDesignerExePath + + '"' ); return false; }