Use C++11 enum class

This commit is contained in:
Jonas Kvinge
2023-02-18 14:09:27 +01:00
parent e6c5f76872
commit dd72fb4ca5
237 changed files with 2915 additions and 2840 deletions

View File

@@ -62,12 +62,12 @@ void SongLoaderInserter::Load(Playlist *destination, int row, bool play_now, boo
SongLoader::Result ret = loader->Load(url);
if (ret == SongLoader::BlockingLoadRequired) {
if (ret == SongLoader::Result::BlockingLoadRequired) {
pending_.append(loader);
continue;
}
if (ret == SongLoader::Success) {
if (ret == SongLoader::Result::Success) {
songs_ << loader->songs();
}
else {
@@ -108,7 +108,7 @@ void SongLoaderInserter::LoadAudioCD(Playlist *destination, int row, bool play_n
QObject::connect(loader, &SongLoader::LoadAudioCDFinished, this, &SongLoaderInserter::AudioCDTagsLoaded);
qLog(Info) << "Loading audio CD...";
SongLoader::Result ret = loader->LoadAudioCD();
if (ret == SongLoader::Error) {
if (ret == SongLoader::Result::Error) {
if (loader->errors().isEmpty())
emit Error(tr("Error while loading audio CD."));
else {
@@ -175,7 +175,7 @@ void SongLoaderInserter::AsyncLoad() {
SongLoader::Result res = loader->LoadFilenamesBlocking();
task_manager_->SetTaskProgress(async_load_id, ++async_progress);
if (res == SongLoader::Error) {
if (res == SongLoader::Result::Error) {
for (const QString &error : loader->errors()) {
emit Error(error);
}