Set CXX min version to C++11, fix of warnings
- Add `override` to virtual functions where needed - Add `static` to functions wthout definition - Replace `0` with `nullptr` where needed
hein |
Set CXX min version to C++11, fix of warnings
- Add `override` to virtual functions where needed - Add `static` to functions wthout definition - Replace `0` with `nullptr` where needed
Just cleaned up code, no changes yet
Lint OK |
No Unit Test Coverage |
This is nice, but it would be great to fix the other 20% of warnings it causes, too, otherwise it's a noisy build that hides more important warnings :)
Will do, though some issues with old phonon headers will remain...
I just wanted to make sure CMake & C++ std version bump is OK for us :)
Phew... that was interesting dive.
I guess this is now ready for review, @hein
In case you see other warnings I may have missed, please let me know.
src/config/preferences.cpp | ||
---|---|---|
379 | Make const. | |
src/config/warnings_config.cpp | ||
209 | warningDialogDefinitions should be const. Use either qAsConst or make const. | |
src/dbus.cpp | ||
242 | const | |
src/dcc/chat.cpp | ||
421 | Why do you need this if you have a default? | |
434 | Why do you need this if you have a default? | |
src/dcc/chatcontainer.cpp | ||
134 | Why do you need this if you have a default? | |
src/sound.cpp | ||
41 | weird new line. | |
src/statusbar.cpp | ||
67 | Weird new line | |
src/unicode.cpp | ||
58 | Why do you need this if you have a default? | |
src/viewer/channeloptionsdialog.cpp | ||
323 | This looks wrong. Should it be QString::number()? Or just QVariant()? I may be wrong... | |
src/viewer/ignore.h | ||
33 | ? | |
src/viewer/searchbar.cpp | ||
123 | const |
src/dcc/chat.cpp | ||
---|---|---|
421 | Clang complains about this an you asked to deal with all warnings so here it is :) The rationale behind this is if you want to extend enum then it will fall through to default case which is probably not what you want. I can remove this if you want. | |
434 | Replied above | |
src/dcc/chatcontainer.cpp | ||
134 | Replied above | |
src/sound.cpp | ||
41 | Fixed | |
src/statusbar.cpp | ||
67 | Fixed | |
src/unicode.cpp | ||
58 | Replied above | |
src/viewer/channeloptionsdialog.cpp | ||
323 | Well it was effectively the same in the old variant, i is QChar here... let me indicate this in a loop init to make it more clear. | |
src/viewer/ignore.h | ||
33 | Enums are implicitly 'int's, 1 << 31 is 0x80 00 00 00, 8 here sets highest possible bit of 'int' variable, which is a sign digit and it flips the sign. I figured out that we need just a big value for the Exception flag, so 30 would suffice. | |
src/viewer/searchbar.cpp | ||
123 | Done |
src/config/warnings_config.cpp | ||
---|---|---|
209 | But it's const... It looks like const struct {...} warningDialogDefinitions. Compiler gives me "duplicate const" warning if I try to add one between } and its name |
About those unreachable statements: Could you leave them in but comment them out? I have a feeling that was someone's poor attempt at leaving a TODO in ...