aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cvs
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-05-26 09:41:47 +0200
committerhjk <hjk@qt.io>2023-05-30 06:00:35 +0000
commit426a9a70371fd5a9b19ee1fbd33af2318210e2b8 (patch)
tree06cb9a8d8c0c3d0db6a135af5f8b3e7be8aee51f /src/plugins/cvs
parent419f5416c52f7f2ee37ba4d9fb41331c46e0e872 (diff)
Vcs: Register settings aspects more directly
Change-Id: I8049f71456b8e8573a2dcfce68a14fb12545865b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/cvs')
-rw-r--r--src/plugins/cvs/cvssettings.cpp6
-rw-r--r--src/plugins/cvs/cvssettings.h10
2 files changed, 5 insertions, 11 deletions
diff --git a/src/plugins/cvs/cvssettings.cpp b/src/plugins/cvs/cvssettings.cpp
index dbfd41e500c..e2247f7dbe0 100644
--- a/src/plugins/cvs/cvssettings.cpp
+++ b/src/plugins/cvs/cvssettings.cpp
@@ -33,25 +33,21 @@ CvsSettings::CvsSettings()
setDisplayName(Tr::tr("CVS"));
setCategory(VcsBase::Constants::VCS_SETTINGS_CATEGORY);
- registerAspect(&binaryPath);
binaryPath.setDefaultValue("cvs" QTC_HOST_EXE_SUFFIX);
binaryPath.setExpectedKind(PathChooser::ExistingCommand);
binaryPath.setHistoryCompleter(QLatin1String("Cvs.Command.History"));
binaryPath.setDisplayName(Tr::tr("CVS Command"));
binaryPath.setLabelText(Tr::tr("CVS command:"));
- registerAspect(&cvsRoot);
cvsRoot.setDisplayStyle(StringAspect::LineEditDisplay);
cvsRoot.setSettingsKey("Root");
cvsRoot.setLabelText(Tr::tr("CVS root:"));
- registerAspect(&diffOptions);
diffOptions.setDisplayStyle(StringAspect::LineEditDisplay);
diffOptions.setSettingsKey("DiffOptions");
diffOptions.setDefaultValue("-du");
diffOptions.setLabelText("Diff options:");
- registerAspect(&describeByCommitId);
describeByCommitId.setSettingsKey("DescribeByCommitId");
describeByCommitId.setDefaultValue(true);
describeByCommitId.setLabelText(Tr::tr("Describe all files matching commit id"));
@@ -59,10 +55,8 @@ CvsSettings::CvsSettings()
"displayed when clicking on a revision number in the annotation view "
"(retrieved via commit ID). Otherwise, only the respective file will be displayed."));
- registerAspect(&diffIgnoreWhiteSpace);
diffIgnoreWhiteSpace.setSettingsKey("DiffIgnoreWhiteSpace");
- registerAspect(&diffIgnoreBlankLines);
diffIgnoreBlankLines.setSettingsKey("DiffIgnoreBlankLines");
setLayouter([this](QWidget *widget) {
diff --git a/src/plugins/cvs/cvssettings.h b/src/plugins/cvs/cvssettings.h
index 0c2e5442a62..ade9920b2ad 100644
--- a/src/plugins/cvs/cvssettings.h
+++ b/src/plugins/cvs/cvssettings.h
@@ -12,11 +12,11 @@ class CvsSettings : public VcsBase::VcsBaseSettings
public:
CvsSettings();
- Utils::StringAspect cvsRoot;
- Utils::StringAspect diffOptions;
- Utils::BoolAspect diffIgnoreWhiteSpace;
- Utils::BoolAspect diffIgnoreBlankLines;
- Utils::BoolAspect describeByCommitId;
+ Utils::StringAspect cvsRoot{this};
+ Utils::StringAspect diffOptions{this};
+ Utils::BoolAspect diffIgnoreWhiteSpace{this};
+ Utils::BoolAspect diffIgnoreBlankLines{this};
+ Utils::BoolAspect describeByCommitId{this};
QStringList addOptions(const QStringList &args) const;
};