From 164f96e9b6428741b0e23c8527f273e06c376196 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 2 May 2018 14:10:12 +0200 Subject: [PATCH] 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 --- src/plugins/coreplugin/editormanager/documentmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp index ac9c533ce0e..7ca7ff5f0be 100644 --- a/src/plugins/coreplugin/editormanager/documentmodel.cpp +++ b/src/plugins/coreplugin/editormanager/documentmodel.cpp @@ -533,7 +533,7 @@ DocumentModel::Entry *DocumentModel::entryForFilePath(const Utils::FileName &fil const Utils::optional index = d->indexOfFilePath(filePath); if (!index) return nullptr; - return d->m_entries.at(index.value()); + return d->m_entries.at(*index); } QList DocumentModel::openedDocuments()