shared: Indexer: IndexResult: Introduce failedResults()
This commit is contained in:
父節點
0867ab294d
當前提交
e99b2ba091
@ -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
|
||||
|
載入中…
新增問題並參考
Block a user