diff options
author | Robert Loehning <robert.loehning@qt.io> | 2018-04-16 11:31:53 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2018-04-16 10:27:59 +0000 |
commit | 9636de7cd4bc0eaced1a9503f5d0bba92ca325e8 (patch) | |
tree | 29f7ef6a4fac2d70462854a55ef620da8b7f3006 /src/plugins/coreplugin/editortoolbar.cpp | |
parent | 7be7d268148b84257c9626b53f58b5de4afb766c (diff) | |
download | qt-creator-9636de7cd4bc0eaced1a9503f5d0bba92ca325e8.tar.gz |
EditorToolBar: Replace optional::value by non-throwing alternative
...to calm down static checker which
fears throwing exceptions into dtors
Change-Id: I7f1a298e8391735d503332a7bce67e10895fbc85
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/editortoolbar.cpp')
-rw-r--r-- | src/plugins/coreplugin/editortoolbar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp index 3383325e4c..ea3ef78019 100644 --- a/src/plugins/coreplugin/editortoolbar.cpp +++ b/src/plugins/coreplugin/editortoolbar.cpp @@ -322,7 +322,7 @@ void EditorToolBar::setCurrentEditor(IEditor *editor) IDocument *document = editor ? editor->document() : 0; const Utils::optional<int> index = DocumentModel::rowOfDocument(document); if (QTC_GUARD(index)) - d->m_editorList->setCurrentIndex(index.value()); + d->m_editorList->setCurrentIndex(*index); // If we never added the toolbar from the editor, we will never change // the editor, so there's no need to update the toolbar either. |