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

Serato Cue refactorings #11467

Merged
merged 8 commits into from
May 3, 2023
Merged

Serato Cue refactorings #11467

merged 8 commits into from
May 3, 2023

Conversation

daschuer
Copy link
Member

This is a collection of small refactorings on top of: #11466
They have been discovered while debugging #11283
See commits.

src/widget/wcuemenupopup.cpp Outdated Show resolved Hide resolved
Comment on lines -200 to -202
bool CueDAO::deleteCue(Cue* cue) const {
//qDebug() << "CueDAO::deleteCue" << QThread::currentThread() << m_database.connectionName();
if (!cue->getId().isValid()) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't see a good reason to delete this honestly.

Copy link
Member Author

Choose a reason for hiding this comment

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

The reason is that it is no longer used.

Copy link
Member

Choose a reason for hiding this comment

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

But is there no valid usecase for it to be used? What is gained from removing the code?

Copy link
Member Author

Choose a reason for hiding this comment

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

It improved compile time and the time of developers for reading and understanding the class.

Copy link
Member

Choose a reason for hiding this comment

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

The improvements in compile time are utterly negligible. This will only cause confusions for developers when they see a class that can save a cue, but not delete it. The interface is incomplete and thus confusing.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was a private function. The intended use is to use of this class is to use it via the track with all cues at once.

Copy link
Member

Choose a reason for hiding this comment

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

Fine, then lets hope nobody will need this in the future then.

src/track/cueinfoimporter.h Outdated Show resolved Hide resolved
src/track/track.cpp Outdated Show resolved Hide resolved
@daschuer
Copy link
Member Author

daschuer commented May 2, 2023

I have rebase the faulty edits out. I hope that was OK. Nothing else has been changed.

@uklotzde
Copy link
Contributor

uklotzde commented May 3, 2023

QA: Please fix obvious typos in PR titles. Otherwise you won't be able to find closed issues or PRs when searching for "serato".

@daschuer daschuer changed the title Searto Cue refactorings Serato Cue refactorings May 3, 2023
Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

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

LGTM

@Swiftb0y Swiftb0y merged commit b192242 into mixxxdj:2.3 May 3, 2023
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.

3 participants