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

"emit" function names conflict with Qt macro #4

Closed
ngugcx opened this issue Mar 23, 2020 · 5 comments
Closed

"emit" function names conflict with Qt macro #4

ngugcx opened this issue Mar 23, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@ngugcx
Copy link

ngugcx commented Mar 23, 2020

There are many compilation errors when used with Qt.
I guess emit function names conflict with the Qt macro emit.

[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/Handler.h(59): error C2143: syntax error: missing ')' before 'const'
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/Handler.h(59): error C2143: syntax error: missing ';' before 'const'
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/Handler.h(59): error C2838: 'memory_buffer': illegal qualified name in member declaration
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/Handler.h(59): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/Handler.h(60): error C3646: 'log_record_timestamp': unknown override specifier
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/Handler.h(60): error C2059: syntax error: ')'
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/Handler.h(60): error C2838: 'nanoseconds': illegal qualified name in member declaration
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/StreamHandler.h(32): error C2143: syntax error: missing ')' before 'const'
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/StreamHandler.h(32): error C2143: syntax error: missing ';' before 'const'
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/StreamHandler.h(32): error C2838: 'memory_buffer': illegal qualified name in member declaration
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/StreamHandler.h(32): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/StreamHandler.h(32): error C3646: 'log_record_timestamp': unknown override specifier
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/StreamHandler.h(32): error C2059: syntax error: ')'
[build] D:\tests\cmaketest\quill\quill\include\quill/handlers/StreamHandler.h(32): error C2838: 'nanoseconds': illegal qualified name in member declaration
@odygrd
Copy link
Owner

odygrd commented Mar 25, 2020

Hello,

Thanks for reporting.
I have never used Qt, could you please give me more information and I will try to reproduce. What operating system and Qt version are you using ?

Thanks

@ngugcx
Copy link
Author

ngugcx commented Mar 25, 2020

I use Windows 10 and Qt 5.6.3.
The OS or Qt version doesn't matter, you can use any OS or Qt version. By default, Qt uses three keywords: "slots", "signals" and "emit" because of its special signal / slot mechanism, try not to use them in public interfaces。

@odygrd odygrd added the enhancement New feature or request label Mar 25, 2020
@odygrd odygrd self-assigned this Mar 25, 2020
@odygrd
Copy link
Owner

odygrd commented Mar 25, 2020

Thanks, I will look into it and add support for Qt

@odygrd
Copy link
Owner

odygrd commented Apr 12, 2020

Hello,
I have renamed emit but I didn't have time to look into testing it with Qt and adding proper support but I am planning to do so soon.

@odygrd
Copy link
Owner

odygrd commented Apr 19, 2020

I have installed Qt on windows and I was able to compile and run the examples. Thanks for reporting.

@odygrd odygrd closed this as completed Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants