forked from qt-creator/qt-creator
Add method for default text encoding to editor manager.
Moving the logic out of BaseTextDocument for use at other places.
This commit is contained in:
@@ -132,12 +132,7 @@ BaseTextDocument::BaseTextDocument()
|
||||
m_lineTerminatorMode = NativeLineTerminator;
|
||||
m_fileIsReadOnly = false;
|
||||
m_isBinaryData = false;
|
||||
m_codec = QTextCodec::codecForLocale();
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
if (QTextCodec *candidate = QTextCodec::codecForName(
|
||||
settings->value(QLatin1String("General/DefaultFileEncoding")).toByteArray()))
|
||||
m_codec = candidate;
|
||||
|
||||
m_codec = Core::EditorManager::instance()->defaultTextEncoding();
|
||||
m_hasDecodingError = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user