First of all you should not be using QList but rather QVector as it is more efficient in most cases. Unless you need QList because you interface with Qt API that expects it of course. Even then though QVector::toList would probably be better.
As for your problem, it can be one-liner in C++ as well:
QVector<Data> data{{"F1", "Id1", "Pass"}, //or QList<Data> if you really insist... {"F1", "Id1", "Pass"}, {"F1", "Id1", "Pass"}, {"F1", "Id2", "Fail"}, {"F1", "Id2", "Fail"}, {"F3", "Id3", "Pass"}, {"F3", "Id3", "Pass"}, {"F2", "Id4", "Pass"}, {"F2", "Id4", "Pass"}}; qDebug() << std::count_if(data.cbegin(), data.cend(), [](const Data &data) { return data.Feature == "F1" && data.Result == "Pass"; });
Prints 3.
Requires C++11 for the lambda but count_if itself does not.
To list all unique IDs that satisfy the condition it could still be a one-liner but it is starting to get messy:
QVector<Data> result; std::copy_if(data.cbegin(), data.cend(), std::back_inserter(result), [&result](const Data &data) { return std::find_if(result.cbegin(), result.cend(), [&data](const Data &d) { return d.Id == data.Id; }) == result.cend() && data.Feature == "F1" && data.Result == "Pass"; }); qDebug() << result.count();
1(only Id1 matches the criteria) or a map like[ Id1 -> 3](Id1 matches the criteria 3 times)