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

Spike: refactor disable/enable logic for statusbar widgets via composition #8240

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pylbrecht
Copy link
Collaborator

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
#7407 (comment).

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).


Relates to #7407

@pylbrecht pylbrecht force-pushed the statusbar-composition-spike branch 3 times, most recently from c761737 to 47aa461 Compare June 22, 2024 08:06
# 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
qutebrowser#7407 (comment).

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).
@pylbrecht pylbrecht force-pushed the statusbar-composition-spike branch from 47aa461 to 78c451b Compare June 22, 2024 10:03
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.

None yet

1 participant