Skip to content

Commit

Permalink
Package: Use qt-official instead of qt
Browse files Browse the repository at this point in the history
Because `qt` is taken by another extension.

Change-Id: I882030efccbcd922084bb4572b453aa242074262
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
OrkunTokdemir committed May 22, 2024
1 parent 64fa1ac commit fd80ca7
Show file tree
Hide file tree
Showing 18 changed files with 132 additions and 106 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 42 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "qt",
"name": "qt-official",
"displayName": "Qt",
"description": "Qt Official Support",
"version": "0.9.0",
Expand Down Expand Up @@ -52,11 +52,11 @@
"onCommand:cmake.executableTargets",
"onCommand:cmake.buildKit",
"onCommand:cmake.tasksBuildCommand",
"onCommand:qt.kitDirectory",
"onCommand:qt.minGWgdb",
"onCommand:qt.natvis",
"onCommand:qt.natvis5",
"onCommand:qt.natvis6",
"onCommand:qt-official.kitDirectory",
"onCommand:qt-official.minGWgdb",
"onCommand:qt-official.natvis",
"onCommand:qt-official.natvis5",
"onCommand:qt-official.natvis6",
"onDebugResolve:cmake",
"onDebugInitialConfigurations",
"onDebugDynamicConfigurations:cmake",
Expand All @@ -71,38 +71,38 @@
"contributes": {
"commands": [
{
"command": "qt.registerQt",
"title": "%qt.command.registerQt.title%",
"command": "qt-official.registerQt",
"title": "%qt-official.command.registerQt.title%",
"category": "Qt"
},
{
"command": "qt.scanForQtKits",
"title": "%qt.command.scanForQtKits.title%",
"command": "qt-official.scanForQtKits",
"title": "%qt-official.command.scanForQtKits.title%",
"category": "Qt"
},
{
"command": "qt.resetQtExt",
"title": "%qt.command.resetQtExt.title%",
"command": "qt-official.resetQtExt",
"title": "%qt-official.command.resetQtExt.title%",
"category": "Qt"
},
{
"command": "qt.openSettings",
"title": "%qt.command.openSettings.title%",
"command": "qt-official.openSettings",
"title": "%qt-official.command.openSettings.title%",
"category": "Qt"
},
{
"command": "qt.documentationHomepage",
"title": "%qt.command.documentationHomepage.title%",
"command": "qt-official.documentationHomepage",
"title": "%qt-official.command.documentationHomepage.title%",
"category": "Qt"
},
{
"command": "qt.documentationSearchManually",
"title": "%qt.command.documentationSearchManually.title%",
"command": "qt-official.documentationSearchManually",
"title": "%qt-official.command.documentationSearchManually.title%",
"category": "Qt"
},
{
"command": "qt.documentationSearchForCurrentWord",
"title": "%qt.command.documentationSearchForCurrentWord.title%",
"command": "qt-official.documentationSearchForCurrentWord",
"title": "%qt-official.command.documentationSearchForCurrentWord.title%",
"category": "Qt"
}
],
Expand All @@ -112,16 +112,16 @@
"label": "cppdbg",
"configurationSnippets": [
{
"label": "%qt.debugger.cppdbg.snippet.label%",
"description": "%qt.debugger.cppdbg.snippet.description%",
"label": "%qt-official.debugger.cppdbg.snippet.label%",
"description": "%qt-official.debugger.cppdbg.snippet.description%",
"body": {
"name": "Debug Qt Application with cppdbg",
"type": "cppdbg",
"request": "launch",
"program": "^\"\\${command:cmake.launchTargetPath}\"",
"stopAtEntry": false,
"cwd": "^\"\\${workspaceFolder}\"",
"visualizerFile": "^\"\\${command:qt.natvis}\"",
"visualizerFile": "^\"\\${command:qt-official.natvis}\"",
"showDisplayString": true,
"linux": {
"MIMode": "gdb",
Expand All @@ -134,25 +134,25 @@
"environment": [
{
"name": "PATH",
"value": "^\"\\${env:PATH};\\${command:qt.kitDirectory}\\${/}bin\""
"value": "^\"\\${env:PATH};\\${command:qt-official.kitDirectory}\\${/}bin\""
}
],
"MIMode": "gdb",
"miDebuggerPath": "^\"\\${command:qt.minGWgdb}\""
"miDebuggerPath": "^\"\\${command:qt-official.minGWgdb}\""
}
}
},
{
"label": "%qt.debugger.lldb.snippet.label%",
"description": "%qt.debugger.lldb.snippet.description%",
"label": "%qt-official.debugger.lldb.snippet.label%",
"description": "%qt-official.debugger.lldb.snippet.description%",
"body": {
"name": "Debug Qt Application with lldb",
"type": "cppdbg",
"request": "launch",
"program": "^\"\\${command:cmake.launchTargetPath}\"",
"stopAtEntry": false,
"cwd": "^\"\\${workspaceFolder}\"",
"visualizerFile": "^\"\\${command:qt.natvis}\"",
"visualizerFile": "^\"\\${command:qt-official.natvis}\"",
"showDisplayString": true,
"linux": {
"MIMode": "lldb",
Expand All @@ -165,42 +165,42 @@
"environment": [
{
"name": "PATH",
"value": "^\"\\${env:PATH};\\${command:qt.kitDirectory}\\${/}bin\""
"value": "^\"\\${env:PATH};\\${command:qt-official.kitDirectory}\\${/}bin\""
}
],
"MIMode": "lldb"
}
}
},
{
"label": "%qt.debugger.cppvsdbg.snippet.label%",
"description": "%qt.debugger.cppvsdbg.snippet.description%",
"label": "%qt-official.debugger.cppvsdbg.snippet.label%",
"description": "%qt-official.debugger.cppvsdbg.snippet.description%",
"body": {
"name": "Debug Qt Application with Visual Studio Debugger",
"type": "cppvsdbg",
"request": "launch",
"program": "^\"\\${command:cmake.launchTargetPath}\"",
"stopAtEntry": false,
"cwd": "^\"\\${workspaceFolder}\"",
"visualizerFile": "^\"\\${command:qt.natvis}\"",
"visualizerFile": "^\"\\${command:qt-official.natvis}\"",
"windows": {
"environment": [
{
"name": "PATH",
"value": "^\"\\${env:PATH};\\${command:qt.kitDirectory}\\${/}bin\""
"value": "^\"\\${env:PATH};\\${command:qt-official.kitDirectory}\\${/}bin\""
}
]
}
}
},
{
"label": "%qt.debugger.wasm.snippet.label%",
"description": "%qt.debugger.wasm.snippet.description%",
"label": "%qt-official.debugger.wasm.snippet.label%",
"description": "%qt-official.debugger.wasm.snippet.description%",
"body": {
"name": "Debug Qt WebAssembly Application",
"type": "chrome",
"request": "launch",
"url": "^\"http://localhost:3000/\\${command:qt.buildDirectoryName}/\\${command:qt.launchTargetFilenameWithoutExtension}.html\"",
"url": "^\"http://localhost:3000/\\${command:qt-official.buildDirectoryName}/\\${command:qt-official.launchTargetFilenameWithoutExtension}.html\"",
"preLaunchTask": "Qt: WASM Start"
}
}
Expand All @@ -209,7 +209,7 @@
],
"customEditors": [
{
"viewType": "qt.uiEditor",
"viewType": "qt-official.uiEditor",
"displayName": "Qt UI Editor",
"extensions": [
".ui"
Expand Down Expand Up @@ -304,7 +304,7 @@
"path": "./res/lang/qrc/qrc.tmLanguage.json"
},
{
"scopeName": "qt.injection",
"scopeName": "qt-official.injection",
"path": "./res/lang/cpp/qt_cpp.injection.json",
"injectTo": [
"source.c",
Expand All @@ -321,25 +321,25 @@
"type": "object",
"title": "Qt Configuration",
"properties": {
"qt.qtFolder": {
"qt-official.qtFolder": {
"type": "string",
"default": "",
"description": "Specify the Qt folder",
"scope": "machine-overridable"
},
"qt.openOnlineDocumentationInExternalBrowser": {
"qt-official.openOnlineDocumentationInExternalBrowser": {
"type": "boolean",
"default": false,
"description": "Open online documentation in external browser",
"scope": "machine-overridable"
},
"qt.doNotAskForDefaultQtFolder": {
"qt-official.doNotAskForDefaultQtFolder": {
"type": "boolean",
"default": false,
"description": "Do not ask for default Qt folder",
"scope": "machine"
},
"qt.customWidgetDesignerExePath": {
"qt-official.customWidgetDesignerExePath": {
"type": "string",
"default": "",
"description": "Specify the custom Qt Widget Designer executable path",
Expand Down
32 changes: 16 additions & 16 deletions package.nls.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"qt.command.registerQt.title": "Register Qt Installation",
"qt.command.scanForQtKits.title": "Scan for Qt Kits",
"qt.command.pickQtInstallation.title": "Pick Default Qt Installation",
"qt.debugger.cppdbg.snippet.label": "Qt: Debug with cppdbg",
"qt.debugger.cppdbg.snippet.description": "Launch a Qt application with the cppdb debugger",
"qt.debugger.lldb.snippet.label": "Qt: Debug with lldb",
"qt.debugger.lldb.snippet.description": "Launch a Qt application with the lldb debugger",
"qt.debugger.cppvsdbg.snippet.label": "Qt: Debug with cppvsdbg (Windows)",
"qt.debugger.cppvsdbg.snippet.description": "Launch a Qt application with the Visual Studio Debugger",
"qt.command.resetQtExt.title": "Reset Qt Tools Extension State (For troubleshooting)",
"qt.debugger.wasm.snippet.label": "Qt: Debug Qt WASM with Chrome",
"qt.debugger.wasm.snippet.description": "Launch a Qt WebAssembly application with Chrome",
"qt.command.openSettings.title": "Open Qt Settings",
"qt.command.documentationHomepage.title": "Documentation: Open Homepage",
"qt.command.documentationSearchManually.title": "Documentation: Search",
"qt.command.documentationSearchForCurrentWord.title": "Documentation: Search for the current word"
"qt-official.command.registerQt.title": "Register Qt Installation",
"qt-official.command.scanForQtKits.title": "Scan for Qt Kits",
"qt-official.command.pickQtInstallation.title": "Pick Default Qt Installation",
"qt-official.debugger.cppdbg.snippet.label": "Qt: Debug with cppdbg",
"qt-official.debugger.cppdbg.snippet.description": "Launch a Qt application with the cppdb debugger",
"qt-official.debugger.lldb.snippet.label": "Qt: Debug with lldb",
"qt-official.debugger.lldb.snippet.description": "Launch a Qt application with the lldb debugger",
"qt-official.debugger.cppvsdbg.snippet.label": "Qt: Debug with cppvsdbg (Windows)",
"qt-official.debugger.cppvsdbg.snippet.description": "Launch a Qt application with the Visual Studio Debugger",
"qt-official.command.resetQtExt.title": "Reset Qt Tools Extension State (For troubleshooting)",
"qt-official.debugger.wasm.snippet.label": "Qt: Debug Qt WASM with Chrome",
"qt-official.debugger.wasm.snippet.description": "Launch a Qt WebAssembly application with Chrome",
"qt-official.command.openSettings.title": "Open Qt Settings",
"qt-official.command.documentationHomepage.title": "Documentation: Open Homepage",
"qt-official.command.documentationSearchManually.title": "Documentation: Search",
"qt-official.command.documentationSearchForCurrentWord.title": "Documentation: Search for the current word"
}
9 changes: 6 additions & 3 deletions src/commands/kit-directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import * as vscode from 'vscode';
import { getSelectedQtInstallationPath } from '@cmd/register-qt-path';

export function registerKitDirectoryCommand() {
return vscode.commands.registerCommand('qt.kitDirectory', async () => {
return getSelectedQtInstallationPath();
});
return vscode.commands.registerCommand(
'qt-official.kitDirectory',
async () => {
return getSelectedQtInstallationPath();
}
);
}
25 changes: 14 additions & 11 deletions src/commands/launch-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getFilenameWithoutExtension } from '@util/util';

export function registerlaunchTargetFilenameWithoutExtension() {
return vscode.commands.registerCommand(
'qt.launchTargetFilenameWithoutExtension',
'qt-official.launchTargetFilenameWithoutExtension',
async () => {
const launchTargetFilename = await vscode.commands.executeCommand<string>(
'cmake.launchTargetFilename'
Expand All @@ -22,14 +22,17 @@ export function registerlaunchTargetFilenameWithoutExtension() {
}

export function registerbuildDirectoryName() {
return vscode.commands.registerCommand('qt.buildDirectoryName', async () => {
const activeFolder = await vscode.commands.executeCommand<string>(
'cmake.activeFolderPath'
);
const buildDirectory = await vscode.commands.executeCommand<string>(
'cmake.buildDirectory',
activeFolder
);
return path.basename(buildDirectory);
});
return vscode.commands.registerCommand(
'qt-official.buildDirectoryName',
async () => {
const activeFolder = await vscode.commands.executeCommand<string>(
'cmake.activeFolderPath'
);
const buildDirectory = await vscode.commands.executeCommand<string>(
'cmake.buildDirectory',
activeFolder
);
return path.basename(buildDirectory);
}
);
}
5 changes: 4 additions & 1 deletion src/commands/mingw-gdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@ function locateToolsDir(selectedQtPath: string): string {
}

export function registerMinGWgdbCommand() {
return vscode.commands.registerCommand('qt.minGWgdb', findMinGWgdbPath);
return vscode.commands.registerCommand(
'qt-official.minGWgdb',
findMinGWgdbPath
);
}
24 changes: 16 additions & 8 deletions src/commands/natvis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const logger = createLogger('natvis');

export function registerNatvisCommand() {
const getNatvis = (version: string) => {
const extension = vscode.extensions.getExtension('theqtcompany.qt');
const extension = vscode.extensions.getExtension(
'theqtcompany.qt-official'
);
if (!extension) {
const error = 'Could not find the extension';
logger.error(error);
Expand All @@ -39,7 +41,7 @@ export function registerNatvisCommand() {
};

const natvisDisposal = vscode.commands.registerCommand(
'qt.natvis',
'qt-official.natvis',
async () => {
const selectedQtInstallation = await getSelectedQtInstallationPath();
if (!selectedQtInstallation) {
Expand All @@ -51,12 +53,18 @@ export function registerNatvisCommand() {
return getNatvis(qtVersion);
}
);
const natvis5Disposal = vscode.commands.registerCommand('qt.natvis5', () => {
return getNatvis('5');
});
const natvis6Disposal = vscode.commands.registerCommand('qt.natvis6', () => {
return getNatvis('6');
});
const natvis5Disposal = vscode.commands.registerCommand(
'qt-official.natvis5',
() => {
return getNatvis('5');
}
);
const natvis6Disposal = vscode.commands.registerCommand(
'qt-official.natvis6',
() => {
return getNatvis('6');
}
);

return [natvisDisposal, natvis5Disposal, natvis6Disposal];
}
4 changes: 2 additions & 2 deletions src/commands/navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import * as vscode from 'vscode';

export function registerOpenSettingsCommand() {
return vscode.commands.registerCommand('qt.openSettings', () => {
return vscode.commands.registerCommand('qt-official.openSettings', () => {
void vscode.commands.executeCommand(
'workbench.action.openSettings',
'@ext:theqtcompany.qt'
'@ext:theqtcompany.qt-official'
);
});
}
Loading

0 comments on commit fd80ca7

Please sign in to comment.