vscode-qt-tools icon indicating copy to clipboard operation
vscode-qt-tools copied to clipboard

Online help for methods

Open srcejon opened this issue 2 years ago • 2 comments
trafficstars

Currently, the Qt: Online help seems to work for classes, but not for methods. For example, if I highlight mid in the following code:

QString a;
a.mid(3);

Then select Qt: Online help, I get 404 - Page Not Found because the URL it opens is:

https://doc.qt.io/qt-5/mid.html

Whereas it should be:

https://doc.qt.io/qt-5/qstring.html#mid

I don't know how this Qt plugin works, but it obviously can't work out that URL just by looking at the highlighted text, as that doesn't include QString at all.

However, Intellisense does know exactly which method is being referred to:

image

Is there a way to hook in to Intellisense to get the info needed to create the correct URL?

srcejon avatar Jun 06 '23 10:06 srcejon

Hi @srcejon,

you are right, currently it is really just append the selection to the url.

AFAIK I can not access the highlight primitives or the Intellisense Infos from another extension, so I would need to parse it myself.

I've opened a discussion to get a feeling how to impl. that.

I've added https://github.com/tonka3000/vscode-qt-tools/labels/feature for now.

tonka3000 avatar Jun 07 '23 10:06 tonka3000

Hi @srcejon,

it seems that there is no way to get the information. I checked vscode.executeDocumentSymbolProvider and cpptools-api but non of them provider the required information.

tonka3000 avatar Jun 11 '23 10:06 tonka3000