1
0
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:
David Sansome 2012-08-29 20:53:24 +01:00
parent cd6b1a2d7c
commit c4ae0209c6
2 changed files with 4 additions and 4 deletions

View File

@ -183,13 +183,13 @@ class FilterColumnTerm : public FilterTree {
class NotFilter : public FilterTree {
public:
explicit NotFilter(const FilterTree* inv) : child_(inv) {}
virtual ~NotFilter() { delete child_; }
virtual bool accept(int row, const QModelIndex& parent, const QAbstractItemModel* const model) const {
return !child_->accept(row, parent, model);
}
virtual FilterType type() { return Not; }
private:
const FilterTree* child_;
QScopedPointer<const FilterTree> child_;
};
class OrFilter : public FilterTree {
@ -224,7 +224,7 @@ class AndFilter : public FilterTree {
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)
{
}

View File

@ -64,7 +64,7 @@ class NopFilter : public FilterTree {
// col ::= "title" | "artist" | ...
class FilterParser {
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();