forked from qt-creator/qt-creator
FSEngine: Speed optimization
Change-Id: I1fdb61042df47941921a8f278d0626b440084ec4 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -48,16 +48,15 @@ QAbstractFileEngine *FSEngineHandler::create(const QString &fileName) const
|
|||||||
return new FixedListFSEngine(rootFilePath.pathAppended(scheme), filteredRoots);
|
return new FixedListFSEngine(rootFilePath.pathAppended(scheme), filteredRoots);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FilePath filePath = FilePath::fromString(fixedFileName);
|
||||||
|
if (filePath.needsDevice())
|
||||||
|
return new FSEngineImpl(filePath);
|
||||||
|
|
||||||
|
if (fixedFileName.compare(QDir::rootPath(), Qt::CaseInsensitive) == 0)
|
||||||
|
return new RootInjectFSEngine(fixedFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath filePath = FilePath::fromString(fixedFileName);
|
|
||||||
if (filePath.needsDevice())
|
|
||||||
return new FSEngineImpl(filePath);
|
|
||||||
|
|
||||||
|
|
||||||
if (fixedFileName.compare(QDir::rootPath(), Qt::CaseInsensitive) == 0)
|
|
||||||
return new RootInjectFSEngine(fixedFileName);
|
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user