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>
This commit is contained in:
Robert Loehning
2018-04-23 12:44:53 +02:00
parent afef329c10
commit de0b077443

View File

@@ -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());