mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 19:31:02 +01:00
Codereview comments from revision cd6b1a2d7c
This commit is contained in:
parent
cd6b1a2d7c
commit
c4ae0209c6
@ -183,13 +183,13 @@ class FilterColumnTerm : public FilterTree {
|
|||||||
class NotFilter : public FilterTree {
|
class NotFilter : public FilterTree {
|
||||||
public:
|
public:
|
||||||
explicit NotFilter(const FilterTree* inv) : child_(inv) {}
|
explicit NotFilter(const FilterTree* inv) : child_(inv) {}
|
||||||
virtual ~NotFilter() { delete child_; }
|
|
||||||
virtual bool accept(int row, const QModelIndex& parent, const QAbstractItemModel* const model) const {
|
virtual bool accept(int row, const QModelIndex& parent, const QAbstractItemModel* const model) const {
|
||||||
return !child_->accept(row, parent, model);
|
return !child_->accept(row, parent, model);
|
||||||
}
|
}
|
||||||
virtual FilterType type() { return Not; }
|
virtual FilterType type() { return Not; }
|
||||||
private:
|
private:
|
||||||
const FilterTree* child_;
|
QScopedPointer<const FilterTree> child_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OrFilter : public FilterTree {
|
class OrFilter : public FilterTree {
|
||||||
@ -224,7 +224,7 @@ class AndFilter : public FilterTree {
|
|||||||
QList<FilterTree*> children_;
|
QList<FilterTree*> children_;
|
||||||
};
|
};
|
||||||
|
|
||||||
FilterParser::FilterParser(const QString& filter, const QMap< QString, int >& columns, QSet< int > exact_cols)
|
FilterParser::FilterParser(const QString& filter, const QMap<QString, int>& columns, const QSet<int>& exact_cols)
|
||||||
: filterstring_(filter), columns_(columns), exact_columns_(exact_cols)
|
: filterstring_(filter), columns_(columns), exact_columns_(exact_cols)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ class NopFilter : public FilterTree {
|
|||||||
// col ::= "title" | "artist" | ...
|
// col ::= "title" | "artist" | ...
|
||||||
class FilterParser {
|
class FilterParser {
|
||||||
public:
|
public:
|
||||||
FilterParser(const QString& filter, const QMap<QString, int>& columns, QSet<int> exact_cols);
|
FilterParser(const QString& filter, const QMap<QString, int>& columns, const QSet<int>& exact_cols);
|
||||||
|
|
||||||
FilterTree* parse();
|
FilterTree* parse();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user