From 64cfa4615d65d50719d6e3d7357a5ef0e7e26c8b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Date: Tue, 8 Mar 2011 18:26:15 +0100 Subject: [PATCH] don't validate executable paths & working dirs in build & run configs it's well within expectations that they do not exist at the time of configuration (especially when shadow building). additionally, keeping the validation info (macros and environment) up-to-date would require a notification infrastructure which is just not worth the effort. --- src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp | 2 +- .../projectexplorer/customexecutableconfigurationwidget.cpp | 2 +- src/plugins/projectexplorer/processstep.cpp | 2 +- src/plugins/projectexplorer/toolchainconfigwidget.cpp | 2 +- .../qt4projectmanager/qt-desktop/qt4runconfiguration.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp index 008c4f0ae54..fa746ff3a1b 100644 --- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp @@ -333,9 +333,9 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration * fl->addRow(tr("Arguments:"), argumentsLineEdit); m_workingDirectoryEdit = new Utils::PathChooser(); + m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory); m_workingDirectoryEdit->setBaseDirectory(m_cmakeRunConfiguration->target()->project()->projectDirectory()); m_workingDirectoryEdit->setPath(m_cmakeRunConfiguration->baseWorkingDirectory()); - m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::ExistingDirectory); m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory")); QToolButton *resetButton = new QToolButton(); diff --git a/src/plugins/projectexplorer/customexecutableconfigurationwidget.cpp b/src/plugins/projectexplorer/customexecutableconfigurationwidget.cpp index ab69b21e35c..e706f151b37 100644 --- a/src/plugins/projectexplorer/customexecutableconfigurationwidget.cpp +++ b/src/plugins/projectexplorer/customexecutableconfigurationwidget.cpp @@ -62,8 +62,8 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE layout->setMargin(0); m_executableChooser = new Utils::PathChooser(this); - m_executableChooser->setEnvironment(rc->environment()); m_executableChooser->setExpectedKind(Utils::PathChooser::Command); + m_executableChooser->setEnvironment(rc->environment()); layout->addRow(tr("Executable:"), m_executableChooser); m_commandLineArgumentsLineEdit = new QLineEdit(this); diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp index bfe666920f7..55eea5895df 100644 --- a/src/plugins/projectexplorer/processstep.cpp +++ b/src/plugins/projectexplorer/processstep.cpp @@ -258,7 +258,7 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step) : m_step(step) { m_ui.setupUi(this); - m_ui.command->setExpectedKind(Utils::PathChooser::ExistingCommand); + m_ui.command->setExpectedKind(Utils::PathChooser::Command); connect(m_ui.command, SIGNAL(changed(QString)), this, SLOT(commandLineEditTextEdited())); connect(m_ui.workingDirectory, SIGNAL(changed(QString)), diff --git a/src/plugins/projectexplorer/toolchainconfigwidget.cpp b/src/plugins/projectexplorer/toolchainconfigwidget.cpp index 70a1c460231..7efa4bb69ab 100644 --- a/src/plugins/projectexplorer/toolchainconfigwidget.cpp +++ b/src/plugins/projectexplorer/toolchainconfigwidget.cpp @@ -111,9 +111,9 @@ void ToolChainConfigWidget::ensureDebuggerPathChooser(const QStringList &version if (m_d->m_debuggerPathChooser) return; m_d->m_debuggerPathChooser = new Utils::PathChooser; + m_d->m_debuggerPathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand); if (!versionArguments.isEmpty()) m_d->m_debuggerPathChooser->setCommandVersionArguments(versionArguments); - m_d->m_debuggerPathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand); connect(m_d->m_debuggerPathChooser, SIGNAL(changed(QString)), this, SLOT(emitDirty())); } diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp index fca73a1a21a..546788ac78f 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp @@ -214,9 +214,9 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run toplayout->addRow(argumentsLabel, m_argumentsLineEdit); m_workingDirectoryEdit = new Utils::PathChooser(this); + m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory); m_workingDirectoryEdit->setPath(m_qt4RunConfiguration->baseWorkingDirectory()); m_workingDirectoryEdit->setBaseDirectory(m_qt4RunConfiguration->target()->project()->projectDirectory()); - m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::ExistingDirectory); m_workingDirectoryEdit->setEnvironment(m_qt4RunConfiguration->environment()); m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory")); -- GitLab