diff options
author | hjk <hjk@qt.io> | 2023-01-20 10:35:45 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2023-01-20 12:02:32 +0000 |
commit | 013ad1345e53fe9a52217a04445a479d90653a8d (patch) | |
tree | 6ec6bc7609fc74f33bfab92f14d9450502244dfe /src/plugins/cvs | |
parent | 7dd2fe689d284aab152ece6eb8dd385437b9ef60 (diff) |
VcsBase: Proliferate use of FilePath
... and update user code.
Change-Id: I52c08e9e07238536d31fc72f97312ac582a1e32f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/cvs')
-rw-r--r-- | src/plugins/cvs/cvsplugin.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index 7d659f9fbc8..10a2037253a 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -267,7 +267,7 @@ private: bool isCommitEditorOpen() const; Core::IEditor *showOutputInEditor(const QString& title, const QString &output, - Utils::Id id, const QString &source, QTextCodec *codec); + Id id, const FilePath &source, QTextCodec *codec); CommandResult runCvs(const FilePath &workingDirectory, const QStringList &arguments, RunFlags flags = RunFlags::None, QTextCodec *outputCodec = nullptr, @@ -844,13 +844,13 @@ void CvsPluginPrivate::revertCurrentFile() Tr::tr("The file has been changed. Do you want to revert it?"))) return; - FileChangeBlocker fcb(FilePath::fromString(state.currentFile())); + FileChangeBlocker fcb(state.currentFile()); // revert const auto revertRes = runCvs(state.currentFileTopLevel(), {"update", "-C", state.relativeCurrentFile()}, RunFlags::ShowStdOut); if (revertRes.result() == ProcessResult::FinishedWithSuccess) - emit filesChanged(QStringList(state.currentFile())); + emit filesChanged(QStringList(state.currentFile().toString())); } void CvsPluginPrivate::diffProject() @@ -985,7 +985,7 @@ void CvsPluginPrivate::filelog(const FilePath &workingDir, QTextCodec *codec = VcsBaseEditor::getCodec(workingDir, QStringList(file)); // no need for temp file const QString id = VcsBaseEditor::getTitleId(workingDir, QStringList(file)); - const QString source = VcsBaseEditor::getSource(workingDir, file); + const FilePath source = VcsBaseEditor::getSource(workingDir, file); const auto response = runCvs(workingDir, {"log", file}, RunFlags::None, codec); if (response.result() != ProcessResult::FinishedWithSuccess) return; @@ -1117,7 +1117,7 @@ void CvsPluginPrivate::annotate(const FilePath &workingDir, const QString &file, const QStringList files(file); QTextCodec *codec = VcsBaseEditor::getCodec(workingDir, files); const QString id = VcsBaseEditor::getTitleId(workingDir, files, revision); - const QString source = VcsBaseEditor::getSource(workingDir, file); + const FilePath source = VcsBaseEditor::getSource(workingDir, file); QStringList args{"annotate"}; if (!revision.isEmpty()) args << "-r" << revision; @@ -1129,7 +1129,7 @@ void CvsPluginPrivate::annotate(const FilePath &workingDir, const QString &file, // Re-use an existing view if possible to support // the common usage pattern of continuously changing and diffing a file if (lineNumber < 1) - lineNumber = VcsBaseEditor::lineNumberOfCurrentEditor(file); + lineNumber = VcsBaseEditor::lineNumberOfCurrentEditor(FilePath::fromString(file)); const QString tag = VcsBaseEditor::editorTag(AnnotateOutput, workingDir, {file}, revision); if (IEditor *editor = VcsBaseEditor::locateEditorByTag(tag)) { @@ -1154,7 +1154,7 @@ bool CvsPluginPrivate::status(const FilePath &topLevel, const QString &file, con const bool ok = response.result() == ProcessResult::FinishedWithSuccess; if (ok) { showOutputInEditor(title, response.cleanedStdOut(), commandLogEditorParameters.id, - topLevel.toString(), nullptr); + topLevel, nullptr); } return ok; } @@ -1319,7 +1319,7 @@ bool CvsPluginPrivate::describe(const FilePath &repositoryPath, } else { const QString title = QString::fromLatin1("cvs describe %1").arg(commitId); IEditor *newEditor = showOutputInEditor(title, output, diffEditorParameters.id, - entries.front().file, codec); + FilePath::fromString(entries.front().file), codec); VcsBaseEditor::tagEditor(newEditor, commitId); setDiffBaseDirectory(newEditor, repositoryPath); } @@ -1343,7 +1343,7 @@ CommandResult CvsPluginPrivate::runCvs(const FilePath &workingDirectory, } IEditor *CvsPluginPrivate::showOutputInEditor(const QString& title, const QString &output, - Utils::Id id, const QString &source, + Utils::Id id, const FilePath &source, QTextCodec *codec) { QString s = title; |