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

Respect build options in ExportProjectDialog #3714

Merged
merged 4 commits into from Jul 26, 2017

Conversation

Projects
None yet
3 participants
@irrenhaus3
Contributor

irrenhaus3 commented Jul 21, 2017

Addresses issue #3713 by implementing a workaround on the existing hard-coded ordering. This is obviously not the optimal solution because the core problem is the hard-coded ordering itself.

@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jul 21, 2017

Member

Do not have a hard-coded order at all

This seems like the best solution.

Member

tresf commented Jul 21, 2017

Do not have a hard-coded order at all

This seems like the best solution.

Show outdated Hide outdated src/gui/ExportProjectDialog.cpp Outdated
Use QItem user data instead of hard ordering to identify export forma…
…t in ExportProjectDialog

For compatibility with QVariant, ExportFileFormats is now explicitly an int.
@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jul 21, 2017

Member

@irrenhaus3 this is very clean, thank you. Can you please reformat the code to use tabs instead of spaces? Sorry for the inconvenience.

Member

tresf commented Jul 21, 2017

@irrenhaus3 this is very clean, thank you. Can you please reformat the code to use tabs instead of spaces? Sorry for the inconvenience.

@PhysSong

This comment has been minimized.

Show comment
Hide comment
@PhysSong

PhysSong Jul 25, 2017

Member

@irrenhaus3 @tresf Did you test it for every configuration?

Member

PhysSong commented Jul 25, 2017

@irrenhaus3 @tresf Did you test it for every configuration?

@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jul 25, 2017

Member

I did not test this PR at all.

Member

tresf commented Jul 25, 2017

I did not test this PR at all.

@irrenhaus3

This comment has been minimized.

Show comment
Hide comment
@irrenhaus3

irrenhaus3 Jul 25, 2017

Contributor

@PhysSong @tresf I didn't test it for every configuration, just for (OGG enabled, MP3 disabled) and (both enabled). However, this PR specifically removes the need to check these configurations in the UI code and replaces them with runtime checks on whatever is available after this initialization: https://github.com/irrenhaus3/lmms/blob/6368bf1c886b961cbafe168c5d650eede62eb980/src/core/ProjectRenderer.cpp#L39
It should therefore work for any arbitrary flag configuration and continue to work when new flags are added in the future.

Contributor

irrenhaus3 commented Jul 25, 2017

@PhysSong @tresf I didn't test it for every configuration, just for (OGG enabled, MP3 disabled) and (both enabled). However, this PR specifically removes the need to check these configurations in the UI code and replaces them with runtime checks on whatever is available after this initialization: https://github.com/irrenhaus3/lmms/blob/6368bf1c886b961cbafe168c5d650eede62eb980/src/core/ProjectRenderer.cpp#L39
It should therefore work for any arbitrary flag configuration and continue to work when new flags are added in the future.

@PhysSong

This comment has been minimized.

Show comment
Hide comment
@PhysSong

PhysSong Jul 26, 2017

Member

I'll do a final test and merge it soon. Thanks for your work, @irrenhaus3!

Member

PhysSong commented Jul 26, 2017

I'll do a final test and merge it soon. Thanks for your work, @irrenhaus3!

@PhysSong

This comment has been minimized.

Show comment
Hide comment
@PhysSong

PhysSong Jul 26, 2017

Member

Tested and works good. I'll merge it soon if there's no objection.

Member

PhysSong commented Jul 26, 2017

Tested and works good. I'll merge it soon if there's no objection.

@PhysSong PhysSong merged commit c8af34a into LMMS:master Jul 26, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

PhysSong added a commit that referenced this pull request Jul 27, 2017

Respect build options in export dialogs (#3714)
* Respect build options in ExportProjectDialog

* Use QItem user data instead of hard ordering to identify export format in ExportProjectDialog

* For compatibility with QVariant, ExportFileFormats is now explicitly an int.

* Don't break out of format identifier loop prematurely in Song export.
@PhysSong

This comment has been minimized.

Show comment
Hide comment
@PhysSong

PhysSong Jul 27, 2017

Member

Backported via b83c1bd.

Member

PhysSong commented Jul 27, 2017

Backported via b83c1bd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment