Update inotify-index.cpp
This commit is contained in:
parent
263714d56a
commit
675630e18a
|
@ -76,14 +76,14 @@ void InotifyIndex::DoSomething(const QFileInfo& fileInfo){
|
||||||
QQueue<QVector<QString> >* tempFile = new QQueue<QVector<QString> >;
|
QQueue<QVector<QString> >* tempFile = new QQueue<QVector<QString> >;
|
||||||
tempFile->enqueue(QVector<QString>() << fileInfo.fileName() << fileInfo.absoluteFilePath() << QString(fileInfo.isDir() ? "1" : "0"));
|
tempFile->enqueue(QVector<QString>() << fileInfo.fileName() << fileInfo.absoluteFilePath() << QString(fileInfo.isDir() ? "1" : "0"));
|
||||||
IndexGenerator::getInstance()->creatAllIndex(tempFile);
|
IndexGenerator::getInstance()->creatAllIndex(tempFile);
|
||||||
if (!tempFile)
|
if (tempFile)
|
||||||
delete tempFile;
|
delete tempFile;
|
||||||
for (auto i : this->targetFileTypeVec){
|
for (auto i : this->targetFileTypeVec){
|
||||||
if (fileInfo.fileName().endsWith(i)){
|
if (fileInfo.fileName().endsWith(i)){
|
||||||
QQueue<QString>* tempContent = new QQueue<QString>;
|
QQueue<QString>* tempContent = new QQueue<QString>;
|
||||||
tempContent->enqueue(fileInfo.absoluteFilePath());
|
tempContent->enqueue(fileInfo.absoluteFilePath());
|
||||||
IndexGenerator::getInstance()->creatAllIndex(tempContent);
|
IndexGenerator::getInstance()->creatAllIndex(tempContent);
|
||||||
if (!tempContent)
|
if (tempContent)
|
||||||
delete tempContent;
|
delete tempContent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue