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

qcustomplot: Fix clang warnings: overrides a member function but is not marked 'override' #188

Merged
merged 1 commit into from
Nov 30, 2016
Merged

qcustomplot: Fix clang warnings: overrides a member function but is not marked 'override' #188

merged 1 commit into from
Nov 30, 2016

Conversation

marco-m
Copy link
Contributor

@marco-m marco-m commented Nov 29, 2016

This happens with clang on at least OS X Sierra: tons of:

includes/contrib/qcustomplot.h:3301:18: warning:
     'selectTest' overrides a member function but is not marked 'override'
     [-Winconsistent-missing-override]

I understand this is 3rd party code so you might have preferred using the -Wno-inconsistent-missing-override at compile-time and leave the file un-modified, but since the warnings are in the header, one would have to disable the warnings for all the QSyncthingTray source files including this header. So, I went for the approach of adding the missing Q_DECL_OVERRIDE to the header file. If upstream fixes it, it will fix it in the same way, so there should be no conflicts.

This fix allows to build on OS X with 0 warnings, which is a good thing :-)

@sieren
Copy link
Owner

sieren commented Nov 29, 2016

@marco-m Thanks a lot for this! They annoyed me quite a bit as well. I originally planned on writing a few macros I'd put around the qcustomplot.h header include, but this will do for now :)
Thanks again! 👍

@sieren
Copy link
Owner

sieren commented Nov 29, 2016

Added an issue for this so I won't forget. Will merge once CI goes green.

@marco-m
Copy link
Contributor Author

marco-m commented Nov 29, 2016

Happy you like it!

@sieren sieren merged commit 84bdf27 into sieren:master Nov 30, 2016
@marco-m marco-m deleted the mark-virtual-as-override-2 branch December 1, 2016 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants