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