shared: Indexer: IndexResult: Introduce failedResults()

This commit is contained in:
Albert S. 2022-06-23 15:25:21 +02:00
szülő 0867ab294d
commit e99b2ba091

Fájl megtekintése

@ -22,19 +22,30 @@ class IndexResult
return addedPaths + skippedPaths + erroredPaths;
}
QVector<QString> failedPaths() const
QVector<FileScanResult> failedResults() const
{
QVector<QString> result;
QVector<FileScanResult> result;
std::for_each(results.begin(), results.end(),
[&result](FileScanResult res)
{
if(res.second == DBFAIL || res.second == PROCESSFAIL || res.second == NOTFOUND)
if(res.second == DBFAIL || res.second == PROCESSFAIL || res.second == NOTFOUND ||
res.second == NOACCESS)
{
result.append(res.first);
result.append(res);
}
});
return result;
}
QVector<QString> failedPaths() const
{
QVector<QString> result;
QVector<FileScanResult> results = failedResults();
std::for_each(results.begin(), results.end(), [&result](FileScanResult res) { result.append(res.first); });
return result;
}
};
class Indexer : public QObject