Remove bool return value from IEditor::restoreState()

It's never used, and actually there wouldn't be any sensible thing to do
with it.

Change-Id: Id8a8df18c7db4b98e5abbc034240bb90dc1dcaa9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2020-09-23 16:38:01 +02:00
parent 415365dcc3
commit cc502e3667
9 changed files with 16 additions and 21 deletions

View File

@@ -3003,12 +3003,12 @@ QByteArray TextEditorWidget::saveState() const
return state;
}
bool TextEditorWidget::restoreState(const QByteArray &state)
void TextEditorWidget::restoreState(const QByteArray &state)
{
if (state.isEmpty()) {
if (d->m_displaySettings.m_autoFoldFirstComment)
d->foldLicenseHeader();
return false;
return;
}
int version;
int vval;
@@ -3036,7 +3036,7 @@ bool TextEditorWidget::restoreState(const QByteArray &state)
}
if (layoutChanged) {
auto documentLayout = qobject_cast<TextDocumentLayout*>(doc->documentLayout());
QTC_ASSERT(documentLayout, return false);
QTC_ASSERT(documentLayout, return );
documentLayout->requestUpdate();
documentLayout->emitDocumentSizeChanged();
}
@@ -3068,7 +3068,6 @@ bool TextEditorWidget::restoreState(const QByteArray &state)
}
d->saveCurrentCursorPositionForNavigation();
return true;
}
void TextEditorWidget::setParenthesesMatchingEnabled(bool b)
@@ -8446,9 +8445,9 @@ QByteArray BaseTextEditor::saveState() const
return editorWidget()->saveState();
}
bool BaseTextEditor::restoreState(const QByteArray &state)
void BaseTextEditor::restoreState(const QByteArray &state)
{
return editorWidget()->restoreState(state);
editorWidget()->restoreState(state);
}
BaseTextEditor *BaseTextEditor::currentTextEditor()