forked from qt-creator/qt-creator
Use a few more explicit FilePathAspects
Change-Id: I97431306754af3ea7a803021db7b876c31abc940 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -102,7 +102,6 @@ PythonWizardPage::PythonWizardPage(const QList<QPair<QString, QVariant>> &pySide
|
||||
m_createVenv.setLabelText(Tr::tr("Create new Virtual Environment"));
|
||||
|
||||
m_venvPath.setLabelText(Tr::tr("Path to virtual environment"));
|
||||
m_venvPath.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
m_venvPath.setEnabler(&m_createVenv);
|
||||
m_venvPath.setExpectedKind(PathChooser::Directory);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ private:
|
||||
ProjectExplorer::InterpreterAspect m_interpreter;
|
||||
Utils::SelectionAspect m_pySideVersion;
|
||||
Utils::BoolAspect m_createVenv;
|
||||
Utils::StringAspect m_venvPath;
|
||||
Utils::FilePathAspect m_venvPath;
|
||||
Utils::InfoLabel *m_stateLabel = nullptr;
|
||||
};
|
||||
|
||||
|
||||
@@ -70,10 +70,9 @@ MakeInstallStep::MakeInstallStep(BuildStepList *parent, Id id) : MakeStep(parent
|
||||
connect(makeAspect, &ExecutableAspect::changed,
|
||||
this, &MakeInstallStep::updateCommandFromAspect);
|
||||
|
||||
const auto installRootAspect = addAspect<StringAspect>();
|
||||
const auto installRootAspect = addAspect<FilePathAspect>();
|
||||
installRootAspect->setId(InstallRootAspectId);
|
||||
installRootAspect->setSettingsKey(InstallRootAspectId);
|
||||
installRootAspect->setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
installRootAspect->setExpectedKind(PathChooser::Directory);
|
||||
installRootAspect->setLabelText(Tr::tr("Install root:"));
|
||||
installRootAspect->setFilePath(rootPath);
|
||||
|
||||
@@ -41,10 +41,9 @@ RemoteLinuxCustomRunConfiguration::RemoteLinuxCustomRunConfiguration(Target *tar
|
||||
exeAspect->setHistoryCompleter("RemoteLinux.CustomExecutable.History");
|
||||
exeAspect->setExpectedKind(PathChooser::Any);
|
||||
|
||||
auto symbolsAspect = addAspect<SymbolFileAspect>();
|
||||
auto symbolsAspect = addAspect<FilePathAspect>();
|
||||
symbolsAspect->setSettingsKey("RemoteLinux.CustomRunConfig.LocalExecutable");
|
||||
symbolsAspect->setLabelText(Tr::tr("Local executable:"));
|
||||
symbolsAspect->setDisplayStyle(SymbolFileAspect::PathChooserDisplay);
|
||||
|
||||
addAspect<ArgumentsAspect>(macroExpander());
|
||||
addAspect<WorkingDirectoryAspect>(macroExpander(), envAspect);
|
||||
|
||||
@@ -399,7 +399,6 @@ TerminalSettings::TerminalSettings()
|
||||
shell.setSettingsKey("ShellPath");
|
||||
shell.setLabelText(Tr::tr("Shell path:"));
|
||||
shell.setExpectedKind(PathChooser::ExistingCommand);
|
||||
shell.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
shell.setHistoryCompleter("Terminal.Shell.History");
|
||||
shell.setToolTip(Tr::tr("The shell executable to be started."));
|
||||
shell.setDefaultValue(defaultShell());
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
|
||||
Utils::StringAspect font{this};
|
||||
Utils::IntegerAspect fontSize{this};
|
||||
Utils::StringAspect shell{this};
|
||||
Utils::FilePathAspect shell{this};
|
||||
Utils::StringAspect shellArguments{this};
|
||||
|
||||
Utils::ColorAspect foregroundColor;
|
||||
|
||||
@@ -39,7 +39,6 @@ CommonVcsSettings::CommonVcsSettings()
|
||||
setAutoApply(false);
|
||||
|
||||
nickNameMailMap.setSettingsKey("NickNameMailMap");
|
||||
nickNameMailMap.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
nickNameMailMap.setExpectedKind(PathChooser::File);
|
||||
nickNameMailMap.setHistoryCompleter("Vcs.NickMap.History");
|
||||
nickNameMailMap.setLabelText(Tr::tr("User/&alias configuration file:"));
|
||||
@@ -47,7 +46,6 @@ CommonVcsSettings::CommonVcsSettings()
|
||||
"'name <email> alias <email>'."));
|
||||
|
||||
nickNameFieldListFile.setSettingsKey("NickNameFieldListFile");
|
||||
nickNameFieldListFile.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
nickNameFieldListFile.setExpectedKind(PathChooser::File);
|
||||
nickNameFieldListFile.setHistoryCompleter("Vcs.NickFields.History");
|
||||
nickNameFieldListFile.setLabelText(Tr::tr("User &fields configuration file:"));
|
||||
@@ -55,7 +53,6 @@ CommonVcsSettings::CommonVcsSettings()
|
||||
"\"Reviewed-By:\" which will be added below the submit editor."));
|
||||
|
||||
submitMessageCheckScript.setSettingsKey("SubmitMessageCheckScript");
|
||||
submitMessageCheckScript.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
submitMessageCheckScript.setExpectedKind(PathChooser::ExistingCommand);
|
||||
submitMessageCheckScript.setHistoryCompleter("Vcs.MessageCheckScript.History");
|
||||
submitMessageCheckScript.setLabelText(Tr::tr("Submit message &check script:"));
|
||||
@@ -64,7 +61,6 @@ CommonVcsSettings::CommonVcsSettings()
|
||||
"on standard error to indicate failure."));
|
||||
|
||||
sshPasswordPrompt.setSettingsKey("SshPasswordPrompt");
|
||||
sshPasswordPrompt.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
sshPasswordPrompt.setExpectedKind(PathChooser::ExistingCommand);
|
||||
sshPasswordPrompt.setHistoryCompleter("Vcs.SshPrompt.History");
|
||||
sshPasswordPrompt.setDefaultValue(sshPasswordPromptDefault());
|
||||
|
||||
@@ -16,13 +16,13 @@ class CommonVcsSettings : public Utils::AspectContainer
|
||||
public:
|
||||
CommonVcsSettings();
|
||||
|
||||
Utils::StringAspect nickNameMailMap{this};
|
||||
Utils::StringAspect nickNameFieldListFile{this};
|
||||
Utils::FilePathAspect nickNameMailMap{this};
|
||||
Utils::FilePathAspect nickNameFieldListFile{this};
|
||||
|
||||
Utils::StringAspect submitMessageCheckScript{this};
|
||||
Utils::FilePathAspect submitMessageCheckScript{this};
|
||||
|
||||
// Executable run to graphically prompt for a SSH-password.
|
||||
Utils::StringAspect sshPasswordPrompt{this};
|
||||
Utils::FilePathAspect sshPasswordPrompt{this};
|
||||
|
||||
Utils::BoolAspect lineWrap{this};
|
||||
Utils::IntegerAspect lineWrapWidth{this};
|
||||
|
||||
Reference in New Issue
Block a user