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)
{
if (item.path.size() > 0) {
TextEditor::BaseTextEditorWidget::openEditorAt(item.path.first(), item.lineNumber, item.textMarkPos,
Core::Id(),
Core::EditorManager::ModeSwitch);
TextEditor::BaseTextEditorWidget::openEditorAt(QDir::fromNativeSeparators(item.path.first()),
item.lineNumber, item.textMarkPos, Core::Id(),
Core::EditorManager::ModeSwitch);
} 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);
}
}