diff options
author | Robert Loehning <robert.loehning@qt.io> | 2018-05-02 14:10:12 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2018-05-02 14:28:44 +0000 |
commit | 164f96e9b6428741b0e23c8527f273e06c376196 (patch) | |
tree | 8cfeb6d8267db32203ded6abdea9108afd2d69ca /src/plugins/coreplugin/editormanager | |
parent | 0087a74ecc5e488b52f3dbcc267629b0de71d15a (diff) | |
download | qt-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.cpp | 2 |
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() |