Editor: Add feature for set/unset UTF-8 BOM

Change-Id: Iec7e36b1d7a526d7fa8a8096110b91f9c4cc44f9
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Yuchen Deng
2012-03-02 08:16:23 +08:00
committed by Eike Ziller
parent a2d3d7f3bf
commit 012ff2d22a
7 changed files with 35 additions and 0 deletions

View File

@@ -140,6 +140,13 @@ void TextDocument::setCodec(const QTextCodec *codec)
d->m_format.codec = codec;
}
void TextDocument::switchUtf8Bom()
{
if (debug)
qDebug() << Q_FUNC_INFO << this << "UTF-8 BOM: " << !d->m_format.hasUtf8Bom;
d->m_format.hasUtf8Bom = !d->m_format.hasUtf8Bom;
}
/*!
\brief Returns the format obtained from the last call to read().
*/