Commit 2939cf61 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

use only QVector to hold sort related data

we do not use any extra feature from QStringList
parent 1c972dd7
......@@ -18,8 +18,8 @@ public:
QUrl imageUrl, ElisaUtils::PlayListEntryType dataType,
QAbstractItemModel *model, QAbstractProxyModel *associatedProxyModel,
QUrl viewDefaultIcon, DataTypes::DataType dataFilter,
int sortRole, QVector<int> sortRoles, QList<QString> sortRoleNames,
Qt::SortOrder sortOrder, QList<QString> sortOrderNames,
int sortRole, QVector<int> sortRoles, QVector<QString> sortRoleNames,
Qt::SortOrder sortOrder, QVector<QString> sortOrderNames,
ViewManager::ViewCanBeRated viewShowRating,
ViewManager::DelegateUseSecondaryText viewDelegateDisplaySecondaryText,
ViewManager::IsTreeModelType isTreeModel)
......@@ -49,8 +49,8 @@ public:
QUrl imageUrl, ElisaUtils::PlayListEntryType dataType,
QAbstractItemModel *model, QAbstractProxyModel *associatedProxyModel,
DataTypes::DataType dataFilter,
int sortRole, QVector<int> sortRoles, QList<QString> sortRoleNames,
Qt::SortOrder sortOrder, QList<QString> sortOrderNames,
int sortRole, QVector<int> sortRoles, QVector<QString> sortRoleNames,
Qt::SortOrder sortOrder, QVector<QString> sortOrderNames,
ViewManager::AlbumCardinality displaySingleAlbum,
ViewManager::AlbumViewStyle showDiscHeaders,
ViewManager::RadioSpecificStyle radioCase,
......@@ -106,11 +106,11 @@ public:
QVector<int> mSortRoles;
QList<QString> mSortRoleNames;
QVector<QString> mSortRoleNames;
Qt::SortOrder mSortOrder;
QList<QString> mSortOrderNames;
QVector<QString> mSortOrderNames;
ViewManager::AlbumCardinality mDisplaySingleAlbum;
......@@ -130,8 +130,8 @@ ViewConfigurationData::ViewConfigurationData(ElisaUtils::FilterType filterType,
QUrl imageUrl, ElisaUtils::PlayListEntryType dataType,
QAbstractItemModel *model, QAbstractProxyModel *associatedProxyModel,
QUrl viewDefaultIcon, DataTypes::DataType dataFilter,
int sortRole, QVector<int> sortRoles, QList<QString> sortRoleNames,
Qt::SortOrder sortOrder, QList<QString> sortOrderNames,
int sortRole, QVector<int> sortRoles, QVector<QString> sortRoleNames,
Qt::SortOrder sortOrder, QVector<QString> sortOrderNames,
ViewManager::ViewCanBeRated viewShowRating,
ViewManager::DelegateUseSecondaryText viewDelegateDisplaySecondaryText,
ViewManager::IsTreeModelType isTreeModel, QObject *parent)
......@@ -152,8 +152,8 @@ ViewConfigurationData::ViewConfigurationData(ElisaUtils::FilterType filterType,
QUrl imageUrl, ElisaUtils::PlayListEntryType dataType,
QAbstractItemModel *model, QAbstractProxyModel *associatedProxyModel,
DataTypes::DataType dataFilter,
int sortRole, QVector<int> sortRoles, QList<QString> sortRoleNames,
Qt::SortOrder sortOrder, QList<QString> sortOrderNames,
int sortRole, QVector<int> sortRoles, QVector<QString> sortRoleNames,
Qt::SortOrder sortOrder, QVector<QString> sortOrderNames,
ViewManager::AlbumCardinality displaySingleAlbum,
ViewManager::AlbumViewStyle showDiscHeaders,
ViewManager::RadioSpecificStyle radioCase,
......@@ -243,7 +243,7 @@ QVector<int> ViewConfigurationData::sortRoles() const
return d->mSortRoles;
}
QList<QString> ViewConfigurationData::sortRoleNames() const
QVector<QString> ViewConfigurationData::sortRoleNames() const
{
return d->mSortRoleNames;
}
......@@ -253,7 +253,7 @@ Qt::SortOrder ViewConfigurationData::sortOrder() const
return d->mSortOrder;
}
QList<QString> ViewConfigurationData::sortOrderNames() const
QVector<QString> ViewConfigurationData::sortOrderNames() const
{
return d->mSortOrderNames;
}
......
......@@ -87,7 +87,7 @@ class ELISALIB_EXPORT ViewConfigurationData : public QObject
READ sortRoles
CONSTANT)
Q_PROPERTY(QList<QString> sortRoleNames
Q_PROPERTY(QVector<QString> sortRoleNames
READ sortRoleNames
CONSTANT)
......@@ -95,7 +95,7 @@ class ELISALIB_EXPORT ViewConfigurationData : public QObject
READ sortOrder
CONSTANT)
Q_PROPERTY(QList<QString> sortOrderNames
Q_PROPERTY(QVector<QString> sortOrderNames
READ sortOrderNames
CONSTANT)
......@@ -119,8 +119,8 @@ public:
ElisaUtils::PlayListEntryType dataType, QAbstractItemModel *model,
QAbstractProxyModel *associatedProxyModel, QUrl viewDefaultIcon,
DataTypes::DataType dataFilter,
int sortRole, QVector<int> sortRoles, QList<QString> sortRoleNames,
Qt::SortOrder sortOrder, QList<QString> sortOrderNames,
int sortRole, QVector<int> sortRoles, QVector<QString> sortRoleNames,
Qt::SortOrder sortOrder, QVector<QString> sortOrderNames,
ViewManager::ViewCanBeRated viewShowRating,
ViewManager::DelegateUseSecondaryText viewDelegateDisplaySecondaryText,
ViewManager::IsTreeModelType isTreeModel, QObject *parent = nullptr);
......@@ -129,8 +129,8 @@ public:
QString mainTitle, QString secondaryTitle,
QUrl imageUrl, ElisaUtils::PlayListEntryType dataType, QAbstractItemModel *model,
QAbstractProxyModel *associatedProxyModel, DataTypes::DataType dataFilter,
int sortRole, QVector<int> sortRoles, QList<QString> sortRoleNames,
Qt::SortOrder sortOrder, QList<QString> sortOrderNames,
int sortRole, QVector<int> sortRoles, QVector<QString> sortRoleNames,
Qt::SortOrder sortOrder, QVector<QString> sortOrderNames,
ViewManager::AlbumCardinality displaySingleAlbum,
ViewManager::AlbumViewStyle showDiscHeaders, ViewManager::RadioSpecificStyle radioCase,
ViewManager::IsTreeModelType isTreeModel, QObject *parent = nullptr);
......@@ -167,11 +167,11 @@ public:
QVector<int> sortRoles() const;
QList<QString> sortRoleNames() const;
QVector<QString> sortRoleNames() const;
Qt::SortOrder sortOrder() const;
QList<QString> sortOrderNames() const;
QVector<QString> sortOrderNames() const;
ViewManager::AlbumCardinality displaySingleAlbum() const;
......
......@@ -56,8 +56,8 @@ public:
ViewManager::ModelType modelType,
ElisaUtils::FilterType filterType,
ElisaUtils::PlayListEntryType dataType,
int sortRole, QVector<int> sortRoles, QList<QString> sortRoleNames,
Qt::SortOrder sortOrder, QList<QString> sortOrderNames,
int sortRole, QVector<int> sortRoles, QVector<QString> sortRoleNames,
Qt::SortOrder sortOrder, QVector<QString> sortOrderNames,
QUrl fallbackItemIcon,
ViewManager::DelegateUseSecondaryText showSecondaryTextOnDelegates,
ViewManager::ViewCanBeRated viewCanBeRated,
......@@ -113,8 +113,8 @@ public:
ViewManager::ModelType modelType,
ElisaUtils::FilterType filterType,
ElisaUtils::PlayListEntryType dataType,
int sortRole, QVector<int> sortRoles, QList<QString> sortRoleNames,
Qt::SortOrder sortOrder, QList<QString> sortOrderNames,
int sortRole, QVector<int> sortRoles, QVector<QString> sortRoleNames,
Qt::SortOrder sortOrder, QVector<QString> sortOrderNames,
ViewManager::AlbumCardinality albumCardinality,
ViewManager::AlbumViewStyle albumViewStyle,
ViewManager::RadioSpecificStyle radioSpecificStyle,
......@@ -172,8 +172,8 @@ public:
qulonglong databaseId,
ElisaUtils::PlayListEntryType dataType,
ElisaUtils::PlayListEntryType entryType,
int sortRole, QVector<int> sortRoles, QList<QString> sortRoleNames,
Qt::SortOrder sortOrder, QList<QString> sortOrderNames,
int sortRole, QVector<int> sortRoles, QVector<QString> sortRoleNames,
Qt::SortOrder sortOrder, QVector<QString> sortOrderNames,
ViewManager::AlbumCardinality albumCardinality,
ViewManager::AlbumViewStyle albumViewStyle,
ViewManager::RadioSpecificStyle radioSpecificStyle,
......@@ -253,11 +253,11 @@ public:
QVector<int> mSortRoles = {Qt::DisplayRole};
QList<QString> mSortRoleNames = {QString{}};
QVector<QString> mSortRoleNames = {QString{}};
Qt::SortOrder mSortOrder = Qt::AscendingOrder;
QList<QString> mSortOrderNames = {QStringLiteral("A-Z"), QStringLiteral("Z-A")};
QVector<QString> mSortOrderNames = {QStringLiteral("A-Z"), QStringLiteral("Z-A")};
ViewManager::AlbumCardinality mAlbumCardinality = ViewManager::MultipleAlbum;
......
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