forked from qt-creator/qt-creator
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user