summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/editormanager
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2018-05-02 14:10:12 +0200
committerRobert Loehning <robert.loehning@qt.io>2018-05-02 14:28:44 +0000
commit164f96e9b6428741b0e23c8527f273e06c376196 (patch)
tree8cfeb6d8267db32203ded6abdea9108afd2d69ca /src/plugins/coreplugin/editormanager
parent0087a74ecc5e488b52f3dbcc267629b0de71d15a (diff)
downloadqt-creator-164f96e9b6428741b0e23c8527f273e06c376196.tar.gz
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>
Diffstat (limited to 'src/plugins/coreplugin/editormanager')
-rw-r--r--src/plugins/coreplugin/editormanager/documentmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp
index ac9c533ce0..7ca7ff5f0b 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<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()