DocumentModel: Replace optional::value by non-throwing alternative

...to calm down static checker which
fears throwing exceptions into dtors

Change-Id: I595c79ca6d19c7592e98437585fc33c4071d09c6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Robert Loehning
2018-05-02 14:10:12 +02:00
parent 0087a74ecc
commit 164f96e9b6

View File

@@ -533,7 +533,7 @@ DocumentModel::Entry *DocumentModel::entryForFilePath(const Utils::FileName &fil
const Utils::optional<int> index = d->indexOfFilePath(filePath);
if (!index)
return nullptr;
return d->m_entries.at(index.value());
return d->m_entries.at(*index);
}
QList<IDocument *> DocumentModel::openedDocuments()