forked from qt-creator/qt-creator
CppEditor: Remove WorkingCopy::contains()
Most uses involved a double look-up. Change-Id: Ifeb62ea2361222ed0faad749f44a59735c8d6930 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -105,8 +105,8 @@ namespace Internal {
|
||||
static QByteArray getSource(const Utils::FilePath &fileName,
|
||||
const WorkingCopy &workingCopy)
|
||||
{
|
||||
if (workingCopy.contains(fileName)) {
|
||||
return workingCopy.source(fileName);
|
||||
if (const auto source = workingCopy.source(fileName)) {
|
||||
return *source;
|
||||
} else {
|
||||
QString fileContents;
|
||||
Utils::TextFileFormat format;
|
||||
|
||||
Reference in New Issue
Block a user