Avoid native filenames in QML references

Task-number: QTCREATORBUG-7191

Change-Id: I0198eb6909e5e250831f2031b1245e8e955d49ff
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Orgad Shaneh
2012-03-28 23:18:20 +02:00
committed by Eike Ziller
parent d429dda774
commit 4c03096fb1
2 changed files with 7 additions and 6 deletions

View File

@@ -971,11 +971,12 @@ void FindReferences::cancel()
void FindReferences::openEditor(const Find::SearchResultItem &item) void FindReferences::openEditor(const Find::SearchResultItem &item)
{ {
if (item.path.size() > 0) { if (item.path.size() > 0) {
TextEditor::BaseTextEditorWidget::openEditorAt(item.path.first(), item.lineNumber, item.textMarkPos, TextEditor::BaseTextEditorWidget::openEditorAt(QDir::fromNativeSeparators(item.path.first()),
Core::Id(), item.lineNumber, item.textMarkPos, Core::Id(),
Core::EditorManager::ModeSwitch); Core::EditorManager::ModeSwitch);
} else { } else {
Core::EditorManager::instance()->openEditor(item.text, Core::Id(), Core::EditorManager::ModeSwitch); Core::EditorManager::instance()->openEditor(QDir::fromNativeSeparators(item.text),
Core::Id(), Core::EditorManager::ModeSwitch);
} }
} }

View File

@@ -292,8 +292,8 @@ void BaseFileFind::openEditor(const Find::SearchResultItem &item)
Core::Id(), Core::Id(),
Core::EditorManager::ModeSwitch); Core::EditorManager::ModeSwitch);
} else { } else {
openedEditor = Core::EditorManager::instance()->openEditor(item.text, Core::Id(), openedEditor = Core::EditorManager::instance()->openEditor(QDir::fromNativeSeparators(item.text),
Core::EditorManager::ModeSwitch); Core::Id(), Core::EditorManager::ModeSwitch);
} }
if (m_currentFindSupport) if (m_currentFindSupport)
m_currentFindSupport->clearResults(); m_currentFindSupport->clearResults();