fix type links to qt docs
This commit is contained in:
		
							parent
							
								
									e20c5126f9
								
							
						
					
					
						commit
						b398aafcce
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -131,7 +131,7 @@ export function getQMLTypeLink({
 | 
				
			||||||
  type,
 | 
					  type,
 | 
				
			||||||
  module,
 | 
					  module,
 | 
				
			||||||
  name,
 | 
					  name,
 | 
				
			||||||
  //mtype,
 | 
					  mtype,
 | 
				
			||||||
  mname,
 | 
					  mname,
 | 
				
			||||||
}: QMLTypeLinkObject) {
 | 
					}: QMLTypeLinkObject) {
 | 
				
			||||||
  if (type === "unknown") {
 | 
					  if (type === "unknown") {
 | 
				
			||||||
| 
						 | 
					@ -139,15 +139,16 @@ export function getQMLTypeLink({
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  const qtStart = "https://doc.qt.io/qt-6/";
 | 
					  const qtStart = "https://doc.qt.io/qt-6/";
 | 
				
			||||||
  const localStart = "/docs/types";
 | 
					  const localStart = "/docs/types";
 | 
				
			||||||
  const isSpecific = mname ? `#${mname}` : "";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const hashMap = {
 | 
					  const hashMap = {
 | 
				
			||||||
    local: () => {
 | 
					    local: () => {
 | 
				
			||||||
 | 
					      const isSpecific = mname ? `#${mname}` : "";
 | 
				
			||||||
      const localLink = `${localStart}/${module}/${name}${isSpecific}`;
 | 
					      const localLink = `${localStart}/${module}/${name}${isSpecific}`;
 | 
				
			||||||
      return localLink;
 | 
					      return localLink;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    qt: () => {
 | 
					    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;
 | 
					      return qtLink;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    self: () => {
 | 
					    self: () => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue