forked from qt-creator/qt-creator
Wizards: Format generated code according to current style
Needs ClangFormat to be enabled. Task-number: QTCREATORBUG-25065 Change-Id: I127da0f9ac55af7f19dead19b28470a9b72c4ee5 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -717,6 +717,12 @@ bool TextDocument::setContents(const QByteArray &contents)
|
||||
return setPlainText(QString::fromUtf8(contents));
|
||||
}
|
||||
|
||||
void TextDocument::formatContents()
|
||||
{
|
||||
d->m_indenter->format({{document()->firstBlock().blockNumber() + 1,
|
||||
document()->lastBlock().blockNumber() + 1}});
|
||||
}
|
||||
|
||||
bool TextDocument::shouldAutoSave() const
|
||||
{
|
||||
return d->m_autoSaveRevision != d->m_document.revision();
|
||||
|
||||
Reference in New Issue
Block a user