summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2018-04-23 12:44:53 +0200
committerRobert Loehning <robert.loehning@qt.io>2018-04-23 12:38:33 +0000
commitde0b077443f7f46ca995f46178e4e1871200905c (patch)
treef3fe876f5ea6eb93fe0b37c4b08d8cc809d8c674
parentafef329c1061786be1554b7c349a26862ebdbaaf (diff)
downloadqt-creator-de0b077443f7f46ca995f46178e4e1871200905c.tar.gz
EditorToolBar: Replace another optional::value to not throw
...to calm down static checker which fears throwing exceptions into dtors Change-Id: Ifc4fbbf9ea03d35e7a80188538efbcfb1b92c729 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/plugins/coreplugin/editortoolbar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp
index ea3ef78019..83384eb337 100644
--- a/src/plugins/coreplugin/editortoolbar.cpp
+++ b/src/plugins/coreplugin/editortoolbar.cpp
@@ -410,7 +410,7 @@ void EditorToolBar::updateDocumentStatus(IDocument *document)
const Utils::optional<int> index = DocumentModel::rowOfDocument(document);
if (QTC_GUARD(index))
- d->m_editorList->setCurrentIndex(index.value());
+ d->m_editorList->setCurrentIndex(*index);
if (document->filePath().isEmpty()) {
d->m_lockButton->setIcon(QIcon());