Commit 86374726 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵

fix compilation warnings

parent f7245343
......@@ -104,6 +104,7 @@ void ModelDataLoader::loadData(ElisaUtils::PlayListEntryType dataType)
break;
case ElisaUtils::FileName:
case ElisaUtils::Unknown:
case ElisaUtils::Container:
break;
case ElisaUtils::Radio:
Q_EMIT allRadiosData(d->mDatabase->allRadiosData());
......@@ -138,6 +139,7 @@ void ModelDataLoader::loadDataByAlbumId(ElisaUtils::PlayListEntryType dataType,
case ElisaUtils::FileName:
case ElisaUtils::Unknown:
case ElisaUtils::Radio:
case ElisaUtils::Container:
break;
}
}
......@@ -164,6 +166,7 @@ void ModelDataLoader::loadDataByGenre(ElisaUtils::PlayListEntryType dataType, co
case ElisaUtils::FileName:
case ElisaUtils::Unknown:
case ElisaUtils::Radio:
case ElisaUtils::Container:
break;
}
}
......@@ -190,6 +193,7 @@ void ModelDataLoader::loadDataByArtist(ElisaUtils::PlayListEntryType dataType, c
case ElisaUtils::FileName:
case ElisaUtils::Unknown:
case ElisaUtils::Radio:
case ElisaUtils::Container:
break;
}
}
......@@ -217,6 +221,7 @@ void ModelDataLoader::loadDataByGenreAndArtist(ElisaUtils::PlayListEntryType dat
case ElisaUtils::FileName:
case ElisaUtils::Unknown:
case ElisaUtils::Radio:
case ElisaUtils::Container:
break;
}
}
......@@ -246,6 +251,7 @@ void ModelDataLoader::loadDataByDatabaseIdAndUrl(ElisaUtils::PlayListEntryType d
case ElisaUtils::Lyricist:
case ElisaUtils::FileName:
case ElisaUtils::Unknown:
case ElisaUtils::Container:
break;
}
}
......@@ -289,6 +295,7 @@ void ModelDataLoader::loadDataByUrl(ElisaUtils::PlayListEntryType dataType, cons
case ElisaUtils::Genre:
case ElisaUtils::Lyricist:
case ElisaUtils::Unknown:
case ElisaUtils::Container:
break;
}
}
......@@ -314,6 +321,7 @@ void ModelDataLoader::loadRecentlyPlayedData(ElisaUtils::PlayListEntryType dataT
case ElisaUtils::FileName:
case ElisaUtils::Unknown:
case ElisaUtils::Radio:
case ElisaUtils::Container:
break;
}
}
......@@ -339,6 +347,7 @@ void ModelDataLoader::loadFrequentlyPlayedData(ElisaUtils::PlayListEntryType dat
case ElisaUtils::FileName:
case ElisaUtils::Unknown:
case ElisaUtils::Radio:
case ElisaUtils::Container:
break;
}
}
......@@ -365,6 +374,7 @@ void ModelDataLoader::databaseTracksAdded(const ListTrackDataType &newData)
case ModelDataLoader::FilterType::FilterByArtist:
case ModelDataLoader::FilterType::FilterByRecentlyPlayed:
case ModelDataLoader::FilterType::FilterByFrequentlyPlayed:
case ModelDataLoader::FilterType::FilterByPath:
case ModelDataLoader::FilterType::UnknownFilter:
break;
}
......@@ -392,6 +402,7 @@ void ModelDataLoader::databaseArtistsAdded(const ListArtistDataType &newData)
case ModelDataLoader::FilterType::FilterById:
case ModelDataLoader::FilterType::FilterByRecentlyPlayed:
case ModelDataLoader::FilterType::FilterByFrequentlyPlayed:
case ModelDataLoader::FilterType::FilterByPath:
case ModelDataLoader::FilterType::UnknownFilter:
break;
}
......@@ -432,12 +443,13 @@ void ModelDataLoader::databaseAlbumsAdded(const ListAlbumDataType &newData)
case ModelDataLoader::FilterType::FilterById:
case ModelDataLoader::FilterType::FilterByRecentlyPlayed:
case ModelDataLoader::FilterType::FilterByFrequentlyPlayed:
case ModelDataLoader::FilterType::FilterByPath:
case ModelDataLoader::FilterType::UnknownFilter:
break;
}
}
void ModelDataLoader::updateFileMetaData(const TrackDataType &trackDataType, const QUrl &url)
void ModelDataLoader::updateFileMetaData(const DataTypes::TrackDataType &trackDataType, const QUrl &url)
{
d->mFileWriter.writeAllMetaDataToFile(url, trackDataType);
}
......
......@@ -114,7 +114,7 @@ public Q_SLOTS:
void loadFrequentlyPlayedData(ElisaUtils::PlayListEntryType dataType);
void updateFileMetaData(const ModelDataLoader::TrackDataType &trackDataType, const QUrl &url);
void updateFileMetaData(const DataTypes::TrackDataType &trackDataType, const QUrl &url);
void updateSingleFileMetaData(const QUrl &url, DataTypes::ColumnsRoles role, const QVariant &data);
......
......@@ -149,6 +149,7 @@ QVariant DataModel::data(const QModelIndex &index, int role) const
case ElisaUtils::Lyricist:
case ElisaUtils::Composer:
case ElisaUtils::FileName:
case ElisaUtils::Container:
case ElisaUtils::Unknown:
break;
}
......@@ -174,6 +175,7 @@ QVariant DataModel::data(const QModelIndex &index, int role) const
case ElisaUtils::Composer:
case ElisaUtils::FileName:
case ElisaUtils::Radio:
case ElisaUtils::Container:
case ElisaUtils::Unknown:
break;
}
......@@ -197,6 +199,7 @@ QVariant DataModel::data(const QModelIndex &index, int role) const
case ElisaUtils::Lyricist:
case ElisaUtils::Composer:
case ElisaUtils::FileName:
case ElisaUtils::Container:
case ElisaUtils::Unknown:
break;
}
......@@ -231,6 +234,7 @@ QVariant DataModel::data(const QModelIndex &index, int role) const
case ElisaUtils::Lyricist:
case ElisaUtils::Composer:
case ElisaUtils::FileName:
case ElisaUtils::Container:
case ElisaUtils::Unknown:
break;
}
......@@ -257,6 +261,7 @@ QVariant DataModel::data(const QModelIndex &index, int role) const
case ElisaUtils::Lyricist:
case ElisaUtils::Composer:
case ElisaUtils::FileName:
case ElisaUtils::Container:
case ElisaUtils::Unknown:
break;
}
......@@ -277,6 +282,7 @@ QVariant DataModel::data(const QModelIndex &index, int role) const
case ElisaUtils::Genre:
case ElisaUtils::Lyricist:
case ElisaUtils::Composer:
case ElisaUtils::Container:
case ElisaUtils::Unknown:
result = QUrl{};
break;
......@@ -304,6 +310,7 @@ QVariant DataModel::data(const QModelIndex &index, int role) const
case ElisaUtils::Lyricist:
case ElisaUtils::Composer:
case ElisaUtils::FileName:
case ElisaUtils::Container:
case ElisaUtils::Unknown:
break;
}
......@@ -427,6 +434,7 @@ void DataModel::initializeModel(MusicListenersManager *manager, DatabaseInterfac
connect(this, &DataModel::needFrequentlyPlayedData,
d->mDataLoader, &ModelDataLoader::loadFrequentlyPlayedData);
break;
case ElisaUtils::FilterByPath:
case ElisaUtils::UnknownFilter:
break;
}
......@@ -461,6 +469,7 @@ void DataModel::askModelData()
case ElisaUtils::FilterByFrequentlyPlayed:
Q_EMIT needFrequentlyPlayedData(d->mModelType);
break;
case ElisaUtils::FilterByPath:
case ElisaUtils::UnknownFilter:
break;
}
......
......@@ -177,6 +177,8 @@ QVariant TrackMetadataModel::data(const QModelIndex &index, int role) const
case DataTypes::PlayFrequency:
case DataTypes::ElementTypeRole:
case DataTypes::FullDataRole:
case DataTypes::IsDirectoryRole:
case DataTypes::IsPlayListRole:
break;
}
break;
......@@ -256,6 +258,8 @@ QVariant TrackMetadataModel::data(const QModelIndex &index, int role) const
case DataTypes::PlayFrequency:
case DataTypes::ElementTypeRole:
case DataTypes::FullDataRole:
case DataTypes::IsDirectoryRole:
case DataTypes::IsPlayListRole:
break;
}
break;
......
......@@ -292,6 +292,7 @@ void MusicListenersManager::deleteElementById(ElisaUtils::PlayListEntryType entr
case ElisaUtils::Track:
case ElisaUtils::FileName:
case ElisaUtils::Unknown:
case ElisaUtils::Container:
break;
}
}
......
......@@ -225,6 +225,7 @@ void TracksListener::newEntryInList(qulonglong newDatabaseId,
case ElisaUtils::Lyricist:
case ElisaUtils::Composer:
case ElisaUtils::Unknown:
case ElisaUtils::Container:
break;
}
}
......@@ -275,6 +276,7 @@ void TracksListener::newUrlInList(const QUrl &entryUrl, ElisaUtils::PlayListEntr
case ElisaUtils::Composer:
case ElisaUtils::Genre:
case ElisaUtils::Unknown:
case ElisaUtils::Container:
break;
}
}
......
......@@ -9,7 +9,7 @@
#include <KI18n/KLocalizedString>
#include <QUrl>
#include <QStandardPaths>
#include <QDir>
class ViewsListDataPrivate
{
......@@ -93,7 +93,7 @@ public:
ViewManager::DelegateWithoutSecondaryText,
ViewManager::ViewHideRating,
ViewManager::IsFlatModel,
QUrl::fromLocalFile(QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first())
QUrl::fromLocalFile(QDir::homePath())
},
{{i18nc("Title of the file radios browser view", "Radios")},
QUrl{QStringLiteral("image://icon/radio")},
......
......@@ -89,7 +89,7 @@ public:
, mModelType(modelType)
, mFilterType(filterType)
, mDataType(dataType)
, mFallbackItemIcon(fallbackItemIcon)
, mFallbackItemIcon(std::move(fallbackItemIcon))
, mShowSecondaryTextOnDelegates(showSecondaryTextOnDelegates)
, mViewCanBeRated(viewCanBeRated)
, mIsTreeModel(isTreeModel)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment