Add sort columns to filter parser

Also pass the filter column enum through to filter tree instead of string.
This commit is contained in:
Jonas Kvinge
2026-01-17 23:18:01 +01:00
parent 3416ede211
commit 6f7b8ab162
7 changed files with 317 additions and 153 deletions

View File

@@ -1,8 +1,6 @@
/*
* Strawberry Music Player
* This file was part of Clementine.
* Copyright 2012, David Sansome <me@davidsansome.com>
* Copyright 2018-2024, Jonas Kvinge <jonas@jkvinge.net>
* Copyright 2018-2026, Jonas Kvinge <jonas@jkvinge.net>
*
* Strawberry is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,6 +23,7 @@
#include <QString>
#include "core/song.h"
#include "filtercolumn.h"
class FilterTree {
public:
@@ -45,7 +44,7 @@ class FilterTree {
virtual bool accept(const Song &song) const = 0;
protected:
static QVariant DataFromColumn(const QString &column, const Song &metadata);
static QVariant DataFromColumn(const FilterColumn filter_column, const Song &metadata);
private:
Q_DISABLE_COPY(FilterTree)