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