Permalink
Browse files

Fixed queue

There was a bug in queue filter while parsing lists of tags, the empty
tags were also added, so even if user didn't request any tags to be
filtered out or required, there was always empty string inserted to list,
which resulted in all edits being filtered out.
  • Loading branch information...
benapetr committed May 8, 2016
1 parent 3ba3312 commit 70be6684500076718eb0ae665196aa19e18b4946
Showing with 20 additions and 2 deletions.
  1. +20 −2 huggle/hugglequeuefilter.cpp
@@ -201,13 +201,31 @@ QString HuggleQueueFilter::GetRequiredTags_CommaSeparated() const
void HuggleQueueFilter::SetIgnoredTags_CommaSeparated(QString list)
{
this->IgnoreTags.clear();
this->IgnoreTags.append(list.split(","));
QList<QString> tags = list.split(",");
foreach(QString x, tags)
{
x = x.replace(" ", "").replace("\n", "");
if (!x.isEmpty())
{
// only use tags that contain something
this->IgnoreTags.append(x);
}
}
}
void HuggleQueueFilter::SetRequiredTags_CommaSeparated(QString list)
{
this->RequireTags.clear();
this->RequireTags.append(list.split(","));
QList<QString> tags = list.split(",");
foreach(QString x, tags)
{
x = x.replace(" ", "").replace("\n", "");
if (!x.isEmpty())
{
// only use tags that contain something
this->RequireTags.append(x);
}
}
}
bool HuggleQueueFilter::IgnoresNS(int ns)

0 comments on commit 70be668

Please sign in to comment.