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

lp1890116: Fix import of external playlists #3017

Merged
merged 1 commit into from
Aug 15, 2020
Merged

lp1890116: Fix import of external playlists #3017

merged 1 commit into from
Aug 15, 2020

Conversation

uklotzde
Copy link
Contributor

https://bugs.launchpad.net/mixxx/+bug/1890116

Broken by 085af01

Affects all external playlist views, not only iTunes! bindValue() does not seem to work for CREATE TEMPORARY VIEW.

@uklotzde uklotzde added this to the 2.4.0 milestone Aug 14, 2020
@uklotzde
Copy link
Contributor Author

uklotzde commented Aug 15, 2020

Could someone please review this PR? It just reverts to the previous, string-formatting approach with some minor code improvements.

https://mixxx.discourse.group/t/mixx-2-2-4-build-2-2-r6798-itunes-playlist-names-show-up-but-tracks-dont/19778/4 The user reported a bug for 2.2.4, not 2.4.0.

Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

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

LGTM, thank you.

QSqlQuery query(m_database);
FieldEscaper f(m_database);
QString queryString =
const auto playlistIdNumber =
Copy link
Member

Choose a reason for hiding this comment

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

Personally, I think using auto instead of QString only saves 2 chars and makes it less apparent which type we're dealing with.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Arguing about individual cases is the wrong approach. The length of 'QString' should not matter, it could be any type. The usage of auto must not depend on how many characters it saves.

More appropriate rule: auto is allowed if the resulting type is immediately apparent from the right-hand-side expression.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case, it reduces redundancy, which is worth more than saving 2 characters ;)

Copy link
Member

Choose a reason for hiding this comment

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

Ok, then I'm fine with this.

@Holzhaus Holzhaus merged commit 208f97d into mixxxdj:master Aug 15, 2020
@uklotzde uklotzde deleted the lp1890116_external_playlist_view branch August 15, 2020 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants