forked from qt-creator/qt-creator
Allow relative paths in Build directories, Working Directories
Relative to the project's directory.
This commit is contained in:
@@ -251,6 +251,7 @@ ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool chang
|
|||||||
"with different settings."));
|
"with different settings."));
|
||||||
fl->addWidget(label);
|
fl->addWidget(label);
|
||||||
m_pc = new Utils::PathChooser(this);
|
m_pc = new Utils::PathChooser(this);
|
||||||
|
m_pc->setBaseDirectory(m_cmakeWizard->sourceDirectory());
|
||||||
m_pc->setPath(m_cmakeWizard->buildDirectory());
|
m_pc->setPath(m_cmakeWizard->buildDirectory());
|
||||||
connect(m_pc, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
|
connect(m_pc, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
|
||||||
fl->addRow(tr("Build directory:"), m_pc);
|
fl->addRow(tr("Build directory:"), m_pc);
|
||||||
|
|||||||
@@ -333,6 +333,7 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
|
|||||||
fl->addRow(tr("Arguments:"), argumentsLineEdit);
|
fl->addRow(tr("Arguments:"), argumentsLineEdit);
|
||||||
|
|
||||||
m_workingDirectoryEdit = new Utils::PathChooser();
|
m_workingDirectoryEdit = new Utils::PathChooser();
|
||||||
|
m_workingDirectoryEdit->setBaseDirectory(m_cmakeRunConfiguration->target()->project()->projectDirectory());
|
||||||
m_workingDirectoryEdit->setPath(m_cmakeRunConfiguration->workingDirectory());
|
m_workingDirectoryEdit->setPath(m_cmakeRunConfiguration->workingDirectory());
|
||||||
m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory);
|
m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory);
|
||||||
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory"));
|
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory"));
|
||||||
|
|||||||
@@ -478,6 +478,7 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project)
|
|||||||
// build directory
|
// build directory
|
||||||
m_pathChooser = new Utils::PathChooser(this);
|
m_pathChooser = new Utils::PathChooser(this);
|
||||||
m_pathChooser->setEnabled(true);
|
m_pathChooser->setEnabled(true);
|
||||||
|
m_pathChooser->setBaseDirectory(project->projectDirectory());
|
||||||
fl->addRow(tr("Build directory:"), m_pathChooser);
|
fl->addRow(tr("Build directory:"), m_pathChooser);
|
||||||
connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
|
connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include <projectexplorer/environmenteditmodel.h>
|
#include <projectexplorer/environmenteditmodel.h>
|
||||||
#include <projectexplorer/debugginghelper.h>
|
#include <projectexplorer/debugginghelper.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
#include <projectexplorer/project.h>
|
||||||
#include <utils/detailswidget.h>
|
#include <utils/detailswidget.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
#include <utils/debuggerlanguagechooser.h>
|
#include <utils/debuggerlanguagechooser.h>
|
||||||
@@ -98,6 +99,7 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
|
|||||||
|
|
||||||
m_workingDirectory = new CustomDirectoryPathChooser(this);
|
m_workingDirectory = new CustomDirectoryPathChooser(this);
|
||||||
m_workingDirectory->setExpectedKind(Utils::PathChooser::Directory);
|
m_workingDirectory->setExpectedKind(Utils::PathChooser::Directory);
|
||||||
|
m_workingDirectory->setBaseDirectory(rc->target()->project()->projectDirectory());
|
||||||
layout->addRow(tr("Working directory:"), m_workingDirectory);
|
layout->addRow(tr("Working directory:"), m_workingDirectory);
|
||||||
|
|
||||||
m_useTerminalCheck = new QCheckBox(tr("Run in &Terminal"), this);
|
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->setPromptDialogTitle(tr("Shadow Build Directory"));
|
||||||
m_ui->shadowBuildDirEdit->setExpectedKind(Utils::PathChooser::Directory);
|
m_ui->shadowBuildDirEdit->setExpectedKind(Utils::PathChooser::Directory);
|
||||||
|
m_ui->shadowBuildDirEdit->setBaseDirectory(project->projectDirectory());
|
||||||
|
|
||||||
connect(m_ui->shadowBuildCheckBox, SIGNAL(clicked(bool)),
|
connect(m_ui->shadowBuildCheckBox, SIGNAL(clicked(bool)),
|
||||||
this, SLOT(shadowBuildClicked(bool)));
|
this, SLOT(shadowBuildClicked(bool)));
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
|
|||||||
|
|
||||||
m_workingDirectoryEdit = new Utils::PathChooser(this);
|
m_workingDirectoryEdit = new Utils::PathChooser(this);
|
||||||
m_workingDirectoryEdit->setPath(m_qt4RunConfiguration->workingDirectory());
|
m_workingDirectoryEdit->setPath(m_qt4RunConfiguration->workingDirectory());
|
||||||
|
m_workingDirectoryEdit->setBaseDirectory(m_qt4RunConfiguration->target()->project()->projectDirectory());
|
||||||
m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory);
|
m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory);
|
||||||
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory"));
|
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user