Commit aa8e2e8e authored by dt's avatar dt
Browse files

Allow relative paths in Build directories, Working Directories

Relative to the project's directory.
parent 9cdc70fd
......@@ -251,6 +251,7 @@ ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool chang
"with different settings."));
fl->addWidget(label);
m_pc = new Utils::PathChooser(this);
m_pc->setBaseDirectory(m_cmakeWizard->sourceDirectory());
m_pc->setPath(m_cmakeWizard->buildDirectory());
connect(m_pc, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
fl->addRow(tr("Build directory:"), m_pc);
......
......@@ -333,6 +333,7 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
fl->addRow(tr("Arguments:"), argumentsLineEdit);
m_workingDirectoryEdit = new Utils::PathChooser();
m_workingDirectoryEdit->setBaseDirectory(m_cmakeRunConfiguration->target()->project()->projectDirectory());
m_workingDirectoryEdit->setPath(m_cmakeRunConfiguration->workingDirectory());
m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory);
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory"));
......
......@@ -478,6 +478,7 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project)
// build directory
m_pathChooser = new Utils::PathChooser(this);
m_pathChooser->setEnabled(true);
m_pathChooser->setBaseDirectory(project->projectDirectory());
fl->addRow(tr("Build directory:"), m_pathChooser);
connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
......
......@@ -35,6 +35,7 @@
#include <projectexplorer/environmenteditmodel.h>
#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/target.h>
#include <projectexplorer/project.h>
#include <utils/detailswidget.h>
#include <utils/pathchooser.h>
#include <utils/debuggerlanguagechooser.h>
......@@ -98,6 +99,7 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
m_workingDirectory = new CustomDirectoryPathChooser(this);
m_workingDirectory->setExpectedKind(Utils::PathChooser::Directory);
m_workingDirectory->setBaseDirectory(rc->target()->project()->projectDirectory());
layout->addRow(tr("Working directory:"), m_workingDirectory);
m_useTerminalCheck = new QCheckBox(tr("Run in &Terminal"), this);
......
......@@ -77,6 +77,7 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4Project *project)
m_ui->shadowBuildDirEdit->setPromptDialogTitle(tr("Shadow Build Directory"));
m_ui->shadowBuildDirEdit->setExpectedKind(Utils::PathChooser::Directory);
m_ui->shadowBuildDirEdit->setBaseDirectory(project->projectDirectory());
connect(m_ui->shadowBuildCheckBox, SIGNAL(clicked(bool)),
this, SLOT(shadowBuildClicked(bool)));
......
......@@ -207,6 +207,7 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
m_workingDirectoryEdit = new Utils::PathChooser(this);
m_workingDirectoryEdit->setPath(m_qt4RunConfiguration->workingDirectory());
m_workingDirectoryEdit->setBaseDirectory(m_qt4RunConfiguration->target()->project()->projectDirectory());
m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory);
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment