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

Auto-complete friendly function prototypes #11

Closed
siavashserver opened this issue Aug 24, 2014 · 7 comments
Closed

Auto-complete friendly function prototypes #11

siavashserver opened this issue Aug 24, 2014 · 7 comments
Labels

Comments

@siavashserver
Copy link

Is it possible to mimic same behavior like glcorearb.h with GL_GLEXT_PROTOTYPES defined? Current implementation hides function prototypes and makes auto-complete feature of IDEs almost useless.

out

Thanks!

@BtbN
Copy link
Contributor

BtbN commented Nov 6, 2014

Which Version of QtCreator are you using?
I'm on a current git master build(close to version 3.3), and it resolves the macro correctly for me.
If you still experience this with the current stable version, i'd report a bug in QtCreator.

@Dav1dde
Copy link
Owner

Dav1dde commented Nov 6, 2014

Thanks for the input @BtbN I came to the conclusion that an IDE should be able to expand the macro, rather than bloating the header file more.

@Dav1dde Dav1dde closed this as completed Nov 6, 2014
@siavashserver
Copy link
Author

Which Version of QtCreator are you using?

I'm using QtCreator 3.2.2. (64bit build + Qt5 on ArchLinux).

I'm on a current git master build(close to version 3.3), and it resolves the macro correctly for me.

Today I tried the git version (v3.3.0.beta1.r156.g3f1deee) sometimes it works as expected for some random OGL functions as expected. In conclusion it's still broken. (tested on both Clang code model and QtCreator's built in)

People also do have same issue with GLEW:
http:https://qt-project.org/forums/viewthread/26215/

@siavashserver
Copy link
Author

Thanks for the input @BtbN I came to the conclusion that an IDE should be able to expand the macro, rather than bloating the header file more.

I do agree.

@hamoid
Copy link

hamoid commented Apr 25, 2018

Has anyone figured this one out? I'm now on QtCreator 4.6.0 and I see tooltips like this:
untitled
which is not very helpful as it is missing the variable names. If I ask in the Qt forum, how would you describe the problem?

@Dav1dde
Copy link
Owner

Dav1dde commented Apr 27, 2018

You can try to create a minimal example (without glad):

Something like this:

typedef void (PFNGLVIEWPORTPROC)(int x, int y, int width, int height);
GLAPI PFNGLVIEWPORTPROC glad_glViewport;
#define glViewport glad_glViewport

int main(void) {
    glViewport(0, 0, 0, 0);
    return 0;
}

In this example the completion should also not work (if it does it gets more complicated), then report it as error or ask in the forums. A description could be something along the lines of

function pointers do not show argument names when aliased using a #define macro

PS: Maybe this also happens for the function pointer it self glad_glViewport and is not related to the macro.

@hamoid
Copy link

hamoid commented May 1, 2018

@Dav1dde You're right: it also happens without the #define macro

qtcreator-with-glad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants