Commit 7f38e17e authored by dt's avatar dt
Browse files

Fixes: Custom Run Executable settings showing wrong errors

Task:     Found while testing the cmake plugin
Details:  Don't validate the working directoryl as it depends on the
magic $BUILDDIR variable, validate the executable as a command.
parent 80457082
......@@ -77,7 +77,7 @@ public:
// Returns the suggested label title when used in a form layout
static QString label();
bool validatePath(const QString &path, QString *errorMessage = 0);
virtual bool validatePath(const QString &path, QString *errorMessage = 0);
// Return the home directory, which needs some fixing under Windows.
static QString homePath();
......@@ -43,6 +43,19 @@
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;
class CustomDirectoryPathChooser : public Core::Utils::PathChooser
CustomDirectoryPathChooser(QWidget *parent)
: Core::Utils::PathChooser(parent)
virtual bool validatePath(const QString &path, QString *errorMessage = 0)
return true;
CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc)
: m_ignoreChange(false)
......@@ -55,14 +68,15 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
layout->addRow("Name:", m_userName);
m_executableChooser = new Core::Utils::PathChooser(this);
layout->addRow("Executable:", m_executableChooser);
m_commandLineArgumentsLineEdit = new QLineEdit(this);
m_commandLineArgumentsLineEdit->setMinimumWidth(200); // this shouldn't be fixed here...
layout->addRow("Arguments:", m_commandLineArgumentsLineEdit);
m_workingDirectory = new Core::Utils::PathChooser(this);
m_workingDirectory = new CustomDirectoryPathChooser(this);
layout->addRow("Working Directory:", m_workingDirectory);
m_useTerminalCheck = new QCheckBox(tr("Run in &Terminal"), this);
......@@ -71,7 +85,6 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
connect(m_userName, SIGNAL(textEdited(QString)),
this, SLOT(setUserName(QString)));
connect(m_executableChooser, SIGNAL(changed()),
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