shared: Indexer: IndexResult: Introduce failedResults()
This commit is contained in:
parent
0867ab294d
commit
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
|
||||
|
Caricamento…
Fai riferimento in un nuovo problema
Block a user