forked from qt-creator/qt-creator
Open files from search result list with right encoding, even on Windows.
Didn't work if a project specific encoding was set. Task-number: QTCREATORBUG-65 Reviewed-by: Robert Loehning
This commit is contained in:
@@ -262,7 +262,7 @@ void BaseFileFind::updateComboEntries(QComboBox *combo, bool onTop)
|
||||
void BaseFileFind::openEditor(const Find::SearchResultItem &item)
|
||||
{
|
||||
if (item.path.size() > 0) {
|
||||
TextEditor::BaseTextEditor::openEditorAt(item.path.first(), item.lineNumber, item.textMarkPos,
|
||||
TextEditor::BaseTextEditor::openEditorAt(QDir::fromNativeSeparators(item.path.first()), item.lineNumber, item.textMarkPos,
|
||||
QString(), Core::EditorManager::ModeSwitch);
|
||||
} else {
|
||||
Core::EditorManager::instance()->openEditor(item.text, QString(), Core::EditorManager::ModeSwitch);
|
||||
@@ -318,7 +318,7 @@ QStringList BaseFileFind::replaceAll(const QString &text,
|
||||
QHash<QString, QList<Find::SearchResultItem> > changes;
|
||||
|
||||
foreach (const Find::SearchResultItem &item, items)
|
||||
changes[item.path.first()].append(item);
|
||||
changes[QDir::fromNativeSeparators(item.path.first())].append(item);
|
||||
|
||||
Core::EditorManager *editorManager = Core::EditorManager::instance();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user