From b398aafcceed74781c7cdaa5f52700e66a45a7e8 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Wed, 16 Oct 2024 19:15:04 -0700 Subject: [PATCH] fix type links to qt docs --- src/config/io/helpers.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/config/io/helpers.ts b/src/config/io/helpers.ts index bf11098..7f8e361 100644 --- a/src/config/io/helpers.ts +++ b/src/config/io/helpers.ts @@ -131,7 +131,7 @@ export function getQMLTypeLink({ type, module, name, - //mtype, + mtype, mname, }: QMLTypeLinkObject) { if (type === "unknown") { @@ -139,15 +139,16 @@ export function getQMLTypeLink({ } const qtStart = "https://doc.qt.io/qt-6/"; const localStart = "/docs/types"; - const isSpecific = mname ? `#${mname}` : ""; const hashMap = { local: () => { + const isSpecific = mname ? `#${mname}` : ""; const localLink = `${localStart}/${module}/${name}${isSpecific}`; return localLink; }, qt: () => { - const qtLink = `${qtStart}${module!.toLowerCase().replace(".", "-")}-${name!.toLowerCase()}${isSpecific.toLowerCase()}.html`; + const isSpecific = mname ? `#${mname}-${mtype === "func" ? "method" : mtype}` : ""; + const qtLink = `${qtStart}${module!.toLowerCase().replace(".", "-")}-${name!.toLowerCase()}.html${isSpecific}`; return qtLink; }, self: () => {