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

woc #17

Closed
wants to merge 10 commits into from
Closed

woc #17

wants to merge 10 commits into from

Conversation

cEvolve05
Copy link

选做:歌词(丑,但能用

@@ -1,6 +1,6 @@
#include "Tools.h"

QString Tools::milsec2Time(quint64 milisec) {
QString Tools::milsec2Time(const quint64& milisec) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

it makes no sense to use const reference for number types.

@@ -5,7 +5,7 @@

struct Tools
{
static QString milsec2Time(quint64 milisec);
static QString milsec2Time(const quint64& milisec);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above.

src/ViewModel/NextUpViewModel.cpp Show resolved Hide resolved
break;
}
case PlayMode::Shuffle: {
// TODO
auto index = randomInt(0, model.count() - 1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, shuffle doesn't mean random in official clients.
But it's okey.

@@ -39,6 +39,8 @@ class OutputDeviceViewModel : public QAbstractListModel {
signals:
void currentIndexChanged();

//TODO: listen to system audio output device change
Copy link
Collaborator

Choose a reason for hiding this comment

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

Implement or not?

}

PlayingSongViewModel::~PlayingSongViewModel() {
save();
}

PlayingSongViewModel* PlayingSongViewModel::create(QQmlEngine*, QJSEngine*) {
return new PlayingSongViewModel();
return getInstance();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Call QQmlEngine::setObjectOwnership to set correct ownership, otherwise the object will be freed twice, causing crash when quitting the application.

}

// remove extra metadata
std::regex metaDataRegex(R"(\[by:.*?\])", std::regex_constants::ECMAScript);
Copy link
Collaborator

Choose a reason for hiding this comment

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

There may be more field names aside from by for lrc. How about them?

src/ViewModel/SongLyricViewModel.h Show resolved Hide resolved
@ArcticLampyrid ArcticLampyrid added this to the LessonWork milestone Feb 26, 2024
@Serein207 Serein207 reopened this Feb 26, 2024
@Serein207 Serein207 closed this Feb 28, 2024
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