Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt autocomplete #666

Closed
opensw opened this issue Apr 27, 2017 · 3 comments
Closed

Qt autocomplete #666

opensw opened this issue Apr 27, 2017 · 3 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service

Comments

@opensw
Copy link

opensw commented Apr 27, 2017

Hello there,
for some reason I do not have any autocomplete on Qt types.

#include <qstring.h>

int main(int argc, char* argv[])
{
	QString str = "Hello world";
}

on str. Visual Studio Code does not show any methods, is there a workaround to fix it? The "Peek Definition" and "Go to Definition" commands work.

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Apr 27, 2017

I reproed the bug. Adding
#define Q_DECL_NOTHROW
#define Q_REQUIRED_RESULT
#define Q_ATTRIBUTE_FORMAT_PRINTF(arg1, arg2)
to cpp.hint fixes the issue (the file is located at the root of our extension folder so you could add it yourself if you want, and we'll update our version for the next release). Our parser code breaks when it encounters custom macro attributes at the end of a function declaration and uses #defines in cpp.hint to workaround it, so let us know if you find more we should add.

@opensw
Copy link
Author

opensw commented Apr 27, 2017

OK :)

Thank you

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label May 2, 2017
@bobbrow
Copy link
Member

bobbrow commented May 23, 2017

This is fixed in the Tag Parser in version 0.11.1. Please reopen if you continue to have this issue.

@bobbrow bobbrow closed this as completed May 23, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

3 participants