Text editor: Introduce per project settings

With some refactorings to make the code look better.

Reviewed-by: con
This commit is contained in:
Leandro Melo
2011-02-01 14:13:54 +01:00
parent cbafc50acc
commit ea313f3ec8
46 changed files with 1955 additions and 912 deletions

View File

@@ -722,7 +722,7 @@ static QTextCodec *findProjectCodec(const QString &dir)
for (ProjectList::const_iterator it = projects.constBegin(); it != pcend; ++it)
if (const Core::IFile *file = (*it)->file())
if (file->fileName().startsWith(dir)) {
QTextCodec *codec = (*it)->editorConfiguration()->defaultTextCodec();
QTextCodec *codec = (*it)->editorConfiguration()->textCodec();
if (VCSBase::Constants::Internal::debug)
qDebug() << Q_FUNC_INFO << dir << (*it)->displayName() << codec->name();
return codec;