forked from qt-creator/qt-creator
Use the encoding settings when doing multi-file searches.
Task-number: QTCREATORBUG-65
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
#include <QtCore/QTextCodec>
|
||||
|
||||
using namespace TextEditor;
|
||||
|
||||
QMap<QString, QString> ITextEditor::openedTextEditorsContents()
|
||||
@@ -45,3 +47,16 @@ QMap<QString, QString> ITextEditor::openedTextEditorsContents()
|
||||
}
|
||||
return workingCopy;
|
||||
}
|
||||
|
||||
QMap<QString, QTextCodec *> TextEditor::ITextEditor::openedTextEditorsEncodings()
|
||||
{
|
||||
QMap<QString, QTextCodec *> workingCopy;
|
||||
foreach (Core::IEditor *editor, Core::EditorManager::instance()->openedEditors()) {
|
||||
ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor);
|
||||
if (!textEditor)
|
||||
continue;
|
||||
QString fileName = textEditor->file()->fileName();
|
||||
workingCopy[fileName] = textEditor->textCodec();
|
||||
}
|
||||
return workingCopy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user