EditorManager: Remove QString openEditor(At) overloads

In favor of the FilePath/Link ones.

Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2021-11-01 17:02:02 +01:00
parent 4dac32d661
commit 195abefe7d
56 changed files with 149 additions and 126 deletions

View File

@@ -265,7 +265,7 @@ void CleanDialog::slotDoubleClicked(const QModelIndex &index)
// Open file on doubleclick
if (const QStandardItem *item = d->m_filesModel->itemFromIndex(index))
if (!item->data(Internal::isDirectoryRole).toBool()) {
const QString fname = item->data(Internal::fileNameRole).toString();
const auto fname = Utils::FilePath::fromVariant(item->data(Internal::fileNameRole));
Core::EditorManager::openEditor(fname);
}
}

View File

@@ -1190,7 +1190,7 @@ void VcsBaseEditorWidget::jumpToChangeFromDiff(QTextCursor cursor)
if (!exists)
return;
Core::IEditor *ed = Core::EditorManager::openEditor(fileName);
Core::IEditor *ed = Core::EditorManager::openEditor(Utils::FilePath::fromString(fileName));
if (auto editor = qobject_cast<BaseTextEditor *>(ed))
editor->gotoLine(chunkStart + lineCount);
}

View File

@@ -203,7 +203,7 @@ void OutputWindowPlainTextEdit::contextMenuEvent(QContextMenuEvent *event)
return;
}
if (action == openAction) {
const QString fileName = action->data().toString();
const auto fileName = Utils::FilePath::fromVariant(action->data());
Core::EditorManager::openEditor(fileName);
}
}