Commit 86b998d6 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵

fixes warnings reported by clazy

parent 56540d6a
......@@ -37,7 +37,7 @@ public Q_SLOTS:
return;
}
mArguments = arguments;
mArguments = std::move(arguments);
Q_EMIT argumentsChanged();
}
private:
......
......@@ -110,7 +110,7 @@ void AbstractMediaProxyModel::connectPlayList()
mPlayList, static_cast<void(MediaPlayListProxyModel::*)(const DataTypes::EntryDataList&, ElisaUtils::PlayListEnqueueMode, ElisaUtils::PlayListEnqueueTriggerPlay)>(&MediaPlayListProxyModel::enqueue));
}
}
void AbstractMediaProxyModel::genericEnqueueToPlayList(QModelIndex rootIndex,
void AbstractMediaProxyModel::genericEnqueueToPlayList(const QModelIndex &rootIndex,
ElisaUtils::PlayListEnqueueMode enqueueMode,
ElisaUtils::PlayListEnqueueTriggerPlay triggerPlay)
{
......@@ -128,12 +128,12 @@ void AbstractMediaProxyModel::genericEnqueueToPlayList(QModelIndex rootIndex,
});
}
void AbstractMediaProxyModel::enqueueToPlayList(QModelIndex rootIndex)
void AbstractMediaProxyModel::enqueueToPlayList(const QModelIndex &rootIndex)
{
genericEnqueueToPlayList(rootIndex, ElisaUtils::AppendPlayList, ElisaUtils::DoNotTriggerPlay);
}
void AbstractMediaProxyModel::replaceAndPlayOfPlayList(QModelIndex rootIndex)
void AbstractMediaProxyModel::replaceAndPlayOfPlayList(const QModelIndex &rootIndex)
{
genericEnqueueToPlayList(rootIndex, ElisaUtils::ReplacePlayList, ElisaUtils::TriggerPlay);
}
......
......@@ -65,9 +65,9 @@ public Q_SLOTS:
void setPlayList(MediaPlayListProxyModel* playList);
void enqueueToPlayList(QModelIndex rootIndex);
void enqueueToPlayList(const QModelIndex &rootIndex);
void replaceAndPlayOfPlayList(QModelIndex rootIndex);
void replaceAndPlayOfPlayList(const QModelIndex &rootIndex);
void enqueue(const DataTypes::MusicDataType &newEntry,
const QString &newEntryTitle,
......@@ -110,7 +110,7 @@ protected:
private:
void genericEnqueueToPlayList(QModelIndex rootIndex,
void genericEnqueueToPlayList(const QModelIndex &rootIndex,
ElisaUtils::PlayListEnqueueMode enqueueMode,
ElisaUtils::PlayListEnqueueTriggerPlay triggerPlay);
......
......@@ -82,7 +82,7 @@ void FileBrowserProxyModel::listRecursiveNewEntries(KIO::Job *job, const KIO::UD
}
}
void FileBrowserProxyModel::genericEnqueueToPlayList(QModelIndex rootIndex,
void FileBrowserProxyModel::genericEnqueueToPlayList(const QModelIndex &rootIndex,
ElisaUtils::PlayListEnqueueMode enqueueMode,
ElisaUtils::PlayListEnqueueTriggerPlay triggerPlay)
{
......@@ -106,7 +106,7 @@ void FileBrowserProxyModel::genericEnqueueToPlayList(QModelIndex rootIndex,
recursiveEnqueue();
}
void FileBrowserProxyModel::enqueueToPlayList(QModelIndex rootIndex)
void FileBrowserProxyModel::enqueueToPlayList(const QModelIndex &rootIndex)
{
genericEnqueueToPlayList(rootIndex,
ElisaUtils::AppendPlayList,
......@@ -137,7 +137,7 @@ void FileBrowserProxyModel::enqueue(const DataTypes::MusicDataType &newEntry,
recursiveEnqueue();
}
void FileBrowserProxyModel::replaceAndPlayOfPlayList(QModelIndex rootIndex)
void FileBrowserProxyModel::replaceAndPlayOfPlayList(const QModelIndex &rootIndex)
{
genericEnqueueToPlayList(rootIndex,
ElisaUtils::ReplacePlayList,
......
......@@ -64,9 +64,9 @@ public:
public Q_SLOTS:
void enqueueToPlayList(QModelIndex rootIndex);
void enqueueToPlayList(const QModelIndex &rootIndex);
void replaceAndPlayOfPlayList(QModelIndex rootIndex);
void replaceAndPlayOfPlayList(const QModelIndex &rootIndex);
void enqueue(const DataTypes::MusicDataType &newEntry,
const QString &newEntryTitle,
......@@ -105,7 +105,7 @@ private Q_SLOTS:
private:
void genericEnqueueToPlayList(QModelIndex rootIndex,
void genericEnqueueToPlayList(const QModelIndex &rootIndex,
ElisaUtils::PlayListEnqueueMode enqueueMode,
ElisaUtils::PlayListEnqueueTriggerPlay triggerPlay);
......
......@@ -403,7 +403,7 @@ QString ViewManager::buildViewId() const
const auto &entryTypeMetaEnum = QMetaEnum::fromType<ElisaUtils::PlayListEntryType>();
QString viewId;
for (const auto &oneView : d->mViewParametersStack) {
for (const auto &oneView : qAsConst(d->mViewParametersStack)) {
viewId += QString::fromLatin1(entryTypeMetaEnum.valueToKey(oneView.mDataType)) + QStringLiteral("::");
}
......
......@@ -281,7 +281,7 @@ void ViewsListData::setEmbeddedCategory(ElisaUtils::PlayListEntryType aEmbeddedV
}
}
void ViewsListData::genresAdded(DataTypes::ListGenreDataType newData)
void ViewsListData::genresAdded(const DataTypes::ListGenreDataType &newData)
{
if (d->mEmbeddedCategory != ElisaUtils::Genre) {
return;
......@@ -311,7 +311,7 @@ void ViewsListData::genresAdded(DataTypes::ListGenreDataType newData)
Q_EMIT isFullyInitializedChanged();
}
void ViewsListData::artistsAdded(DataTypes::ListArtistDataType newData)
void ViewsListData::artistsAdded(const DataTypes::ListArtistDataType &newData)
{
if (d->mEmbeddedCategory != ElisaUtils::Artist) {
return;
......@@ -359,7 +359,7 @@ void ViewsListData::artistRemoved(qulonglong removedDatabaseId)
}
}
void ViewsListData::albumsAdded(DataTypes::ListAlbumDataType newData)
void ViewsListData::albumsAdded(const DataTypes::ListAlbumDataType &newData)
{
if (d->mEmbeddedCategory != ElisaUtils::Album) {
return;
......
......@@ -370,13 +370,13 @@ public Q_SLOTS:
void setDatabase(DatabaseInterface *aDatabase);
void genresAdded(DataTypes::ListGenreDataType newData);
void genresAdded(const DataTypes::ListGenreDataType &newData);
void artistsAdded(DataTypes::ListArtistDataType newData);
void artistsAdded(const DataTypes::ListArtistDataType &newData);
void artistRemoved(qulonglong removedDatabaseId);
void albumsAdded(DataTypes::ListAlbumDataType newData);
void albumsAdded(const DataTypes::ListAlbumDataType &newData);
void albumRemoved(qulonglong removedDatabaseId);
......
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