cppcheck icon indicating copy to clipboard operation
cppcheck copied to clipboard

avoid some (unnecessary) default parameters in GUI class constructors / added TODOs

Open firewave opened this issue 1 year ago • 8 comments

firewave avatar Apr 15 '24 18:04 firewave

I did not blindly add the parameters as it would change the behavior. This needs to be evaluated for each case if this was intentional or not.

firewave avatar Apr 15 '24 18:04 firewave

I think we should always pass settings if available, since that should only improve the results.

chrchr-github avatar Apr 15 '24 18:04 chrchr-github

I think we should always pass settings if available, since that should only improve the results.

Alright. Will do.

I was thinking about setting breakpoints to the lines where no options are being passed to be able to extract some test cases. But that can still be done.

firewave avatar Apr 15 '24 19:04 firewave

It turns out this has quite a ripple effect so we should probably do that in a separate PR.

firewave avatar Apr 15 '24 19:04 firewave

It turns out this has quite a ripple effect so we should probably do that in a separate PR.

See #6298.

firewave avatar Apr 16 '24 10:04 firewave

https://doc.qt.io/qt-6/qwidget.html#QWidget So there should be a noticeable difference in window behavior when passing a parent. Are those classes ever used as child windows?

chrchr-github avatar Apr 16 '24 10:04 chrchr-github

I will re-structure these PRs.

firewave avatar Apr 16 '24 13:04 firewave

So there should be a noticeable difference in window behavior when passing a parent. Are those classes ever used as child windows?

Spontanously I don't think so. We either always use the Qt classes with parent in a window. Or always as a window without parent. I vote to remove the default value.

danmar avatar Apr 18 '24 07:04 danmar