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

Add support for the battery widget on BSD systems (via upower) #2147

Merged
merged 1 commit into from
Jun 8, 2019

Conversation

rrrapha
Copy link
Contributor

@rrrapha rrrapha commented Jun 6, 2019

upower is available on all major BSDs, so batterlinux.cpp can be used for them.

return new BatteryWindows(parent);
#elif defined(Q_OS_MAC)
return new BatteryMac(parent);
#else
return new BatteryLinux(parent);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made BatteryLinux the default here because otherwise we'd have to enumerate
Q_OS_LINUX, Q_OS_FREEBSD, Q_OS_OPENBSD and so on..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this pragmatic approach. If this should ever fail in the future we could add a more fine-grained distinction for the "other" OSes.

@uklotzde uklotzde added this to the 2.3.0 milestone Jun 8, 2019
@uklotzde
Copy link
Contributor

uklotzde commented Jun 8, 2019

Since there was no veto, let's merge it. LGTM, thank you.

@uklotzde uklotzde merged commit e6dfe21 into mixxxdj:master Jun 8, 2019
@rrrapha rrrapha deleted the battery-bsd branch June 10, 2019 10:29
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