forked from qt-creator/qt-creator
Cleanup
This commit is contained in:
@@ -332,19 +332,19 @@ static void find_helper(QFutureInterface<Core::Utils::FileSearchResult> &future,
|
|||||||
Identifier *symbolId = symbol->identifier();
|
Identifier *symbolId = symbol->identifier();
|
||||||
Q_ASSERT(symbolId != 0);
|
Q_ASSERT(symbolId != 0);
|
||||||
|
|
||||||
const QString fileName = QString::fromUtf8(symbol->fileName(), symbol->fileNameLength());
|
const QString sourceFile = QString::fromUtf8(symbol->fileName(), symbol->fileNameLength());
|
||||||
|
|
||||||
QStringList files(fileName);
|
QStringList files(sourceFile);
|
||||||
files += snapshot.dependsOn(fileName);
|
files += snapshot.dependsOn(sourceFile);
|
||||||
qDebug() << "done in:" << tm.elapsed() << "number of files to parse:" << files.size();
|
qDebug() << "done in:" << tm.elapsed() << "number of files to parse:" << files.size();
|
||||||
|
|
||||||
future.setProgressRange(0, files.size());
|
future.setProgressRange(0, files.size());
|
||||||
|
|
||||||
for (int i = 0; i < files.size(); ++i) {
|
for (int i = 0; i < files.size(); ++i) {
|
||||||
const QString &fn = files.at(i);
|
const QString &fileName = files.at(i);
|
||||||
future.setProgressValueAndText(i, QFileInfo(fn).fileName());
|
future.setProgressValueAndText(i, QFileInfo(fileName).fileName());
|
||||||
|
|
||||||
Document::Ptr previousDoc = snapshot.value(fn);
|
Document::Ptr previousDoc = snapshot.value(fileName);
|
||||||
if (previousDoc) {
|
if (previousDoc) {
|
||||||
Control *control = previousDoc->control();
|
Control *control = previousDoc->control();
|
||||||
Identifier *id = control->findIdentifier(symbolId->chars(), symbolId->size());
|
Identifier *id = control->findIdentifier(symbolId->chars(), symbolId->size());
|
||||||
@@ -352,10 +352,6 @@ static void find_helper(QFutureInterface<Core::Utils::FileSearchResult> &future,
|
|||||||
continue; // skip this document, it's not using symbolId.
|
continue; // skip this document, it's not using symbolId.
|
||||||
}
|
}
|
||||||
|
|
||||||
QFile f(fn);
|
|
||||||
if (! f.open(QFile::ReadOnly))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
QByteArray source;
|
QByteArray source;
|
||||||
|
|
||||||
if (wl.contains(fileName))
|
if (wl.contains(fileName))
|
||||||
|
|||||||
Reference in New Issue
Block a user