There is a lot of unaddressed ugliness (e.g. widget.widget everywhere) in this commit. I just started with moving QLabel into TextBase.widget. Then fixing failing tests one by one with the easiest solution (e.g. widget.widget); I even marked one test with xfail because I could not quickly figure out why it was failing.
My hope is to get a better feel for what belongs to QWidget and what belongs to TextBase (or its subclasses).
DISCLAIMER
Super duper WIP changes ahead.
I just want to see what problems arise when using composition over inheritance, as suggested by @The-Compiler in https://github.com/qutebrowser/qutebrowser/issues/7407#issue-1382023382.
There is a lot of unaddressed ugliness (e.g.
widget.widget
everywhere) in this commit. I just started with movingQLabel
intoTextBase.widget
. Then fixing failing tests one by one with the easiest solution (e.g.widget.widget
); I even marked one test withxfail
because I could not quickly figure out why it was failing.My hope is to get a better feel for what belongs to
QWidget
and what belongs toTextBase
(or its subclasses).Relates to #7407