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

Only show the date in Date Added / Last Played columns #3945

Merged
merged 4 commits into from Jun 5, 2021

Conversation

ywwg
Copy link
Member

@ywwg ywwg commented Jun 4, 2021

This has annoyed me for a while -- I've never wanted to know what time of day I added a track, and the column itself says "date", not "datetime". This makes the columns much more manageable.

Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

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

Why not use the full date/time for the tooltip and only the date for regular cell content?

src/library/basetracktablemodel.cpp Outdated Show resolved Hide resolved
@ywwg
Copy link
Member Author

ywwg commented Jun 5, 2021

good idea! done.

@@ -625,7 +625,11 @@ QVariant BaseTrackTableModel::roleValue(
VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert<QDateTime>()) {
return QVariant();
}
return mixxx::localDateTimeFromUtc(rawValue.toDateTime());
QDateTime dt = mixxx::localDateTimeFromUtc(rawValue.toDateTime());
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to enclose the case block in a scope now, like the next one. C++ weirdness.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah yes of course

Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

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

Thank you, a really useful tweak! LGTM

@uklotzde uklotzde merged commit fb54bd0 into mixxxdj:main Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants