Formatting
This commit is contained in:
parent
aa859b9002
commit
9327fd3aa1
@ -548,8 +548,9 @@ void CollectionModel::SongsDeleted(const SongList &songs) {
|
|||||||
if (node->parent != root_) parents << node->parent;
|
if (node->parent != root_) parents << node->parent;
|
||||||
|
|
||||||
// Maybe consider its divider node
|
// Maybe consider its divider node
|
||||||
if (node->container_level == 0)
|
if (node->container_level == 0) {
|
||||||
divider_keys << DividerKey(group_by_[0], node);
|
divider_keys << DividerKey(group_by_[0], node);
|
||||||
|
}
|
||||||
|
|
||||||
// Special case the Various Artists node
|
// Special case the Various Artists node
|
||||||
if (IsCompilationArtistNode(node)) {
|
if (IsCompilationArtistNode(node)) {
|
||||||
@ -1572,7 +1573,9 @@ void CollectionModel::FinishItem(const GroupBy type, const bool signal, const bo
|
|||||||
|
|
||||||
if (type == GroupBy_None) item->lazy_loaded = true;
|
if (type == GroupBy_None) item->lazy_loaded = true;
|
||||||
|
|
||||||
if (signal) endInsertRows();
|
if (signal) {
|
||||||
|
endInsertRows();
|
||||||
|
}
|
||||||
|
|
||||||
// Create the divider entry if we're supposed to
|
// Create the divider entry if we're supposed to
|
||||||
if (create_divider && show_dividers_) {
|
if (create_divider && show_dividers_) {
|
||||||
@ -1582,8 +1585,9 @@ void CollectionModel::FinishItem(const GroupBy type, const bool signal, const bo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!divider_key.isEmpty() && !divider_nodes_.contains(divider_key)) {
|
if (!divider_key.isEmpty() && !divider_nodes_.contains(divider_key)) {
|
||||||
if (signal)
|
if (signal) {
|
||||||
beginInsertRows(ItemToIndex(parent), parent->children.count(), parent->children.count());
|
beginInsertRows(ItemToIndex(parent), parent->children.count(), parent->children.count());
|
||||||
|
}
|
||||||
|
|
||||||
CollectionItem *divider = new CollectionItem(CollectionItem::Type_Divider, root_);
|
CollectionItem *divider = new CollectionItem(CollectionItem::Type_Divider, root_);
|
||||||
divider->key = divider_key;
|
divider->key = divider_key;
|
||||||
@ -1593,7 +1597,9 @@ void CollectionModel::FinishItem(const GroupBy type, const bool signal, const bo
|
|||||||
|
|
||||||
divider_nodes_[divider_key] = divider;
|
divider_nodes_[divider_key] = divider;
|
||||||
|
|
||||||
if (signal) endInsertRows();
|
if (signal) {
|
||||||
|
endInsertRows();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1776,8 +1782,9 @@ void CollectionModel::GetChildSongs(CollectionItem *item, QList<QUrl> *urls, Son
|
|||||||
QList<CollectionItem*> children = item->children;
|
QList<CollectionItem*> children = item->children;
|
||||||
std::sort(children.begin(), children.end(), std::bind(&CollectionModel::CompareItems, this, std::placeholders::_1, std::placeholders::_2));
|
std::sort(children.begin(), children.end(), std::bind(&CollectionModel::CompareItems, this, std::placeholders::_1, std::placeholders::_2));
|
||||||
|
|
||||||
for (CollectionItem *child : children)
|
for (CollectionItem *child : children) {
|
||||||
GetChildSongs(child, urls, songs, song_ids);
|
GetChildSongs(child, urls, songs, song_ids);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,11 @@
|
|||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
|
|
||||||
InternetService::InternetService(Song::Source source, const QString &name, const QString &url_scheme, const QString &settings_group, SettingsDialog::Page settings_page, Application *app, QObject *parent)
|
InternetService::InternetService(Song::Source source, const QString &name, const QString &url_scheme, const QString &settings_group, SettingsDialog::Page settings_page, Application *app, QObject *parent) :
|
||||||
: QObject(parent), app_(app), source_(source), name_(name), url_scheme_(url_scheme), settings_group_(settings_group), settings_page_(settings_page) {
|
QObject(parent),
|
||||||
}
|
app_(app),
|
||||||
|
source_(source),
|
||||||
|
name_(name),
|
||||||
|
url_scheme_(url_scheme),
|
||||||
|
settings_group_(settings_group),
|
||||||
|
settings_page_(settings_page) {}
|
||||||
|
@ -34,9 +34,8 @@
|
|||||||
PlaylistFilter::PlaylistFilter(QObject *parent)
|
PlaylistFilter::PlaylistFilter(QObject *parent)
|
||||||
: QSortFilterProxyModel(parent),
|
: QSortFilterProxyModel(parent),
|
||||||
filter_tree_(new NopFilter),
|
filter_tree_(new NopFilter),
|
||||||
query_hash_(0)
|
query_hash_(0) {
|
||||||
|
|
||||||
{
|
|
||||||
setDynamicSortFilter(true);
|
setDynamicSortFilter(true);
|
||||||
|
|
||||||
column_names_["title"] = Playlist::Column_Title;
|
column_names_["title"] = Playlist::Column_Title;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user