diff options
author | hjk <[email protected]> | 2023-05-17 17:18:11 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2023-05-19 15:07:17 +0000 |
commit | 6f31d874441050738e83af8dad920b178fc6998b (patch) | |
tree | a7954e147f2ebb175d5b833bb6dec7cde864bd6c /src/plugins | |
parent | 2274847bfe517ec4889b01fd5eaef11b9161bfe0 (diff) |
Use more FilePathAspect
Change-Id: Ib348df1460f8610607251498b07010df58d51ddf
Reviewed-by: Alessandro Portale <[email protected]>
Diffstat (limited to 'src/plugins')
26 files changed, 53 insertions, 66 deletions
diff --git a/src/plugins/beautifier/generalsettings.cpp b/src/plugins/beautifier/generalsettings.cpp index 1568ae5f1bb..1f6d515d8e7 100644 --- a/src/plugins/beautifier/generalsettings.cpp +++ b/src/plugins/beautifier/generalsettings.cpp @@ -22,8 +22,6 @@ GeneralSettings::GeneralSettings() setDisplayCategory(Tr::tr("Beautifier")); setCategoryIconPath(":/beautifier/images/settingscategory_beautifier.png"); setSettingsGroups("Beautifier", "General"); - setSettings(this); - setAutoApply(false); registerAspect(&autoFormatOnSave); autoFormatOnSave.setSettingsKey(Utils::Constants::BEAUTIFIER_AUTO_FORMAT_ON_SAVE); @@ -47,9 +45,9 @@ GeneralSettings::GeneralSettings() autoFormatMime.setLabelText(Tr::tr("Restrict to MIME types:")); autoFormatMime.setDisplayStyle(StringAspect::LineEditDisplay); - setLayouter([this](QWidget *widget) { + setLayouter([this] { using namespace Layouting; - Column { + return Column { Group { title(Tr::tr("Automatic Formatting on File Save")), autoFormatOnSave.groupChecker(), @@ -60,7 +58,7 @@ GeneralSettings::GeneralSettings() } }, st - }.attachTo(widget); + }; }); } diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index c13cf8709c1..7a6a192e80f 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -2079,8 +2079,8 @@ void CMakeBuildConfiguration::addToEnvironment(Utils::Environment &env) const return; auto settings = CMakeSpecificSettings::instance(); - if (!settings->ninjaPath.filePath().isEmpty()) { - const Utils::FilePath ninja = settings->ninjaPath.filePath(); + if (!settings->ninjaPath().isEmpty()) { + const Utils::FilePath ninja = settings->ninjaPath(); env.appendOrSetPath(ninja.isFile() ? ninja.parentDir() : ninja); } } diff --git a/src/plugins/cmakeprojectmanager/cmakeformatter.cpp b/src/plugins/cmakeprojectmanager/cmakeformatter.cpp index 778e04563da..e12ab4b278d 100644 --- a/src/plugins/cmakeprojectmanager/cmakeformatter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeformatter.cpp @@ -52,7 +52,6 @@ public: registerAspect(&command); command.setSettingsKey("autoFormatCommand"); - command.setDisplayStyle(StringAspect::PathChooserDisplay); command.setDefaultValue("cmake-format"); command.setExpectedKind(PathChooser::ExistingCommand); @@ -121,14 +120,14 @@ public: TextEditor::Command formatCommand() const { TextEditor::Command cmd; - cmd.setExecutable(command.filePath()); + cmd.setExecutable(command()); cmd.setProcessing(TextEditor::Command::FileProcessing); cmd.addOption("--in-place"); cmd.addOption("%file"); return cmd; } - StringAspect command; + FilePathAspect command; BoolAspect autoFormatOnSave; BoolAspect autoFormatOnlyCurrentProject; StringAspect autoFormatMime; diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp index ee7cd5f1c1b..def549f5800 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp @@ -678,7 +678,7 @@ QVariant CMakeGeneratorKitAspect::defaultValue(const Kit *k) const if (it != known.constEnd()) { const bool hasNinja = [k, tool] { auto settings = Internal::CMakeSpecificSettings::instance(); - if (settings->ninjaPath.filePath().isEmpty()) { + if (settings->ninjaPath().isEmpty()) { auto findNinja = [](const Environment &env) -> bool { return !env.searchInPath("ninja").isEmpty(); }; diff --git a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp index 7875f97ada2..e343158f569 100644 --- a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp +++ b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp @@ -32,9 +32,9 @@ CMakeSpecificSettings::CMakeSpecificSettings() setCategory(Constants::Settings::CATEGORY); setCategoryIconPath(Constants::Icons::SETTINGS_CATEGORY); - setLayouter([this](QWidget *widget) { + setLayouter([this] { using namespace Layouting; - Column { + return Column { autorunCMake, packageManagerAutoSetup, askBeforeReConfigureInitialParams, @@ -42,7 +42,7 @@ CMakeSpecificSettings::CMakeSpecificSettings() showSourceSubFolders, showAdvancedOptionsByDefault, st - }.attachTo(widget); + }; }); // TODO: fixup of QTCREATORBUG-26289 , remove in Qt Creator 7 or so diff --git a/src/plugins/cmakeprojectmanager/cmakespecificsettings.h b/src/plugins/cmakeprojectmanager/cmakespecificsettings.h index 472945e1a5f..9ed848e4749 100644 --- a/src/plugins/cmakeprojectmanager/cmakespecificsettings.h +++ b/src/plugins/cmakeprojectmanager/cmakespecificsettings.h @@ -15,7 +15,7 @@ public: static CMakeSpecificSettings *instance(); Utils::BoolAspect autorunCMake; - Utils::StringAspect ninjaPath; + Utils::FilePathAspect ninjaPath; Utils::BoolAspect packageManagerAutoSetup; Utils::BoolAspect askBeforeReConfigureInitialParams; Utils::BoolAspect askBeforePresetsReload; diff --git a/src/plugins/cppcheck/cppcheckoptions.cpp b/src/plugins/cppcheck/cppcheckoptions.cpp index 37f537f2fee..22f728f8f11 100644 --- a/src/plugins/cppcheck/cppcheckoptions.cpp +++ b/src/plugins/cppcheck/cppcheckoptions.cpp @@ -36,7 +36,6 @@ CppcheckOptions::CppcheckOptions() registerAspect(&binary); binary.setSettingsKey("binary"); - binary.setDisplayStyle(StringAspect::PathChooserDisplay); binary.setExpectedKind(PathChooser::ExistingCommand); binary.setCommandVersionArguments({"--version"}); binary.setLabelText(Tr::tr("Binary:")); diff --git a/src/plugins/cppcheck/cppcheckoptions.h b/src/plugins/cppcheck/cppcheckoptions.h index 84fbf483bbb..5a617b1241c 100644 --- a/src/plugins/cppcheck/cppcheckoptions.h +++ b/src/plugins/cppcheck/cppcheckoptions.h @@ -17,7 +17,7 @@ public: std::function<void(QWidget *widget)> layouter(); - Utils::StringAspect binary; + Utils::FilePathAspect binary; Utils::BoolAspect warning; Utils::BoolAspect style; Utils::BoolAspect performance; diff --git a/src/plugins/cppcheck/cppchecktool.cpp b/src/plugins/cppcheck/cppchecktool.cpp index bd44957c379..cd824b3db47 100644 --- a/src/plugins/cppcheck/cppchecktool.cpp +++ b/src/plugins/cppcheck/cppchecktool.cpp @@ -100,7 +100,7 @@ void CppcheckTool::updateArguments() arguments.push_back("--template=\"{file},{line},{severity},{id},{message}\""); - m_runner->reconfigure(m_options.binary.filePath(), arguments.join(' ')); + m_runner->reconfigure(m_options.binary(), arguments.join(' ')); } QStringList CppcheckTool::additionalArguments(const CppEditor::ProjectPart &part) const diff --git a/src/plugins/docker/dockerapi.cpp b/src/plugins/docker/dockerapi.cpp index ffc14148597..baa9ed6be9f 100644 --- a/src/plugins/docker/dockerapi.cpp +++ b/src/plugins/docker/dockerapi.cpp @@ -103,7 +103,7 @@ std::optional<bool> DockerApi::isDockerDaemonAvailable(bool async) FilePath DockerApi::dockerClient() { - return FilePath::fromString(m_settings->dockerBinaryPath.value()); + return m_settings->dockerBinaryPath(); } } // Docker::Internal diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index b87c198555a..2dd2a589f72 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -99,7 +99,7 @@ public: private: void setupShellProcess(Process *shellProcess) final { - shellProcess->setCommand({m_settings->dockerBinaryPath.filePath(), + shellProcess->setCommand({m_settings->dockerBinaryPath(), {"container", "start", "-i", "-a", m_containerId}}); } @@ -498,7 +498,7 @@ CommandLine DockerDevicePrivate::withDockerExecCmd(const CommandLine &cmd, if (!updateContainerAccess()) return {}; - CommandLine dockerCmd{m_settings->dockerBinaryPath.filePath(), {"exec"}}; + CommandLine dockerCmd{m_settings->dockerBinaryPath(), {"exec"}}; if (interactive) dockerCmd.addArg("-i"); @@ -555,7 +555,7 @@ void DockerDevicePrivate::stopCurrentContainer() } Process proc; - proc.setCommand({m_settings->dockerBinaryPath.filePath(), {"container", "stop", m_container}}); + proc.setCommand({m_settings->dockerBinaryPath(), {"container", "stop", m_container}}); m_container.clear(); @@ -660,7 +660,7 @@ bool DockerDevicePrivate::isImageAvailable() const { Process proc; proc.setCommand( - {m_settings->dockerBinaryPath.filePath(), + {m_settings->dockerBinaryPath(), {"image", "list", m_data.repoAndTag(), "--format", "{{.Repository}}:{{.Tag}}"}}); proc.runBlocking(); if (proc.result() != ProcessResult::FinishedWithSuccess) @@ -682,7 +682,7 @@ bool DockerDevicePrivate::createContainer() const QString display = HostOsInfo::isLinuxHost() ? QString(":0") : QString("host.docker.internal:0"); - CommandLine dockerCreate{m_settings->dockerBinaryPath.filePath(), + CommandLine dockerCreate{m_settings->dockerBinaryPath(), {"create", "-i", "--rm", @@ -1053,7 +1053,7 @@ public: connect(m_buttons, &QDialogButtonBox::rejected, this, &QDialog::reject); m_buttons->button(QDialogButtonBox::Ok)->setEnabled(false); - CommandLine cmd{m_settings->dockerBinaryPath.filePath(), + CommandLine cmd{m_settings->dockerBinaryPath(), {"images", "--format", "{{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.Size}}"}}; m_log->append(Tr::tr("Running \"%1\"\n").arg(cmd.toUserOutput())); diff --git a/src/plugins/docker/dockersettings.cpp b/src/plugins/docker/dockersettings.cpp index a43e7a20d3b..a5dfc8581fc 100644 --- a/src/plugins/docker/dockersettings.cpp +++ b/src/plugins/docker/dockersettings.cpp @@ -8,7 +8,6 @@ #include <projectexplorer/projectexplorerconstants.h> -#include <utils/filepath.h> #include <utils/hostosinfo.h> #include <utils/layoutbuilder.h> @@ -23,17 +22,16 @@ DockerSettings::DockerSettings() setDisplayName(Tr::tr("Docker")); setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY); - setLayouter([this](QWidget *widget) { + setLayouter([this] { using namespace Layouting; - // clang-format off - Column { + return Column { Group { title(Tr::tr("Configuration")), Row { dockerBinaryPath } }, st - }.attachTo(widget); + }; // clang-format on }); @@ -44,7 +42,6 @@ DockerSettings::DockerSettings() additionalPaths.append("/usr/local/bin"); registerAspect(&dockerBinaryPath); - dockerBinaryPath.setDisplayStyle(StringAspect::PathChooserDisplay); dockerBinaryPath.setExpectedKind(PathChooser::ExistingCommand); dockerBinaryPath.setDefaultFilePath( FilePath::fromString("docker").searchInPath(additionalPaths)); diff --git a/src/plugins/docker/dockersettings.h b/src/plugins/docker/dockersettings.h index e6f8f1ec1fb..92b2f374ccf 100644 --- a/src/plugins/docker/dockersettings.h +++ b/src/plugins/docker/dockersettings.h @@ -12,7 +12,7 @@ class DockerSettings final : public Core::PagedSettings public: DockerSettings(); - Utils::StringAspect dockerBinaryPath; + Utils::FilePathAspect dockerBinaryPath; }; } // Docker::Internal diff --git a/src/plugins/fossil/fossilclient.cpp b/src/plugins/fossil/fossilclient.cpp index 83a2938f91e..49ded9c7740 100644 --- a/src/plugins/fossil/fossilclient.cpp +++ b/src/plugins/fossil/fossilclient.cpp @@ -232,7 +232,7 @@ FossilClient::FossilClient() unsigned int FossilClient::synchronousBinaryVersion() const { - if (settings().binaryPath.value().isEmpty()) + if (settings().binaryPath().isEmpty()) return 0; const CommandResult result = vcsSynchronousExec({}, QStringList{"version"}); diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index bda248be63c..3b4a748c0c1 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2422,7 +2422,7 @@ void GitClient::launchGitK(const FilePath &workingDirectory, const QString &file void GitClient::launchRepositoryBrowser(const FilePath &workingDirectory) const { - const FilePath repBrowserBinary = settings().repositoryBrowserCmd.filePath(); + const FilePath repBrowserBinary = settings().repositoryBrowserCmd(); if (!repBrowserBinary.isEmpty()) Process::startDetached({repBrowserBinary, {workingDirectory.toString()}}, workingDirectory); } diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 2b9f908ff86..e4fc95be8cb 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -2001,7 +2001,7 @@ QObject *GitPlugin::remoteCommand(const QStringList &options, const QString &wor void GitPluginPrivate::updateRepositoryBrowserAction() { const bool repositoryEnabled = currentState().hasTopLevel(); - const bool hasRepositoryBrowserCmd = !settings().repositoryBrowserCmd.value().isEmpty(); + const bool hasRepositoryBrowserCmd = !settings().repositoryBrowserCmd().isEmpty(); m_repositoryBrowserAction->setEnabled(repositoryEnabled && hasRepositoryBrowserCmd); } diff --git a/src/plugins/git/gitsettings.cpp b/src/plugins/git/gitsettings.cpp index f092dd74e92..5f65fa2f1b8 100644 --- a/src/plugins/git/gitsettings.cpp +++ b/src/plugins/git/gitsettings.cpp @@ -94,7 +94,6 @@ GitSettings::GitSettings() logDiff.setToolTip(Tr::tr("Note that huge amount of commits might take some time.")); registerAspect(&repositoryBrowserCmd); - repositoryBrowserCmd.setDisplayStyle(StringAspect::PathChooserDisplay); repositoryBrowserCmd.setSettingsKey("RepositoryBrowserCmd"); repositoryBrowserCmd.setExpectedKind(PathChooser::ExistingCommand); repositoryBrowserCmd.setHistoryCompleter("Git.RepoCommand.History"); @@ -130,10 +129,9 @@ GitSettings::GitSettings() timeout.setDefaultValue(Utils::HostOsInfo::isWindowsHost() ? 60 : 30); - setLayouter([this](QWidget *widget) { + setLayouter([this] { using namespace Layouting; - - Column { + return Column { Group { title(Tr::tr("Configuration")), Column { @@ -166,7 +164,7 @@ GitSettings::GitSettings() }, st - }.attachTo(widget); + }; }); connect(&binaryPath, &StringAspect::valueChanged, this, [this] { tryResolve = true; }); connect(&path, &StringAspect::valueChanged, this, [this] { tryResolve = true; }); @@ -181,7 +179,7 @@ FilePath GitSettings::gitExecutable(bool *ok, QString *errorMessage) const errorMessage->clear(); if (tryResolve) { - resolvedBinPath = binaryPath.filePath(); + resolvedBinPath = binaryPath(); if (!resolvedBinPath.isAbsolutePath()) resolvedBinPath = resolvedBinPath.searchInPath({path.filePath()}, FilePath::PrependToPath); tryResolve = false; diff --git a/src/plugins/git/gitsettings.h b/src/plugins/git/gitsettings.h index 3899fdada58..0b82146b042 100644 --- a/src/plugins/git/gitsettings.h +++ b/src/plugins/git/gitsettings.h @@ -30,7 +30,7 @@ public: Utils::BoolAspect winSetHomeEnvironment; Utils::StringAspect gitkOptions; Utils::BoolAspect logDiff; - Utils::StringAspect repositoryBrowserCmd; + Utils::FilePathAspect repositoryBrowserCmd; Utils::BoolAspect graphLog; Utils::BoolAspect colorLog; Utils::BoolAspect firstParent; diff --git a/src/plugins/gitlab/gitlaboptionspage.cpp b/src/plugins/gitlab/gitlaboptionspage.cpp index c2e56d5730b..4660cc92bb5 100644 --- a/src/plugins/gitlab/gitlaboptionspage.cpp +++ b/src/plugins/gitlab/gitlaboptionspage.cpp @@ -148,7 +148,7 @@ private: QPushButton *m_remove = nullptr; QPushButton *m_add = nullptr; QComboBox *m_defaultGitLabServer = nullptr; - Utils::StringAspect m_curl; + FilePathAspect m_curl; }; GitLabOptionsWidget::GitLabOptionsWidget(GitLabParameters *params) @@ -156,9 +156,8 @@ GitLabOptionsWidget::GitLabOptionsWidget(GitLabParameters *params) { auto defaultLabel = new QLabel(Tr::tr("Default:"), this); m_defaultGitLabServer = new QComboBox(this); - m_curl.setDisplayStyle(Utils::StringAspect::DisplayStyle::PathChooserDisplay); m_curl.setLabelText(Tr::tr("curl:")); - m_curl.setExpectedKind(Utils::PathChooser::ExistingCommand); + m_curl.setExpectedKind(PathChooser::ExistingCommand); m_gitLabServerWidget = new GitLabServerWidget(GitLabServerWidget::Display, this); @@ -208,7 +207,7 @@ GitLabOptionsWidget::GitLabOptionsWidget(GitLabParameters *params) result.gitLabServers.append(m_defaultGitLabServer->itemData(i).value<GitLabServer>()); if (m_defaultGitLabServer->count()) result.defaultGitLabServer = m_defaultGitLabServer->currentData().value<GitLabServer>().id; - result.curl = m_curl.filePath(); + result.curl = m_curl(); if (result != *m_parameters) { m_parameters->assign(result); diff --git a/src/plugins/haskell/haskellmanager.cpp b/src/plugins/haskell/haskellmanager.cpp index 94a03ec659e..cc91ae7f816 100644 --- a/src/plugins/haskell/haskellmanager.cpp +++ b/src/plugins/haskell/haskellmanager.cpp @@ -46,7 +46,7 @@ void HaskellManager::openGhci(const FilePath &haskellFile) + (isHaskell ? QStringList{haskellFile.fileName()} : QStringList()); Process p; p.setTerminalMode(TerminalMode::Detached); - p.setCommand({settings().stackPath.filePath(), args}); + p.setCommand({settings().stackPath(), args}); p.setWorkingDirectory(haskellFile.absolutePath()); p.start(); } diff --git a/src/plugins/haskell/haskellrunconfiguration.cpp b/src/plugins/haskell/haskellrunconfiguration.cpp index 9c236c65b5e..c4caf175058 100644 --- a/src/plugins/haskell/haskellrunconfiguration.cpp +++ b/src/plugins/haskell/haskellrunconfiguration.cpp @@ -68,7 +68,7 @@ Runnable HaskellRunConfiguration::runnable() const r.workingDirectory = projectDirectory; r.environment = aspect<LocalEnvironmentAspect>()->environment(); - r.command = {r.environment.searchInPath(settings().stackPath()), args}; + r.command = {r.environment.searchInPath(settings().stackPath().path()), args}; return r; } diff --git a/src/plugins/haskell/haskellsettings.cpp b/src/plugins/haskell/haskellsettings.cpp index 6b0ee170368..e4993020b7f 100644 --- a/src/plugins/haskell/haskellsettings.cpp +++ b/src/plugins/haskell/haskellsettings.cpp @@ -6,10 +6,7 @@ #include "haskellconstants.h" #include "haskelltr.h" -#include <coreplugin/icore.h> - #include <utils/hostosinfo.h> -#include <utils/pathchooser.h> #include <utils/layoutbuilder.h> using namespace Utils; @@ -46,18 +43,18 @@ HaskellSettings::HaskellSettings() ? FilePath::fromString("/usr/local/bin/stack") : FilePath::fromString("stack")); - setLayouter([this](QWidget *widget) { + setLayouter([this] { using namespace Layouting; - Column { + return Column { Group { title(Tr::tr("General")), Row { Tr::tr("Stack executable:"), stackPath } }, st, - }.attachTo(widget); + }; }); - readSettings(Core::ICore::settings()); + readSettings(); } } // Haskell::Internal diff --git a/src/plugins/haskell/haskellsettings.h b/src/plugins/haskell/haskellsettings.h index c697a154ee4..3b0d374c792 100644 --- a/src/plugins/haskell/haskellsettings.h +++ b/src/plugins/haskell/haskellsettings.h @@ -12,7 +12,7 @@ class HaskellSettings : public Core::PagedSettings public: HaskellSettings(); - Utils::StringAspect stackPath; + Utils::FilePathAspect stackPath; }; HaskellSettings &settings(); diff --git a/src/plugins/haskell/stackbuildstep.cpp b/src/plugins/haskell/stackbuildstep.cpp index 860ef458c5f..4006ae9daad 100644 --- a/src/plugins/haskell/stackbuildstep.cpp +++ b/src/plugins/haskell/stackbuildstep.cpp @@ -38,7 +38,7 @@ bool StackBuildStep::init() if (AbstractProcessStep::init()) { const auto projectDir = QDir(project()->projectDirectory().toString()); processParameters()->setCommandLine( - {settings().stackPath.filePath(), + {settings().stackPath(), {"build", "--work-dir", projectDir.relativeFilePath(buildDirectory().toString())}}); processParameters()->setEnvironment(buildEnvironment()); } diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp index 05b3524b4de..cc294cad57a 100644 --- a/src/plugins/mercurial/mercurialplugin.cpp +++ b/src/plugins/mercurial/mercurialplugin.cpp @@ -783,7 +783,7 @@ VcsCommand *MercurialPluginPrivate::createInitialCheckoutCommand(const QString & QStringList args; args << QLatin1String("clone") << extraArgs << url << localName; auto command = VcsBaseClient::createVcsCommand(baseDirectory, m_client.processEnvironment()); - command->addJob({settings().binaryPath.filePath(), args}, -1); + command->addJob({settings().binaryPath(), args}, -1); return command; } diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index 5cb7475edb0..e584d981818 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -863,7 +863,7 @@ void SubversionPluginPrivate::vcsAnnotateHelper(const FilePath &workingDir, cons const FilePath source = VcsBaseEditor::getSource(workingDir, file); QTextCodec *codec = VcsBaseEditor::getCodec(source); - CommandLine args{settings().binaryPath.filePath(), {"annotate"}}; + CommandLine args{settings().binaryPath(), {"annotate"}}; args << SubversionClient::AddAuthOptions(); if (settings().spaceIgnorantAnnotation.value()) args << "-x" << "-uw"; @@ -1006,7 +1006,7 @@ QString SubversionPluginPrivate::synchronousTopic(const FilePath &repository) co bool SubversionPluginPrivate::vcsAdd(const FilePath &workingDir, const QString &rawFileName) { const QString file = QDir::toNativeSeparators(SubversionClient::escapeFile(rawFileName)); - CommandLine args{settings().binaryPath.filePath()}; + CommandLine args{settings().binaryPath()}; args << "add" << SubversionClient::AddAuthOptions() << "--parents" << file; return runSvn(workingDir, args, RunFlags::ShowStdOut).result() == ProcessResult::FinishedWithSuccess; @@ -1016,7 +1016,7 @@ bool SubversionPluginPrivate::vcsDelete(const FilePath &workingDir, const QStrin { const QString file = QDir::toNativeSeparators(SubversionClient::escapeFile(rawFileName)); - CommandLine args{settings().binaryPath.filePath()}; + CommandLine args{settings().binaryPath()}; args << "delete" << SubversionClient::AddAuthOptions() << "--force" << file; return runSvn(workingDir, args, RunFlags::ShowStdOut).result() @@ -1025,7 +1025,7 @@ bool SubversionPluginPrivate::vcsDelete(const FilePath &workingDir, const QStrin bool SubversionPluginPrivate::vcsMove(const FilePath &workingDir, const QString &from, const QString &to) { - CommandLine args{settings().binaryPath.filePath(), {"move"}}; + CommandLine args{settings().binaryPath(), {"move"}}; args << SubversionClient::AddAuthOptions() << QDir::toNativeSeparators(SubversionClient::escapeFile(from)) << QDir::toNativeSeparators(SubversionClient::escapeFile(to)); @@ -1038,7 +1038,7 @@ bool SubversionPluginPrivate::vcsCheckout(const FilePath &directory, const QByte QUrl tempUrl = QUrl::fromEncoded(url); const QString username = tempUrl.userName(); const QString password = tempUrl.password(); - CommandLine args{settings().binaryPath.filePath(), {"checkout"}}; + CommandLine args{settings().binaryPath(), {"checkout"}}; args << Constants::NON_INTERACTIVE_OPTION; if (!username.isEmpty()) { @@ -1085,7 +1085,7 @@ bool SubversionPluginPrivate::managesDirectory(const FilePath &directory, FilePa bool SubversionPluginPrivate::managesFile(const FilePath &workingDirectory, const QString &fileName) const { - CommandLine args{settings().binaryPath.filePath()}; + CommandLine args{settings().binaryPath()}; args << "status" << SubversionClient::AddAuthOptions() << QDir::toNativeSeparators(SubversionClient::escapeFile(fileName)); const QString output = runSvn(workingDirectory, args).cleanedStdOut(); @@ -1124,7 +1124,7 @@ bool SubversionPluginPrivate::isVcsFileOrDirectory(const FilePath &filePath) con bool SubversionPluginPrivate::isConfigured() const { - const FilePath binary = settings().binaryPath.filePath(); + const FilePath binary = settings().binaryPath(); if (binary.isEmpty()) return false; QFileInfo fi = binary.toFileInfo(); @@ -1187,7 +1187,7 @@ VcsCommand *SubversionPluginPrivate::createInitialCheckoutCommand(const QString const QString &localName, const QStringList &extraArgs) { - CommandLine args{settings().binaryPath.filePath()}; + CommandLine args{settings().binaryPath()}; args << "checkout"; args << SubversionClient::AddAuthOptions(); args << Subversion::Constants::NON_INTERACTIVE_OPTION << extraArgs << url << localName; |